-
Notifications
You must be signed in to change notification settings - Fork 4
Add comprehensive local testing framework with golden master verifica… #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tion This commit introduces a 4-layer testing architecture for LAAVA: 1. **Unit Tests** (test_unit_laava_modules.py) - Direct testing of LAAVA Python modules (prepare_annotation, summarize_alignment) - 11 tests covering core functions, error handling, and data integrity - Comprehensive documentation explaining test purpose and value 2. **Integration Tests** (test_integration_duplicate_removal.py) - End-to-end pipeline validation focusing on duplicate removal behavior - 6 tests validating data integrity and business logic - Clear documentation distinguishing from unit tests 3. **Golden Master Verification** (test_output_gold_verification.py) - Naive catch-all content verification using SHA256 hashes - 14 tests detecting ANY changes in pipeline outputs - Handles gzip timestamp issues by hashing decompressed content - Forces conscious decisions about output changes 4. **Enhanced Test Infrastructure** - Updated Makefile with test-local target running all 47 tests - Updated test/Makefile with comprehensive local testing - Updated README.md with comprehensive testing documentation - Updated src/make_report.sh for better local testing support - Clear separation of test types and their purposes Key Features: - 47 total tests (100% passing) - Deterministic golden master verification (fixed gzip timestamp issues) - Comprehensive documentation for maintainability - Easy local testing workflow: 'make test-local'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a comprehensive local testing framework for LAAVA by adding unit tests, integration tests, and golden master verification, along with updating Makefiles, the report generation script, and documentation for local conda‐based testing.
- Added 47 tests across unit, integration, and golden master categories
- Enhanced test infrastructure in Makefiles and supporting scripts for local testing workflows
- Updated documentation in README.md to guide conda-based local testing
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
test/test_unit_laava_modules.py | New unit tests for core module functionality |
test/test_output_gold_verification.py | Golden master tests ensuring output content consistency |
test/test_integration_duplicate_removal.py | Integration tests validating duplicate removal and pipeline flow |
test/Makefile | Added new targets (test-local, sc-local, ss-local) for local testing |
src/make_report.sh | Updated to explicitly call Python scripts with dynamic path resolution |
README.md | Added section documenting local conda-based testing |
Makefile | Added test-local target to support local testing without Docker |
Comments suppressed due to low confidence (2)
test/Makefile:21
- The target references the variable '$(in_dir)' (e.g., $(in_dir)/sc.subsample005.bam) without a clear definition in this Makefile. Consider defining or documenting 'in_dir' to ensure maintainability and clarity.
sc-local: $(out_dir)/sc.reference_names.tsv
@@ -14,6 +14,52 @@ clean: | |||
test: sc ss | |||
pytest test_outputs.py | |||
|
|||
# Local testing without Docker (using conda) | |||
test-local: sc-local ss-local |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcrocker-bioborg can you make sure these tests all get run in the github action CI/CD?
laava/.github/workflows/tests.yaml
Line 67 in f2c4cab
cd test && make test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - but we should followup and ensure ALL the tests get run in the github action CI/CD
…tion
This commit introduces a 4-layer testing architecture for LAAVA:
Unit Tests (test_unit_laava_modules.py)
Integration Tests (test_integration_duplicate_removal.py)
Golden Master Verification (test_output_gold_verification.py)
Enhanced Test Infrastructure
Key Features: