Thank you for your interest in contributing to hvantk! This guide will help you get started.
-
Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/hvantk cd hvantk -
Set up the development environment
poetry install eval "$(poetry env activate)"
-
Run tests to verify setup
pytest -q
git checkout -b feature/your-feature-nameUse descriptive branch names:
feature/add-new-datasourcefor new featuresfix/bug-descriptionfor bug fixesdocs/update-readmefor documentation changes
Follow these guidelines:
- Follow PEP 8 for Python code
- Use type hints where applicable
- Write clear docstrings for public functions and classes
- Keep functions focused and modular
- Add tests for new functionality
- Update existing tests if behavior changes
- Ensure all tests pass before submitting
- Use fixtures in
hvantk/tests/testdatafor test data
- Update relevant documentation in
docs_site/ - Add docstrings to new functions and classes
- Include usage examples where appropriate
- Update README.md if adding major features
# Run all tests
pytest
# Run specific test file
pytest hvantk/tests/test_file.py
# Run with verbose output
pytest -v
# Run with coverage
pytest --cov=hvantkWrite clear, descriptive commit messages:
git add .
git commit -m "Add support for new annotation source
- Implement builder for XYZ database
- Add tests for XYZ builder
- Update documentation
"Follow conventional commits format:
feat:for new featuresfix:for bug fixesdocs:for documentation changestest:for test additions/changesrefactor:for code refactoring
git push origin feature/your-feature-nameThen create a pull request on GitHub with:
- Clear title describing the change
- Description of what changed and why
- Reference to related issues (if any)
- Screenshots (if UI changes)
New data sources are added as plugins under hvantk/skills/<provider>/. The
canonical reference is hvantk/skills/_conventions/SKILL.md — start there
and copy from an existing plugin (clinvar, hgnc, msigdb are good models).
-
Scaffold the plugin folder
hvantk/skills/<provider>/plugin.yaml— manifest declaring theBuilder/DriftProbe/ optionalDownloadFn+ParseFn,artifact_type,schema_id, and test fixture paths.hvantk/skills/<provider>/builder.py— implement the Phase B contract:build_<provider>_<dataset>(parsed_input, ctx, **params), returning one ofAnnotationTable/ExpressionMatrix/VariantMatrix/GeneSet(the manifest'sartifact_typedeclares which).hvantk/skills/<provider>/drift_probe.py— return a dict the platform hashes into asource_fingerprint.hvantk/skills/<provider>/SKILL.md— author-facing operational guide.
-
Write the Phase B builder
from hvantk.core.models import AnnotationTable def build_myprovider_dataset(parsed_input, ctx, *, **params): """Phase B builder — returns an AnnotationTable.""" # ... import + transform ... return AnnotationTable.from_hail( ht, provenance=ctx.provenance(schema_id="myprovider-v1") )
BuildContext(ctx) supplies plugin name, version, and source fingerprint; the platform stamps Provenance and validates the artifact type / schema_id againstplugin.yaml. The CLIhvantk reprocessis the only public build path — there is no separate programmatic API. -
Create tests
hvantk/skills/<provider>/tests/test_builder.py— snapshot round-trip test (usephase_b_snapshot_adapterfromhvantk/tests/_snapshot_utils.py).hvantk/skills/<provider>/tests/testdata/— minimal fixture.hvantk/skills/<provider>/tests/snapshots/— generated viapytest --regenerate-snapshots.
-
Update documentation
- Add to Data Sources.
- Add usage example to Usage Guide showing
hvantk reprocess <provider>:<dataset>.
See Architecture for detailed information on the plugin system and extension points.
All submissions require review:
-
Automated checks must pass:
- Tests must pass
- Code must follow style guidelines
- No merge conflicts
-
Manual review will check:
- Code quality and design
- Test coverage
- Documentation completeness
- Alignment with project goals
-
Feedback and iteration:
- Address reviewer comments
- Push additional commits to same branch
- Request re-review when ready
- Be respectful and inclusive
- Provide constructive feedback
- Ask questions if something is unclear
- Help others when you can
- Documentation: See the usage guide and data sources
- Architecture: See architecture.md
- Issues: GitHub Issues
- Discussions: GitHub Discussions
By contributing to hvantk, you agree that your contributions will be licensed under the MIT License.