-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
As hvantk expands with new modules (HGC, ancestry, annotation pipelines, etc.), some dependencies bring heavy transitive requirements that can fail on hosts without system-level dev packages. For example, gnomad pulls in ga4gh.vrs[extras] → hgvs → psycopg2, which requires gcc, libpq-devel, and python-devel to compile from source — a pain for collaborators on different OS environments.
Current state
gnomadhas been moved to an optional extra underhgc(the only actual import is already guarded withtry/except ImportErrorinhvantk/hgc/converters.py)- Base
poetry installnow works without system-level C/PostgreSQL dev libraries
Going forward
As the tool grows, modules should follow this pattern:
- Core dependencies (
hail,click,pandas, etc.) stay required — they are needed by all users - Module-specific heavy dependencies should be declared as optional extras in
pyproject.toml - Code imports of optional packages must be guarded with
try/except ImportErrorand clear error messages guiding the user to install the relevant extra - Install instructions in README should document available extras, e.g.:
poetry install # core functionality poetry install --extras hgc # HGC pipeline (includes gnomad, plotting) poetry install --extras viz # visualization support
TODO
- Review current extras (
viz,interactive,hgc,psroc) and ensure they cover all optional modules - Audit all imports for optional packages and add guards where missing
- Update README install section with extras documentation
- Consider whether
scikit-learnshould also be optional (only needed by specific modules) - Test clean install on a minimal environment (no system dev packages) to verify base install works
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request