feat: Set up comprehensive Python testing infrastructure#5
Open
llbbl wants to merge 1 commit intoTHUDM:mainfrom
Open
feat: Set up comprehensive Python testing infrastructure#5llbbl wants to merge 1 commit intoTHUDM:mainfrom
llbbl wants to merge 1 commit intoTHUDM:mainfrom
Conversation
- Add Poetry as package manager with pyproject.toml configuration - Migrate dependencies from requirements.txt to Poetry format - Add testing dependencies (pytest, pytest-cov, pytest-mock) - Configure pytest with coverage reporting, custom markers, and strict options - Create testing directory structure (tests/, unit/, integration/) - Add comprehensive shared fixtures in conftest.py - Set up coverage configuration with 80% threshold and HTML/XML reports - Create validation test suite to verify infrastructure functionality - Update .gitignore with Claude Code entries - Support for unit, integration, and slow test markers
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 Python testing infrastructure
Summary
This PR establishes a complete testing infrastructure for the SciGLM project, providing a robust foundation for test-driven development and quality assurance.
🔧 Infrastructure Components Added
pyproject.tomlincluding proper Python version constraints for Streamlit compatibility📁 Files Created/Modified
pyproject.toml- New Poetry configuration with dependencies and testing setuptests/directory structure with proper__init__.pyfilestests/conftest.py- Comprehensive shared fixtures for common testing scenariostests/test_infrastructure.py- Validation test suite to verify setup functionality.gitignore- Updated with Claude Code entries🧪 Testing Features
unit,integration, andslowmarkers for selective test execution🚀 Usage Instructions
Running Tests
Test Organization
tests/unit/- Unit tests for individual componentstests/integration/- Integration tests for component interactionstests/conftest.py- Shared fixtures and configuration@pytest.mark.unit,@pytest.mark.integration, or@pytest.mark.slow📊 Configuration Details
>=3.9,<3.9.7 || >3.9.7,<4.0(Streamlit compatibility)test_*.pyand*_test.pyfileshtmlcov/), and XML (coverage.xml) formats✅ Validation
The infrastructure has been validated with:
📝 Notes
requirements.txtdependencies have been migrated to Poetry format.gitignorefor reproducible buildsconftest.pyprovide common testing utilitiesThis setup provides a solid foundation for test-driven development and ensures code quality through automated testing and coverage reporting.