feat: Set up comprehensive Python testing infrastructure with Poetry#23
Open
llbbl wants to merge 1 commit intoYaziwel:mainfrom
Open
feat: Set up comprehensive Python testing infrastructure with Poetry#23llbbl wants to merge 1 commit intoYaziwel:mainfrom
llbbl wants to merge 1 commit intoYaziwel:mainfrom
Conversation
- Configure Poetry as package manager with pyproject.toml - Add testing dependencies (pytest, pytest-cov, pytest-mock, pytest-xdist) - Configure pytest with coverage reporting and custom markers - Create tests/ directory structure with unit and integration subdirectories - Add comprehensive shared fixtures in conftest.py - Create validation test suite to verify infrastructure - Update .gitignore with testing and Claude-specific entries - Add all required project dependencies (torch, einops, simpleitk, etc.) - Create run_tests.sh helper script for test execution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Complete Python Testing Infrastructure
Summary
This PR sets up a comprehensive testing infrastructure for the Restore RWKV medical imaging project using Poetry as the package manager and pytest as the testing framework.
Changes Made
Package Management
pyproject.tomlwith complete project metadata and dependency managementTesting Configuration
pytest Settings: Configured comprehensive pytest options including:
Coverage Settings: Set up coverage configuration with:
Directory Structure
Test Fixtures
Created comprehensive fixtures in
conftest.py:Additional Setup
.gitignorewith Python, testing, and Claude-specific patternsrun_tests.shhelper script for easy test executionHow to Use
Install Dependencies
Run Tests
View Coverage Reports
htmlcov/index.htmlin a browsercoverage.xmlfor CI/CD integrationTesting Infrastructure Validation
The PR includes a validation test suite that verifies:
All validation tests pass successfully (33 passed, 1 skipped due to CUDA compilation requirement).
Notes
pyproject.toml(line 47)Next Steps
Developers can now immediately start writing tests using this infrastructure:
tests/unit/ortests/integration/conftest.pypoetry run pytest