feat: Add comprehensive Python testing infrastructure#5
Open
llbbl wants to merge 1 commit intofpour:mainfrom
Open
feat: Add comprehensive Python testing infrastructure#5llbbl wants to merge 1 commit intofpour:mainfrom
llbbl wants to merge 1 commit intofpour:mainfrom
Conversation
- Set up Poetry package manager with pyproject.toml configuration - Add pytest, pytest-cov, and pytest-mock as development dependencies - Configure pytest with coverage reporting (80% threshold, HTML/XML output) - Create tests/ directory structure with unit/ and integration/ subdirectories - Add shared fixtures in conftest.py for common testing utilities - Update .gitignore with testing artifacts and Claude Code settings - Include custom pytest markers (unit, integration, slow) - Validate setup with comprehensive infrastructure 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 complete testing infrastructure for the Temporal Graph Networks project, providing a robust foundation for writing and running tests across all modules (TGN, TGAT, CAW, EdgeBank).
Changes Made
Package Management
pyproject.tomlwith Poetry as the package managerrequirements.txtfilespytest,pytest-cov, andpytest-mockas dev dependenciesTesting Configuration
htmlcov/) and XML (coverage.xml) reports with proper exclusionsunit,integration, andslowmarkers for test categorizationDirectory Structure
Shared Fixtures
The
conftest.pyincludes commonly needed fixtures:temp_dir: Temporary directory managementsample_data: Sample graph data DataFramessample_graph_edges: Sample edge arraysmock_model_config: Mock configuration dictionariessample_csv_file: Temporary CSV file creationmock_deviceandmock_args: Test utilitiesGit Configuration
.gitignorewith testing artifacts, coverage reports, model checkpoints, and Claude Code settingspoetry.lockfor dependency reproducibilityRunning Tests
Basic Commands
Coverage Reports
htmlcov/index.htmlfor detailed interactive reportscoverage.xmlfor CI/CD integrationValidation
All infrastructure components have been tested:
unit,integration,slow) work properlyNext Steps
Developers can now:
tests/unit/for individual module testingtests/integration/for cross-module functionalityconftest.pyfor consistent test dataThe testing infrastructure is ready for immediate use with proper dependency management, configuration, and validation.