feat: Set up comprehensive Python testing infrastructure#5
Open
llbbl wants to merge 1 commit intoArthur151:mainfrom
Open
feat: Set up comprehensive Python testing infrastructure#5llbbl wants to merge 1 commit intoArthur151:mainfrom
llbbl wants to merge 1 commit intoArthur151:mainfrom
Conversation
- Add Poetry package manager configuration in pyproject.toml - Configure pytest with coverage reporting (80% threshold) - Set up testing directory structure (tests/unit, tests/integration) - Create comprehensive shared fixtures in conftest.py - Add custom test markers (unit, integration, slow) - Configure coverage reporting (HTML, XML, terminal) - Update .gitignore with testing artifacts and Claude settings - Create validation tests to verify infrastructure setup - Enable poetry run test/tests commands for easy 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.
Python Testing Infrastructure Setup
Summary
This PR sets up a comprehensive testing infrastructure for the DynaCam evaluation and visualization project. The setup provides a robust foundation for writing and running tests with proper coverage reporting, fixtures, and development workflows.
Changes Made
Package Management
pyproject.tomlwith project metadataTesting Configuration
unit,integration,slowfor test categorizationDirectory Structure
Shared Fixtures (
tests/conftest.py)temp_dir: Temporary directory managementsample_data_dir: Mock data directory structuresample_annotations: Sample annotation data for testingsample_trajectory: Mock trajectory datamock_config: Configuration fixturesnumpy_random_seed: Reproducible random number generationDevelopment Commands
poetry run test- Run all tests with coveragepoetry run tests- Alternative test command-v,-k,-m, etc.)Git Configuration
.gitignorewith testing artifacts:.pytest_cache/,.coverage,htmlcov/,coverage.xml.claude/*)*traj_vis/,*.npz,*.npy)Validation
The setup includes comprehensive validation tests that verify:
All 14 validation tests pass successfully
Usage Instructions
Running Tests
Coverage Reports
htmlcov/directorycoverage.xmlfor CI/CD integrationWriting New Tests
tests/unit/ortests/integration/conftest.py@pytest.mark.unit,@pytest.mark.integration,@pytest.mark.slowtest_*.py,Test*classes,test_*functionsNotes
pyproject.tomlas neededpyproject.tomlThis testing infrastructure provides a solid foundation for maintaining code quality and enabling test-driven development practices in the project.