feat: Set up complete Python testing infrastructure with Poetry#7
Open
llbbl wants to merge 1 commit intowyndwarrior:masterfrom
Open
feat: Set up complete Python testing infrastructure with Poetry#7llbbl wants to merge 1 commit intowyndwarrior:masterfrom
llbbl wants to merge 1 commit intowyndwarrior:masterfrom
Conversation
- Added Poetry as package manager with pyproject.toml configuration - Configured pytest with coverage reporting and custom markers - Created comprehensive test directory structure (unit/integration) - Added shared pytest fixtures in conftest.py for common test utilities - Implemented validation tests to verify infrastructure setup - Updated .gitignore with testing and development-related entries - Configured test scripts accessible via `poetry run test/tests`
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 establishes a comprehensive testing infrastructure for the project using Poetry as the package manager and pytest as the testing framework. The setup provides a solid foundation for writing and running tests with coverage reporting, custom fixtures, and organized test structure.
Changes Made
Package Management
pyproject.tomlenvironment.ymlto Poetry formatpoetry.lockfor reproducible installationsTesting Framework
pytest Configuration:
pyproject.tomlunit,integration,slow,skip_ci)Coverage Reporting:
traj2vec,mpc,scripts,exps)Test Structure
Shared Fixtures (
conftest.py)Development Dependencies
Configuration Files
Usage Instructions
Installation
Running Tests
Coverage Reports
htmlcov/index.htmlcoverage.xml(for CI integration)Writing New Tests
tests/unit/ortests/integration/)conftest.py@pytest.mark.unit,@pytest.mark.integration, etc.)test_*.pyfor files,test_*for functionsValidation
The infrastructure has been validated with
test_infrastructure_validation.pywhich verifies:Notes
poetry.lockfile should be committed to ensure reproducible buildspyproject.tomlNext Steps
With this infrastructure in place, developers can now: