feat: Set up comprehensive Python testing infrastructure #87
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.
Set Up Python Testing Infrastructure
Summary
This PR establishes a comprehensive testing infrastructure for the depth upsampling and 3D object detection Python project. It modernizes the dependency management and creates a foundation for robust test-driven development.
Changes Made
Package Management
depth_upsampling/requirements.txtandthreedod/requirements.txtintopyproject.tomlTesting Configuration
pyproject.tomlwith complete testing configuration:test_*.pyand*_test.pyunit,integration, andslowTest Structure
Pytest Fixtures
Created comprehensive fixtures in
conftest.py:temp_dir,mock_config,capture_logssample_image,sample_depth_map,sample_point_cloudsample_torch_tensor,mock_model,mock_dataset,mock_dataloadersample_bounding_boxes,sample_lidar_datareset_environment(auto-use)Development Commands
Configured Poetry scripts for running tests:
poetry run test- Run all testspoetry run tests- Alternative command (both work)Additional Updates
.gitignore: Added testing artifacts, coverage reports, and Claude settingsInstructions for Running Tests
Install dependencies:
Run all tests:
poetry run testor
Run specific test markers:
View coverage report:
htmlcov/index.htmlin a browsercoverage.xmlfor CI integrationNotes
rawdirectory was excluded from package configuration as it's not a proper Python package