Skip to content

Don't store conditionId on Change in ConditionTable.from_df - #551

Merged
dweindl merged 2 commits into
PEtab-dev:mainfrom
dweindl:fix_condition_id_change
Oct 15, 2026
Merged

dweindl merged 2 commits into
PEtab-dev:mainfrom
dweindl:fix_condition_id_change

Conversation

@dweindl

@dweindl dweindl commented Oct 15, 2026

Copy link
Copy Markdown
Member

ConditionTable.from_df passed the full table rows to Change, so the condition ID ended up as an extra field on each Change. In to_df, this stale ID overrode the ID of the Condition, so renaming a condition after loading was silently ignored on writing. Also, a loaded table did not compare equal to the original one.

Now, from_df doesn't pass conditionId to Change, and to_df always uses the ID of the Condition.

Fixes #550.

🤖 Generated with Claude Code

@dweindl dweindl self-assigned this Oct 15, 2026
@codecov-commenter

codecov-commenter commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.98%. Comparing base (22c4136) to head (dd57ec9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #551   +/-   ##
=======================================
  Coverage   77.98%   77.98%           
=======================================
  Files          68       68           
  Lines        7791     7791           
  Branches     1390     1390           
=======================================
  Hits         6076     6076           
  Misses       1227     1227           
  Partials      488      488           

☔ 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 fix_condition_id_change branch from a6cbaee to bc80381 Compare October 15, 2026 10:19
@dweindl
dweindl marked this pull request as ready for review October 15, 2026 10:24
@dweindl
dweindl requested a review from a team as a code owner October 15, 2026 10:24
dweindl and others added 2 commits October 15, 2026 13:37
`ConditionTable.from_df` passed the full table rows to `Change`, so the
condition ID ended up as an extra field on each `Change`. In `to_df`,
this stale ID overrode the ID of the `Condition`, so renaming a
condition after loading was ignored. Also, a loaded table did not
compare equal to the original one.

Fixes PEtab-dev#550.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dweindl
dweindl force-pushed the fix_condition_id_change branch from bc80381 to dd57ec9 Compare October 15, 2026 11:37
@dweindl
dweindl merged commit 5fb4066 into PEtab-dev:main Oct 15, 2026
7 checks passed
@dweindl
dweindl deleted the fix_condition_id_change branch October 15, 2026 11:54
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.

v2: ConditionTable.from_df stores conditionId on each Change, overriding renamed condition IDs

3 participants