Repository navigation
This release focuses on PEtab v2: a more faithful v1-to-v2 conversion, support for multi-model problems, conversion of time-dependent model assignments to experiments, log-scale reparametrization, and cleaner table output.
Note: the deprecated top-level petab.* aliases for petab.v1 are gone (use import petab.v1 as petab), and pandas>=2.3 is now required.
Breaking changes
- Removed the deprecated top-level aliases for
petab.v1(deprecated since 0.4.0). Accessingpetab.<name>or importingpetab.<module>for anything other thanpetab.v1,petab.v2,petab.ENV_NUM_THREADSandpetab.__version__now raisesAttributeError/ModuleNotFoundError. Usepetab.v1.<name>instead, e.g.,import petab.v1 as petab.import petabno longer importspetab.v1. (by @dweindl in #538) - Require
pandas>=2.3.get_{condition,observable,parameter,mapping}_dfno longer modify DataFrames passed by the caller (by @dweindl in #571) - Removed the
tests,docandqualityextras. Development dependencies are now dependency groups. Newallextra for all optional features (by @dweindl in #564) petab.v2.Parameterhas a newnamefield for theparameterNamecolumn, which was previously stored as an extra attributeparameterName.BaseTablesubclasses now implement_to_dfinstead ofto_df. (by @dweindl in #543)
Fixes
petablint:
petablintno longer fails for PEtab v2 problems with only warnings, consistent with PEtab v1. Warnings are still reported. The previous behavior can be restored via--fail-on-warnings(currently only effective for PEtab v2) (by @dweindl in #569)
v1:
- Raise a clear error for a PEtab YAML file with an empty
problemssection (by @dweindl in #521) petab.v1.sbml.get_model_for_conditionno longer turns rate-rule targets that are overridden in the condition table into constants (by @dweindl in #520)
v2 tables and files:
- Loading and saving v2 tables no longer adds a spurious
indexcolumn (by @dweindl in #542) to_dfno longer fails for empty v2 parameter, observable and measurement tables (by @dweindl in #543)petab.v2.ConditionTable.from_dfno longer stores the condition ID on eachChange, which caused renamed conditions to be written with their old ID (by @dweindl in #551)petab.v2.ProblemConfig.to_yamlno longer writes empty optional entries (condition_files,experiment_files,mapping_files,extensions) (by @dweindl in #547)
v1-to-v2 conversion (petab1to2):
- Keep pre-equilibration for conditions that set nothing, order placeholders by index instead of lexicographically, rescale noise and priors when converting
log10tolog, and fix the conversion oflogNormal,logLaplaceandparameterScaleUniformpriors (by @FFroehlich in #532, #533, #535, and #536) - No longer add default
uniformpriors to non-estimated parameters, or if no estimated parameter has an objective prior (by @dweindl in #539) - No longer write condition tables without any condition-specific changes (by @dweindl in #554)
- Rename a pre-existing
experimentIdcolumn in the measurement table toexperimentId_v1*instead of a random name, and warn about it (by @dweindl in #572)
v2 converters:
petab.v2.converters.ExperimentsToSbmlConverternow creates flat initial assignments, which previously were nested once per experiment and failed for problems with many experiments (by @FFroehlich in #546)petab.v2.converters.ExperimentsToSbmlConverternow assigns a priority to a pre-existing event without priority if it is the only such event, so that PEtab condition changes are applied before its assignments. Previously, their order was undefined (by @dweindl in #562)
Math:
petab_math_strnow produces valid PEtab math expressions for boolean operators, (in)equality,min/max, powers with negative bases, andpi/e, and prints floats without loss of precision. PEtab v2 condition and measurement tables now write expressions in PEtab syntax (by @dweindl in #545)
Features
v2 problems and tables:
petab.v2.Problem.split_by_modelsplits a multi-model problem into single-model problems.petab.v2.Problem.validatenow supports multi-model problems (by @FFroehlich in #537)petab.v2.Problem.get_unused_idreturns an identifier that is not yet used in the problem or its model (by @dweindl in #561)- PEtab v2 tables can omit empty columns or columns at their default values via
to_df(columns=...),to_tsv(columns=...)andProblem.to_files(columns=...), or globally viapetab.v2.set_optionsandpetab.v2.option_context(by @dweindl in #543) - Added
petab.v2.C.PROBLEM_CONFIG_REQUIRED_KEYSandpetab.v2.C.PROBLEM_CONFIG_OPTIONAL_KEYS(by @dweindl in #547)
v1-to-v2 conversion (petab1to2):
petab1to2andpetab_files_1to2can skip validation viavalidate=False(by @FFroehlich in #534)petab1to2andpetab_files_1to2can preserve the objective function of log-scaled parameters withparameterScale*priors viareparametrize="priors"orreparametrize="all"(by @dweindl in #539)
v2 converters:
petab.v2.reparametrize_logestimates parameters on log scale by replacing them with new log-transformed parameters (by @dweindl in #560)petab.v2.converters.assignments_to_experimentsconverts time-dependent piecewise assignment rules in the model to experiment periods. Supported are step changes at fixed switching times, including sums and nested piecewise functions, and values that change linearly with time, which are implemented via a rate rule (by @BSnelling and @FFroehlich in #527, #556, #557, #559, #573, and #574)
Math:
petab.v1.math.petab_symbol(also inpetab.v2.math) creates sympy symbols with the same assumptions assympify_petab(by @dweindl in #563)
Full Changelog: v0.9.0...v0.10.0
🤖 Drafted with AI assistance (Claude Code)