Skip to content

Remove PEtab v2 mapping-table/YAML handling from petab.v1 - #524

Open
dweindl wants to merge 1 commit into
PEtab-dev:mainfrom
dweindl:remove-v2-from-v1
Open

dweindl wants to merge 1 commit into
PEtab-dev:mainfrom
dweindl:remove-v2-from-v1

Conversation

@dweindl

@dweindl dweindl commented Sep 25, 2026

Copy link
Copy Markdown
Member

petab.v1 had accumulated v2-only functionality that was implemented directly in the v1 package instead of v2: the entity mapping table, extensions_config, and a deprecated v2-format YAML loading branch in Problem.from_yaml. The v1 spec has no mapping table, no extensions, and no model_files/language keys, so none of this belongs in petab.v1.

This PR:

  • Moves the mapping-table implementation to petab.v2.mapping (v2 no longer imports it from v1).
  • Strips mapping_df/extensions_config threading out of v1's Problem, lint, parameters, observables, and parameter_mapping modules.
  • Makes Problem.from_yaml raise a clear error for v2-format YAML instead of a deprecation warning followed by a load path that no longer works.

Non-SBML model support (PySB, BNGL) in petab.v1.models is left untouched; that's a separate follow-up.

🤖 Generated with Claude Code

petab.v1 had accumulated v2-only functionality (entity mapping
table, extensions_config, and a deprecated v2-format YAML loading
branch in Problem.from_yaml) that was implemented directly in the
v1 package instead of v2, even though the v1 spec has no mapping
table, no extensions, and no model_files/language keys.

Move the mapping-table implementation to petab.v2.mapping (v2 no
longer imports it from v1), strip mapping_df/extensions_config
threading out of v1's Problem, lint, parameters, observables, and
parameter_mapping modules, and make Problem.from_yaml raise a clear
error for v2-format YAML instead of a deprecation warning followed
by a broken load path.

Non-SBML model support (PySB, BNGL) in petab.v1.models is left
untouched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dweindl dweindl self-assigned this Sep 25, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.43%. Comparing base (2610499) to head (d52aba4).

Files with missing lines Patch % Lines
petab/v1/problem.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #524      +/-   ##
==========================================
+ Coverage   76.15%   76.43%   +0.27%     
==========================================
  Files          67       67              
  Lines        7528     7477      -51     
  Branches     1342     1326      -16     
==========================================
- Hits         5733     5715      -18     
+ Misses       1294     1272      -22     
+ Partials      501      490      -11     

☔ 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 September 28, 2026 08:27
@dweindl
dweindl requested a review from a team as a code owner September 28, 2026 08:27

@dilpath dilpath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it break someone's workflow/should there be a deprecation period?

@dweindl

dweindl commented Sep 28, 2026

Copy link
Copy Markdown
Member Author

Will it break someone's workflow/should there be a deprecation period?

Hard to tell, but I don't think so. At least for the v2 constants in petab.v1.C, deprecation comments were added 2 years ago (dweindl@7fd4498).

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.

3 participants