Skip to content

Releases

libpetab-python v0.10.0

Choose a tag to compare

@dweindl dweindl released this 26 Oct 15:07
8c0aa68

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). Accessing petab.<name> or importing petab.<module> for anything other than petab.v1, petab.v2, petab.ENV_NUM_THREADS and petab.__version__ now raises AttributeError / ModuleNotFoundError. Use petab.v1.<name> instead, e.g., import petab.v1 as petab. import petab no longer imports petab.v1. (by @dweindl in #538)
  • Require pandas>=2.3. get_{condition,observable,parameter,mapping}_df no longer modify DataFrames passed by the caller (by @dweindl in #571)
  • Removed the tests, doc and quality extras. Development dependencies are now dependency groups. New all extra for all optional features (by @dweindl in #564)
  • petab.v2.Parameter has a new name field for the parameterName column, which was previously stored as an extra attribute parameterName. BaseTable subclasses now implement _to_df instead of to_df. (by @dweindl in #543)

Fixes

petablint:

  • petablint no 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 problems section (by @dweindl in #521)
  • petab.v1.sbml.get_model_for_condition no 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 index column (by @dweindl in #542)
  • to_df no longer fails for empty v2 parameter, observable and measurement tables (by @dweindl in #543)
  • petab.v2.ConditionTable.from_df no longer stores the condition ID on each Change, which caused renamed conditions to be written with their old ID (by @dweindl in #551)
  • petab.v2.ProblemConfig.to_yaml no 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 log10 to log, and fix the conversion of logNormal, logLaplace and parameterScaleUniform priors (by @FFroehlich in #532, #533, #535, and #536)
  • No longer add default uniform priors 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 experimentId column in the measurement table to experimentId_v1* instead of a random name, and warn about it (by @dweindl in #572)

v2 converters:

  • petab.v2.converters.ExperimentsToSbmlConverter now 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.ExperimentsToSbmlConverter now 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_str now produces valid PEtab math expressions for boolean operators, (in)equality, min/max, powers with negative bases, and pi/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_model splits a multi-model problem into single-model problems. petab.v2.Problem.validate now supports multi-model problems (by @FFroehlich in #537)
  • petab.v2.Problem.get_unused_id returns 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=...) and Problem.to_files(columns=...), or globally via petab.v2.set_options and petab.v2.option_context (by @dweindl in #543)
  • Added petab.v2.C.PROBLEM_CONFIG_REQUIRED_KEYS and petab.v2.C.PROBLEM_CONFIG_OPTIONAL_KEYS (by @dweindl in #547)

v1-to-v2 conversion (petab1to2):

  • petab1to2 and petab_files_1to2 can skip validation via validate=False (by @FFroehlich in #534)
  • petab1to2 and petab_files_1to2 can preserve the objective function of log-scaled parameters with parameterScale* priors via reparametrize="priors" or reparametrize="all" (by @dweindl in #539)

v2 converters:

  • petab.v2.reparametrize_log estimates parameters on log scale by replacing them with new log-transformed parameters (by @dweindl in #560)
  • petab.v2.converters.assignments_to_experiments converts 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 in petab.v2.math) creates sympy symbols with the same assumptions as sympify_petab (by @dweindl in #563)

Full Changelog: v0.9.0...v0.10.0

🤖 Drafted with AI assistance (Claude Code)

libpetab-python v0.9.0

Choose a tag to compare

@dweindl dweindl released this 07 Sep 13:26

This release will require Python>=3.12 and numpy>=2.1.

Fixes

  • Fixed the mean of residuals and added an option to choose between
    normalized and unnormalized errors in plot_goodness_of_fit
    (by @plakrisenko in #473)
  • Made scipy a lazy import, so it is no longer required unless
    probability distributions are actually used
    (by @dweindl in #486)
  • Fixed PetabStrPrinter for non-integer rational exponents
    (by @wshlavacek in #489)
  • Fixed spurious nan-related warnings in Subplot.from_df
    (by @dweindl in #496)
  • Fixed a missing return in the noise distribution merge of
    petab1to2, which caused noiseDistribution to always be NaN after
    conversion
    (by @dweindl in #502)
  • Fixed the PEtab v2 extension config model
    (by @dweindl in #506)
  • Fixed SBML math parsing by using sbmlmath instead of
    sympy.sympify
    (by @dweindl in #509)

Features

  • Added support for PEtab SciML problems, including a dedicated linter
    (by @BSnelling, @m-philipps and @dilpath in #482,
    #505, #499, #498, #511, #513, and #516)
  • Added support for BNGL models (by @wshlavacek in #508)
  • Added linting of the mapping table, and allowed pure annotation-only
    mapping entries (by @m-philipps and @BSnelling in #480 and #500)
  • Minor improvements to the v1-to-v2 converter: warn when dropping
    parameterScale/initializationPriorType/initializationPriorParameters,
    and use the experiments table column order suggested by the PEtab format
    (by @m-philipps in #479)

libpetab-python v0.8.2

Choose a tag to compare

@dweindl dweindl released this 12 Mar 07:10
7a60b2e

Fixes

Full Changelog: v0.8.1...v0.8.2

libpetab-python v0.8.1

Choose a tag to compare

@dweindl dweindl released this 21 Jan 21:22

The only change in this release is requiring pandas<3 until we support the new pandas 3 API.

Full Changelog: v0.8.0...v0.8.1

libpetab-python v0.8.0

Choose a tag to compare

@dweindl dweindl released this 12 Dec 06:46
baeb4a5

Fixes

  • Handle KeyError in CheckInitialChangeSymbols
    (by @dweindl in #459)
  • Fix return type in petab.v2.calculate
    (by @dweindl in #464)
  • Implement sampling for v2 prior distributions
    (by @dweindl in #461)

Features

Other

  • Require Python>=3.11 per nep-0029
    (by @dweindl in #462)
  • v2: Remove log10-normal distribution per updated spec
    (by @dweindl in #456)
  • Remove petab.v2-is-experimental warnings
    (by @dweindl in #457)
    It still is, but we no longer spam users with warnings.

Full Changelog: v0.7.0...v0.8.0

libpetab-python v0.7.0

Choose a tag to compare

@dweindl dweindl released this 29 Oct 14:06
2ec51e8

Fixes

Features

  • Added PySBModel.to_str
    (by @dweindl in #451)
  • Added id field to v2.ProblemConfig
    (by @dweindl in #442)
  • Updated ExperimentsToEventsConverter to changed initialization semantics
    (by @dweindl in #443)
  • Added v2.Problem.{get_output_parameters,get_x_nominal_dict}
    (by @dweindl in #447)
  • Extended PEtab v2 mapping table validation
    (by @dweindl in #452)

Full Changelog: v0.6.0...v0.7.0

libpetab-python v0.6.0

Choose a tag to compare

@dweindl dweindl released this 22 Sep 12:09
f79bba5

Fixes

  • Implement proper truncation for prior distributions (parameter bounds now truncate the prior distribution instead of putting
    extra probability mass on the bounds)
    (by @dweindl in #335)
  • Fixed get_required_parameters_for_parameter_table
    (by @dweindl in #340)
  • Fixed Prior.from_par_dict for missing priorParameters columns
    (by @dweindl in #341)
  • Fixed petablint v2 warning
    (by @dweindl in #342)
  • Fixed linter failing on missing noiseFormula
    (by @dweindl in #367)
  • Fixed v2 import Deprecation warning
    (by @dweindl in #346)
  • petab.calculate: compare all common columns
    (by @dweindl in #347)
  • Fixed version checks
    (by @dweindl in #350)
  • Create output directories in write_*_df
    (by @dweindl in #352)
  • Handle observableTransformation in petab.v1.simulate.sample_noise
    (by @dweindl in #383)
  • Fixed residual calculation in v1.calculate
    (by @dweindl in #395)
  • Allow empty string "" in columns to be overridden with default values in priors
    (by @PaulJonasJost in #384)
  • Fixed goodness_of_fit plot and add color parameter
    (by @plakrisenko in #402
    & #437,
    by @dweindl in #440)
  • Plot without vis spec without ids_per_plot
    (by @PaulJonasJost in #386)

Deprecations

  • Using any PEtab-v2-related functionality currently in petab.v1 is deprecated and will be removed in a subsequent release.
    Use petab.v2 instead.

    This affects, for example, PEtab-v2-specific constants petab.v1.C (use petab.v2.C instead), petab.v1.mapping, or anything mapping-table-related in petab.v1.Problem.

Features

  • Substantially extended and updated petab.v2 for working with PEtab v2 problems.

    PEtab v2 is still in draft stage -- feedback is welcome!

    • PEtab v2 support for petablint
    • The library uses pydantic-based objects for most PEtab entities instead of plain DataFrames
    • Functionality for converting PEtab v1 problems to (the current state of) PEtab v2

    At least until PEtab v2 is finalized, the petab.v2 API may change rapidly, and should not be considered stable.

  • SbmlModel enhancements
    (by @fbergmann in #333)

  • Added SbmlModel.from_antimony (by @dweindl in #331)

  • Added SbmlModel.{to_antimony,to_sbml_str} (by @dweindl in #371)

  • Enable passing the base path to Problem.from_yaml (by @dweindl in #327)

  • Functions for adding conditions/observables/parameter to Problem (by @dweindl in #328)

  • Added evaluate: bool argument to math parser (by @dweindl in #365)

  • Added petab-compatible sympy string-printer (PetabStrPrinter/petab_math_str) (by @dweindl in #364)

  • Prettified linter output (by @dweindl in #401)

  • Store problem configuration in Problem (by @dweindl in #326)

  • Store path info in *Table objects (by @dweindl in #416)

Full Changelog: v0.5.0...v0.6.0

libpetab-python v0.5.0

Choose a tag to compare

@dweindl dweindl released this 11 Nov 14:06
99373c4

Fixes

  • Circumvent SettingWithCopyWarning

    by @m-philipps in #306

  • If flatten_timepoint_specific_output_overrides makes the visualization table invalid, remove it from Problem

    by @m-philipps in #316

Features

  • Added petab.v2.models by @dweindl in #302

  • Added petab.v1.priors.priors_to_measurements(...) for replacing objectivePrior* by observables/measurements

    by @dweindl in #309, #315, #317

  • Made model id optional for PySBModel

    by @dweindl in #318

  • Implemented Model.__repr__

    by @dweindl in #319

Full Changelog: v0.4.1...v0.5.0

libpetab-python v0.4.1

Choose a tag to compare

@dilpath dilpath released this 02 Jul 11:52
b0e0e54

This series contains many changes related to the new petab.v2 subpackage. petab.v2 should not be considered stable; the petab.v2 API may change rapidly until we release libpetab-python v1.0.0.

Full Changelog: v0.4.0...v0.4.1

libpetab-python v0.4.0

Choose a tag to compare

@dilpath dilpath released this 01 Jul 13:37
9d2879f

Prepare for PEtab v2

To enable ongoing support for PEtab v1, while "forking" the v1 code for PEtab v2, the old code base is now available at petab.v1, and the new code base will be at petab.v2. For now, old import petab.* statements still work, but are marked as deprecated, and import petab.v1.* should be used instead. petablint will be designed for use with only full PEtab problems in future too, rather than individual tables -- partial problems will be supported to validate individual tables.

Validation

Validation will become increasingly atomic and OOP, to support extension-specific validation in PEtab v2.

Documentation

  • Fixed formatting / missing type annotations by @dweindl in #292
  • Added versioning and deprecation policy by @dweindl in #277

Other changes

  • Simplify yaml schema by @dweindl in #264
  • Handle numpy types in sympify_petab by @dweindl in #294
  • New get_path_prefix method to get the base path for relative paths in PEtab problem YAML by @dweindl in #280

New Contributors

Full Changelog: v0.3.0...v0.4.0