Skip to content

v2: accept empty model IDs in the measurement table - #628

Open
dweindl wants to merge 2 commits into
PEtab-dev:mainfrom
dweindl:v2-empty-model-id
Open

dweindl wants to merge 2 commits into
PEtab-dev:mainfrom
dweindl:v2-empty-model-id

Conversation

@dweindl

@dweindl dweindl commented Nov 25, 2026

Copy link
Copy Markdown
Member

With pandas 3, empty modelId cells in a measurement table are read as NaN in a str column. There, MeasurementTable.from_df converting NaN to None via apply had no effect, so the NaN values were rejected as invalid model IDs. NaN is now converted to None in the Measurement.model_id field validator.

🤖 Generated with Claude Code

dweindl and others added 2 commits November 25, 2026 15:43
With pandas 3, empty `modelId` cells are read as NaN in a `str` column,
where converting them to `None` via `apply` has no effect, so they were
rejected as invalid IDs. Convert NaN to `None` in the field validator
instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.18%. Comparing base (bd71513) to head (0273eaf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #628      +/-   ##
==========================================
- Coverage   80.18%   80.18%   -0.01%     
==========================================
  Files          70       70              
  Lines        8443     8441       -2     
  Branches     1544     1543       -1     
==========================================
- Hits         6770     6768       -2     
  Misses       1182     1182              
  Partials      491      491              

☔ View full report in Codecov by Harness.
📢 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.

@dweindl
dweindl marked this pull request as ready for review November 25, 2026 14:51
@dweindl
dweindl requested a review from a team as a code owner November 25, 2026 14:51
@dweindl dweindl self-assigned this Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants