Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
Use `petab.v1.<name>` instead, e.g., `import petab.v1 as petab`.
`import petab` no longer imports `petab.v1`.
(by @dweindl in https://github.com/PEtab-dev/libpetab-python/pull/538)
* `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 https://github.com/PEtab-dev/libpetab-python/pull/543)

**Fixes**
* `get_model_for_condition` no longer turns rate-rule targets that are
Expand All @@ -37,13 +41,21 @@
* `petab.v2.ProblemConfig.to_yaml` no longer writes empty optional entries
(`condition_files`, `experiment_files`, `mapping_files`, `extensions`)
(by @dweindl in https://github.com/PEtab-dev/libpetab-python/pull/547)
* `to_df` no longer fails for empty v2 parameter, observable and measurement
tables
(by @dweindl in https://github.com/PEtab-dev/libpetab-python/pull/543)

**Features**
* `petab1to2` and `petab_files_1to2` can skip validation via `validate=False`
(by @FFroehlich in https://github.com/PEtab-dev/libpetab-python/pull/534)
* Added `petab.v2.C.PROBLEM_CONFIG_REQUIRED_KEYS` and
`petab.v2.C.PROBLEM_CONFIG_OPTIONAL_KEYS`
(by @dweindl in https://github.com/PEtab-dev/libpetab-python/pull/547)
* 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 https://github.com/PEtab-dev/libpetab-python/pull/543)

## 0.9 series

Expand Down
1 change: 1 addition & 0 deletions doc/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ API Reference
petab.v2.extensions
petab.v2.lint
petab.v2.models
petab.v2.options
petab.v2.petab1to2
4 changes: 2 additions & 2 deletions petab/v2/C.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
MEASUREMENT_DF_REQUIRED_COLS = [
OBSERVABLE_ID,
EXPERIMENT_ID,
MEASUREMENT,
TIME,
MEASUREMENT,
]

#: Optional columns of measurement table
Expand Down Expand Up @@ -91,13 +91,13 @@
PARAMETER_ID,
LOWER_BOUND,
UPPER_BOUND,
NOMINAL_VALUE,

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.

nominalValue was added to C.PARAMETER_DF_REQUIRED_COLS, as the spec requires the column to be present.

It is optional if estimate is true. Might be problematic to expect it always.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's not marked [nominalValue] in the specs, so my understanding is that the column is mandatory, but the respective field may be empty. Other columns, such as observableParameters, explicitly state the if all-empty, the column can be omitted. For nominalValue this isn't the case. While I'd say your interpretation is desirable, I don't think this what the specs say.

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.

Ah yes, I see your point. Also applies to upper and lower bound.

Do you know whether your description is the intended interpretation while writing the spec, or just a grey area we forgot to clarify? If the latter then I think it's fine to update the spec now, just like we updated the v1 spec when we realized some things were unclear.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will add that to PEtab-dev/PEtab#681, so it can be discussed. Generally, I am in favor of dropping it if all-empty. For the bounds it's unlikely that they would ever be all-empty, because that would mean there is no parameter to estimate at all. Allowed, I guess. Useful? Not sure.

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.

Since multiple parameter tables are supported, one could keep their fixed parameters in a separate table to their estimated ones. Then it's slightly nicer to not have columns related to estimation, in the fixed parameters table.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

True, I didn't consider this use case.

ESTIMATE,
]

#: Optional columns of parameter table
PARAMETER_DF_OPTIONAL_COLS = [
PARAMETER_NAME,
NOMINAL_VALUE,
PRIOR_DISTRIBUTION,
PRIOR_PARAMETERS,
]
Expand Down
1 change: 1 addition & 0 deletions petab/v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@
)
from .lint import lint_problem # noqa: F401
from .models import MODEL_TYPE_PYSB, MODEL_TYPE_SBML, Model # noqa: F401
from .options import *
Loading
Loading