feat: set up comprehensive Python testing infrastructure with Poetry#7
Open
llbbl wants to merge 1 commit into
Open
feat: set up comprehensive Python testing infrastructure with Poetry#7llbbl wants to merge 1 commit into
llbbl wants to merge 1 commit into
Conversation
- Add Poetry configuration with project metadata and dependencies - Migrate existing dependencies (numpy, pandas, Pillow, Shapely) from requirements.txt - Add testing dependencies: pytest, pytest-cov, pytest-mock - Configure pytest with coverage reporting (80% threshold, HTML/XML output) - Set up test markers (unit, integration, slow) and strict configuration - Create complete test directory structure (tests/, tests/unit/, tests/integration/) - Add comprehensive shared fixtures in conftest.py for common test scenarios - Create validation tests to verify testing infrastructure functionality - Update .gitignore with testing, Python, and development environment entries - Configure coverage reporting with appropriate exclusions and thresholds
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 with Poetry
Summary
This PR establishes a comprehensive testing infrastructure for the YOLO tiling tool project using Poetry as the package manager. The setup provides a complete testing environment ready for immediate use by developers.
Changes Made
Package Management & Dependencies
pyproject.tomlwith complete Poetry configurationrequirements.txtto PoetryTesting Configuration
✅ Pytest Configuration: Comprehensive setup in
pyproject.tomlunit,integration,slow)✅ Coverage Configuration: Detailed coverage settings
htmlcov/, XML incoverage.xml)Directory Structure
Shared Testing Utilities
temp_dir: Temporary directory managementsample_image_data: Generated test image data (416x416 RGB)sample_labels_data: YOLO format label datasample_dataset_structure: Complete dataset structure for testingmock_args: Mock command line argumentsmock_file_system: File system operation mockingmock_image_operations: PIL Image operation mockingDevelopment Environment
.pytest_cache/,.coverage,htmlcov/,coverage.xml)__pycache__/,*.pyc, build artifacts)Validation & Verification
test_setup_validation.pywith tests for:How to Use
Install Dependencies
Run Tests
Test Commands Verified
poetry run pytest- Standard test executionpython -m pytest- Alternative execution methodTesting Infrastructure Features
Notes
poetry.lockfile is intentionally tracked to ensure reproducible buildsNext Steps
Developers can now:
tests/unit/tests/integration/The testing infrastructure is complete and ready for development teams to begin writing comprehensive tests for the YOLO tiling functionality.