Repository navigation
Download and cache HGNC aliases in one call - #441
Merged
Merged
Conversation
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.
Human alias lookup required visiting HGNC and manually downloading a TSV before calling PyEnsembl. Add
GeneNameAliases.download_hgnc()to download the complete set once and return a usable alias mapping. Later calls reuse the cached snapshot without network access.Reuse PyEnsembl's atomic download/provenance path under
aliases/homo_sapiens/hgnc. Separate sources by URL so archived snapshots and mirrors with identical filenames cannot collide. Support a custom cache directory, source URL and explicitoverwrite=Truerefresh. Preservefrom_hgnc(path)for selected local snapshots; detect gzip from its contents so compressed URLs also work with query strings or extensionless endpoints. Ordinary gene queries retain their existing behavior.The alias guide now starts with the one-call workflow and an actual p53 result, followed by offline reuse, refresh, pinned snapshots and custom mappings.
Validation: ./lint.sh and TEST_SH_MAX=2 ./test.sh passed (538 passed, 1 opt-in benchmark skipped). Real local-HTTP tests cover acquisition, offline reuse, refresh, source separation, gzip, cache placement, failed refresh preservation and invalid URLs. ./docs.sh passed with complete API coverage, and all five home/query examples matched their documented output. The official HGNC complete set loaded 98,547 names and resolved p53 to TP53 / ENSG00000141510 against installed human release 93. Version: 2.23.0.
Closes #440.
Cross-version validation: lint, the complete suite (538 passed, one opt-in benchmark skipped), and all five documented examples passed in separate local environments for Python 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14. GitHub's strict documentation build passed; its test matrix is delayed by the ongoing https://www.githubstatus.com/ Actions hosted-runner assignment incident. No required status check is configured on main. Clean-main deployment will run the ordinary lint/test gates.
Release: merged at 85bb9b6 and published as 2.23.0 on PyPI (wheel and source archive verified). Clean-main ./deploy.sh passed lint and 538 tests, one opt-in benchmark skipped, and pushed v2.23.0. The final main documentation build passed on GitHub and locally. Its hosted publish job remained queued, so the same validated site was pushed with ghp-import to gh-pages at 3fbd3e8. GitHub Pages deployment completed successfully on 2026-10-06 after rerunning https://github.com/openvax/pyensembl/actions/runs/37369599482. Verified the public home/examples, cached HGNC guide and API, and both old tutorial fragments in the browser.