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

pirl-unc / mhcgnomes / 33100385351
89%

Build:
DEFAULT BRANCH: main
Ran 27 Aug 2026 05:52PM UTC
Jobs 1
Files 40
Run time 1min
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

27 Aug 2026 05:49PM UTC coverage: 89.047% (-0.05%) from 89.094%
33100385351

push

github

web-flow
Expose species provenance, document untrusted parsing and the species tree (#119)

* Expose species provenance, document untrusted parsing and the species tree

Three requests from downstream curation work, all the same shape: the
library knows something it does not expose, so callers re-implement it
badly or not at all.

#116 -- Result.species_source returns "stated", "inferred", "default" or
None, with Result.species_inferred as the boolean form:

  parse("Gaga-BLB2*02").species_source  -> "stated"
  parse("BLB2*02").species_source       -> "inferred"
  parse("MHC class II").species_source  -> "default"

The reporter asked for a bool but said the three-way form would be more
useful, and it is. Their worst case was a curator writing the
deliberately generic "MHC class II", getting Homo sapiens -- documented,
correct, and invisible -- and putting human MHC on a carp study.
"default" names exactly that case and a bool cannot.

Working out the source needs both routes the parser uses to take a
species off a string: an attached prefix, which tokenizes as a single
token, and leading species tokens. Neither alone covers Gaga-BLB2*02 and
"mouse H2-Kb" both.

Provenance is not an __init__ field, so init_field_names() never sees it
and equality, hashing, repr and to_dict() are unaffected --
parse("HLA-A*02:01") == parse("A*02:01") still holds while their sources
differ. It is also lazy: computing it eagerly cost 19% of cold parse
throughput (0.080 vs 0.067 ms/name), which is not a reasonable price for
something almost no caller reads, so parse() stores the inputs and the
property does the work on first access.

require_stated_species=True refuses anything whose species the input did
not name, and composes with required_result_types.

#117 -- README section on parsing untrusted input, showing
required_result_types with raise_on_error=False, and a table of what
each result type means. The reporter hand-rolled
type(x).__name__ in {"Allele","Gene","Pair"} because... (continued)

4073 of 4574 relevant lines covered (89.05%)

0.89 hits per line

Coverage Regressions

Lines Coverage ∆ File
73
88.58
-0.11% species.py
64
93.88
-0.36% parser.py
6
84.74
0.0% function_api.py
4
97.33
0.34% result.py
Jobs
ID Job ID Ran Files Coverage
1 33100385351.1 27 Aug 2026 05:52PM UTC 40
89.05
GitHub Action Run
Source Files on build 33100385351
  • Tree
  • List 40
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33100385351
  • 924eaacb on github
  • Prev Build on main (#33082750947)
  • Next Build on main (#33189993016)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc