feat: Set up comprehensive Python testing infrastructure#1
Open
llbbl wants to merge 1 commit intoshreyansh26:mainfrom
Open
feat: Set up comprehensive Python testing infrastructure#1llbbl wants to merge 1 commit intoshreyansh26:mainfrom
llbbl wants to merge 1 commit intoshreyansh26:mainfrom
Conversation
- Add Poetry package manager with pyproject.toml configuration - Install testing dependencies: pytest, pytest-cov, pytest-mock - Configure pytest with coverage reporting and custom markers - Create structured test directories (tests/, unit/, integration/) - Add comprehensive conftest.py with shared fixtures for ML testing - Set up validation tests to verify infrastructure functionality - Configure coverage reporting with 80% threshold and HTML/XML output - Update .gitignore with testing and Claude Code entries - Add Poetry scripts for convenient test execution
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 Complete Python Testing Infrastructure
Summary
This PR establishes a comprehensive testing infrastructure for the speculative sampling project using Poetry as the package manager. The setup includes all necessary testing dependencies, configuration, and validation tests to enable immediate test development.
Changes Made
Package Management
pyproject.toml) with project metadata and dependenciesTesting Configuration
unit,integration,slowpoetry run testandpoetry run testsDirectory Structure
Testing Utilities
conftest.pyincluding:Validation
Testing Instructions
Run All Tests
Run Specific Test Types
Coverage Reports
Test Discovery
Tests are automatically discovered in the
tests/directory following these patterns:test_*.pyor*_test.pyTest*test_*Configuration Details
Dependencies Added
pytest ^7.4.0- Main testing frameworkpytest-cov ^4.1.0- Coverage reportingpytest-mock ^3.11.1- Mocking utilitiesCoverage Configuration
Files Updated
pyproject.toml- New file with complete project configuration.gitignore- Added testing artifacts and Claude Code entriesValidation Results
✅ All infrastructure validation tests pass (10/10)
✅ Poetry installation successful
✅ Test markers working correctly
✅ Coverage reporting functional
✅ Mock fixtures operational
✅ Both
poetry run testandpoetry run testscommands workNotes
[tool.poetry.group.test.dependencies]sectionpyproject.tomlif neededNext Steps
Developers can now:
tests/unit/tests/integration/conftest.pypoetry run test