Excluded from MANIFEST.in and setup.py tests folder and subfolders.#8807
Excluded from MANIFEST.in and setup.py tests folder and subfolders.#8807ffvogmv wants to merge 2 commits intoProject-MONAI:devfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe PR updates packaging to exclude test code from distributions: Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@MANIFEST.in`:
- Line 3: Replace the problematic MANIFEST.in pattern "exclude tests/*" with the
correct directive "prune tests" so the entire tests directory (including nested
files and subdirectories) is excluded from source distributions; update the
MANIFEST.in entry that currently contains exclude tests/* to use prune tests
instead.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 905678a6-a4bf-4a65-a9f7-f84cffc752e8
📒 Files selected for processing (2)
MANIFEST.insetup.py
…s directory from sdist. Signed-off-by: Javier Vera Olmos <ffvo@gmv.com>
Fixes Tests are installed as a package
Description
This pull request resolves an issue introduced in commit
af9e8f96d704a1b4bbce5b5ca52e0e2b7ea076dc, where thetestsdirectory was inadvertently included as an installable package starting from MONAI 1.5.0, due to the refactor on tests that created multiple subfolders with__init__.pyfiles on them.This caused import conflicts in downstream projects with their own local
testsfolder, as Python could mistakenly resolve imports to MONAI’s packagedtestsmodule.To correct this behavior, the following adjustments are made:
MANIFEST.inupdated to exclude thetestsdirectory:exclude tests/*setup.pyupdated to prevent inclusion oftestsand its subpackages:These changes ensure that the MONAI test suite is not installed as part of the distributed package, restoring expected import resolution for downstream users.
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.