• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pirl-unc / tsarina / 27153087900

08 Jun 2026 04:50PM UTC coverage: 73.986% (+0.06%) from 73.929%
27153087900

push

github

web-flow
reference_data: delegate cache dir + download to datacache (like pyensembl) (#106)

Per the "why not datacache?" question. hitlist and tsarina each hand-rolled
cache-dir resolution + download, while pyensembl (same openvax ecosystem)
already uses datacache for exactly this. reference_data now does too:

- cache_dir() -> datacache.get_data_dir(subdir="tsarina",
  envkey="TSARINA_DATA_DIR") + ensure_dir. Platform-appropriate via appdirs
  (e.g. ~/Library/Caches/tsarina) when the env var is unset, instead of the
  bespoke repo-.cache / ~/.cache fallback.
- download() -> datacache.download._download_and_decompress_if_necessary
  (the same private helper pyensembl's download_cache calls), replacing the
  hand-rolled urllib fetch + zipfile/_extract_to. Handles .zip and .gz.

The value-add layer datacache does NOT provide stays here: the dataset
registry, HPA version pinning, and the sha256/version/timestamp manifest.

datacache added as a direct dependency (it was only transitive via the
optional pyensembl extra). Verified end-to-end: `reference fetch
hpa_rna_consensus` downloads + decompresses to the identical 37,949,495-byte
TSV. Cache location moves to the appdirs dir (behavior change, intended).

Tests rewritten to stub datacache's downloader instead of urllib. 424 pass.

2682 of 3625 relevant lines covered (73.99%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.81
/reference_data.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc