Conversation
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>
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
dilpath
left a comment
There was a problem hiding this comment.
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 |
I think there is still some amici code (tracked at AMICI-dev/AMICI#3305) relying on that. Pypesto is only indirectly affected through amici. Will wait until that's resolved. |
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 inProblem.from_yaml. The v1 spec has no mapping table, no extensions, and nomodel_files/languagekeys, so none of this belongs inpetab.v1.This PR:
petab.v2.mapping(v2 no longer imports it from v1).mapping_df/extensions_configthreading out of v1'sProblem,lint,parameters,observables, andparameter_mappingmodules.Problem.from_yamlraise 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.modelsis left untouched; that's a separate follow-up.🤖 Generated with Claude Code