Skip to content

Fix TSV reader losing empty string values in provenance/metadata/rescoring dicts#147

Merged
RalfG merged 2 commits into
mainfrom
fix/tsv-empty-strings
May 13, 2026
Merged

Fix TSV reader losing empty string values in provenance/metadata/rescoring dicts#147
RalfG merged 2 commits into
mainfrom
fix/tsv-empty-strings

Conversation

@RalfG
Copy link
Copy Markdown
Member

@RalfG RalfG commented May 13, 2026

Empty TSV cells were converted to None at parse time, then stored directly into sub-dicts after the str(v) coercion was removed in 4044a55. Pydantic rejects None where dict[str, str] is expected. Fix: restore empty string for provenance and metadata values; coerce to NaN for rescoring features.

Fixes #145.

RalfG added 2 commits May 13, 2026 14:58
…oring dicts

Empty TSV cells were converted to None at parse time, then stored directly
into sub-dicts after the str(v) coercion was removed in 4044a55. Pydantic
rejects None where dict[str, str] is expected. Fix: restore empty string for
provenance and metadata values; coerce to NaN for rescoring features.
@RalfG RalfG added this to the v1.5.3 milestone May 13, 2026
@RalfG RalfG added the bug Something isn't working label May 13, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.01%. Comparing base (af24473) to head (491378c).

Files with missing lines Patch % Lines
psm_utils/io/tsv.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
+ Coverage   71.97%   72.01%   +0.03%     
==========================================
  Files          32       32              
  Lines        3247     3248       +1     
==========================================
+ Hits         2337     2339       +2     
+ Misses        910      909       -1     
Flag Coverage Δ
unittests 72.01% <83.33%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RalfG RalfG merged commit dcfa1e4 into main May 13, 2026
7 checks passed
@RalfG RalfG deleted the fix/tsv-empty-strings branch May 13, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

Can't parse MS2Rescore psm files

1 participant