feat: Set up comprehensive Python testing infrastructure#87
Open
llbbl wants to merge 1 commit intoapple:mainfrom
Open
feat: Set up comprehensive Python testing infrastructure#87llbbl wants to merge 1 commit intoapple:mainfrom
llbbl wants to merge 1 commit intoapple:mainfrom
Conversation
- Added Poetry for modern dependency management - Configured pytest with coverage reporting (80% threshold) - Created test directory structure with unit/integration separation - Added comprehensive pytest fixtures for project needs - Configured pytest markers for test categorization - Updated .gitignore with testing and Claude-related entries - Added validation tests to verify infrastructure setup
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.
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