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

pirl-unc / hitlist / 25711341345 / 1
76%
main: 76%

Build:
DEFAULT BRANCH: main
Ran 12 May 2026 03:25AM UTC
Files 28
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 May 2026 03:22AM UTC coverage: 75.408% (+0.08%) from 75.329%
25711341345.1

push

github

web-flow
v1.30.49: extend disk cache to from_ensembl (closes #251) (#253)

* extend disk cache to ProteomeIndex.from_ensembl (closes #251)

The disk cache shipped in PR #247 (closes #246) only covered
from_fasta.  This commit extends the same caching pattern to
from_ensembl, the path tsarina hits once per patient (see
@iskandr's comment on #251 — separate processes mean the
in-memory _FASTA_INDEX_CACHE never amortizes across patients;
the disk cache does).

Refactor: extracted three helpers from the from_fasta cache flow
that both factories now share —

- _hit_in_memory_cache(cache_key, label, verbose)
- _hit_disk_cache(cache_key, label, verbose)  (also promotes into in-memory)
- _populate_caches(cache_key, idx)
- _populate_in_memory_cache(cache_key, idx)  (used by the above)

from_fasta switched to these helpers (reduces duplication, no
behavior change — verified by all 49 existing proteome tests still
passing).

from_ensembl additions:

- _resolve_ensembl_gtf_path(ensembl): tolerantly probes a small
  sequence of pyensembl attribute names (gtf_path, _gtf_path, gtf)
  for the local GTF file.  Returns None when unresolvable (synthetic
  test fakes, missing local data) → caching silently skipped, cold
  path runs unchanged.
- _build_ensembl_cache_key(ensembl, release, species, biotype, lengths):
  builds the cache-key tuple ("ensembl", release, species, biotype,
  lengths, gtf_size, gtf_mtime_ns).  Returns None when GTF
  unresolvable.
- from_ensembl: checks in-memory then disk cache before the gene
  iteration, populates both after the cold _build.

_disk_cache_filename now handles two cache-key shapes via the first-
element discriminant:

- ("ensembl", ...) → v{V}_ensembl_{species}_r{release}_{biotype}_L{n}_{hash}.pkl
- (path_str, ...) → v{V}_{fasta_basename}_L{n}_{hash}.pkl  (legacy)

Format version unchanged (v1) — both shapes serialize the same
ProteomeIndex object via pickle.

Tests added (5 new in test_proteome.py):

- test_from_ensembl_disk_cache_persis... (continued)

4394 of 5827 relevant lines covered (75.41%)

0.75 hits per line

Source Files on job 25711341345.1
  • Tree
  • List 28
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25711341345
  • e80d3ff2 on github
  • Prev Job for on main (#25711122998.1)
  • Next Job for on main (#25751986801.1)
  • Delete
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