Skip to content

v2: reject empty condition and experiment IDs - #629

Open
dweindl wants to merge 1 commit into
PEtab-dev:mainfrom
dweindl:v2-empty-condition-id
Open

dweindl wants to merge 1 commit into
PEtab-dev:mainfrom
dweindl:v2-empty-condition-id

Conversation

@dweindl

@dweindl dweindl commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Rows with an empty conditionId in the condition table or an empty experimentId in the experiment table were silently dropped by groupby in ConditionTable.from_df and ExperimentTable.from_df, so neither loading nor linting reported them. They now raise EmptyIdError, naming the table and the file, followed by the affected rows (at most 10), e.g.:

ConditionTable has 1 row(s) with empty conditionId. File: .../conditions.tsv
conditionId           targetId  targetValue
        NaN not_a_model_entity         42.0

TableError is the new common base class of EmptyIdError and MissingColumnsError. petablint reports any TableError without a traceback.

🤖 Generated with Claude Code

@codecov-commenter

codecov-commenter commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.47%. Comparing base (b694a77) to head (30630d0).

Files with missing lines Patch % Lines
petab/petablint.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #629      +/-   ##
==========================================
+ Coverage   81.45%   81.47%   +0.02%     
==========================================
  Files          76       76              
  Lines        8906     8918      +12     
  Branches     1631     1633       +2     
==========================================
+ Hits         7254     7266      +12     
  Misses       1171     1171              
  Partials      481      481              

☔ 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 force-pushed the v2-empty-condition-id branch from f10d96d to ef7cff1 Compare November 25, 2026 15:34
@dweindl
dweindl marked this pull request as ready for review November 25, 2026 15:38
@dweindl
dweindl requested a review from a team as a code owner November 25, 2026 15:38
@dweindl dweindl self-assigned this Nov 25, 2026
@dweindl
dweindl force-pushed the v2-empty-condition-id branch from ef7cff1 to acc1f3d Compare November 30, 2026 12:17
@dweindl dweindl added this to the v0.11.0 milestone Dec 1, 2026
@dweindl
dweindl force-pushed the v2-empty-condition-id branch 2 times, most recently from 5eb3aef to aca5852 Compare December 1, 2026 15:19
Rows with an empty `conditionId` in the condition table or an empty
`experimentId` in the experiment table were silently dropped by
`groupby` in `ConditionTable.from_df` and `ExperimentTable.from_df`,
so neither loading nor linting reported them. Raise an `EmptyIdError`
instead, naming the table, the rows, and the file.

Add `TableError` as common base class of `EmptyIdError` and
`MissingColumnsError`, and report it in `petablint` without a
traceback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dweindl
dweindl force-pushed the v2-empty-condition-id branch from aca5852 to 30630d0 Compare December 2, 2026 09:33
@dweindl
dweindl requested a review from PaulJonasJost December 2, 2026 09:44

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