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

pirl-unc / tcrsift / 25533038812 / 4
72%
main: 72%

Build:
DEFAULT BRANCH: main
Ran 08 May 2026 02:23AM UTC
Files 24
Run time 1s
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

08 May 2026 02:22AM UTC coverage: 70.696% (+0.1%) from 70.569%
25533038812.4

push

github

web-flow
Add rehydrate_obs helper; apply at pipeline-stage entries (#13)

Defensive cure for the recurring h5ad-roundtrip dtype-drift class of
bugs (#3 / #5 / #7 / #11). anndata serialization is not
dtype-preserving: string columns become Categorical, bool columns
become object/Categorical, and integer columns become float64 once
NaN is introduced. Each form has bitten downstream code (.fillna(""),
write_h5ad, range filters).

tcrsift._dtypes.rehydrate_obs(adata) re-pins the obs columns we own:

- known string columns (CDR3_alpha, CDR3_beta, CDR3ab, sample,
  patient_id, enrichment_method, antigen_*, source, VDJ gene cols, ...)
  -> object
- known bool columns (has_TRA/TRB, multi_*, is_complete_clone,
  is_doublet, is_CD4/CD8, TR{A,B}_pass_umi) -> bool, NaN -> False
- known int columns (TRA_count, TRB_count) -> int64, NaN -> 0

Mutates adata.obs in place (the dtype contract should hold for
downstream stages too); returns adata for chaining; idempotent so
repeated calls cost nothing.

Applied at:
- clonotype.aggregate_clonotypes — the failing site from #11. Replaces
  the inline .astype(object) cast shipped in 0.3.1; the rehydrate at
  function entry now handles it for all CDR3 paths.
- phenotype.phenotype_cells — defensive; phenotype itself reads numeric
  markers (CD4/CD8) but writes Tcell_type for downstream stages, and
  any future obs reader benefits from a normalized starting state.

Tests cover: Categorical -> object, NaN-bearing Categorical fillna
no longer raises, object-bool with None -> bool/False, float-int with
NaN -> int/0, idempotency, unknown columns left alone, and an
end-to-end h5ad roundtrip -> aggregate_clonotypes succeeds.

Bumps version to 0.3.2.

4094 of 5791 relevant lines covered (70.7%)

0.71 hits per line

Source Files on job python-3.11 - 25533038812.4
  • Tree
  • List 24
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25533038812
  • 549fcb8c on github
  • Prev Job for on main (#25532869609.3)
  • Next Job for on main (#25533157354.3)
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