Conversation
- Add Poetry package manager with pyproject.toml configuration - Migrate dependencies from requirements.txt to modern package management - Set up pytest with coverage reporting and custom markers (unit/integration/slow) - Create testing directory structure with unit and integration test folders - Add comprehensive shared fixtures in conftest.py for common testing scenarios - Configure coverage reporting with HTML, XML, and terminal output - Update .gitignore with Python, testing, ML, and IDE-related entries - Add validation tests to verify testing infrastructure works correctly - Enable Poetry script commands for running tests (poetry run test/tests) Testing infrastructure ready for immediate development use.
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 comprehensive testing infrastructure
Summary
This PR establishes a complete testing infrastructure for the PyTorch Image Quality Assessment project using modern Python tooling and best practices.
Changes Made
Package Management
pyproject.tomlwith proper dependency managementTesting Framework
test_*.pyand*_test.pyfilesunit,integration,slowfor test categorizationDirectory Structure
Shared Testing Utilities
Created comprehensive fixtures in
conftest.py:temp_dir,sample_image_pathsample_image,sample_tensor,sample_patches,sample_labelsmock_config,mock_dataset,mock_dataloader,mock_h5py_file,mock_yaml_configset_random_seedsfor reproducible testing,mock_cudafor CI/CDCoverage Configuration
htmlcov/directorycoverage.xml)Development Workflow
poetry run testandpoetry run testscommands-m unit,-m integration,-m slowInfrastructure Improvements
__pycache__/,*.pyc, etc.).pytest_cache/,.coverage,htmlcov/).h5,models/,logs/).claude/)Running Tests
Basic Usage
Coverage Reports
Validation
The setup includes validation tests (
tests/test_setup_validation.py) that verify:All validation tests pass, confirming the infrastructure is ready for development.
Dependencies Updated
Updated from legacy versions in
requirements.txtto modern, compatible versions:Notes
poetry.lockfile ensures reproducible installations across environmentspyproject.tomlas neededconftest.pyfor project-specific needs🤖 Generated with Claude Code