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
11 changes: 4 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# PEtab changelog

## 0.11 series
Changes that are not released yet are collected in
[`changelog.d/`](https://github.com/PEtab-dev/libpetab-python/tree/main/changelog.d).

### 0.11.0 (unreleased)
## 0.11 series

**Breaking changes**
* Follow SPEC 0 instead of NEP 29 for minimum supported dependency versions.
Require `numpy>=2.2`, and for the `vis` extra, `matplotlib>=3.10` and
`scipy>=1.15`
(by @dweindl in https://github.com/PEtab-dev/libpetab-python/pull/578)
<!-- towncrier release notes start -->

## 0.10 series

Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ General:
* Please document all modules, functions, classes, attributes, arguments,
return values, ... in a style consistent with the rest of the library
* Use descriptive commit messages
* For user-visible changes, add a changelog entry to `changelog.d/`
(see [`changelog.d/README.md`](changelog.d/README.md))

To contribute to this repository:

Expand Down
3 changes: 3 additions & 0 deletions changelog.d/+bool2num.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Non-constant Booleans in numeric context, e.g., `1 + (x > 0)`, failed
with `TypeError`. They are now converted to `1.0` / `0.0`
([#584](https://github.com/PEtab-dev/libpetab-python/pull/584))
3 changes: 3 additions & 0 deletions changelog.d/+experiments-to-sbml-time.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
`ExperimentsToSbmlConverter` converts `time` in condition target values to
the SBML time csymbol instead of a constant parameter with value 0
([#595](https://github.com/PEtab-dev/libpetab-python/pull/595))
5 changes: 5 additions & 0 deletions changelog.d/+num2bool.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Non-constant numeric expressions in Boolean context (operands of `&&`,
`||`, `!`, `piecewise` conditions) were treated as always `true`.
They are now `true` if non-zero, e.g., `!(x + 1)` is parsed to `x + 1 == 0`
instead of `0.0`
([#583](https://github.com/PEtab-dev/libpetab-python/pull/583))
5 changes: 5 additions & 0 deletions changelog.d/+pysb-is-state-variable.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fixed `KeyError` in `PySBModel.is_state_variable`, and thus in PEtab v2
validation, for PySB species with binding sites; `(state, bond)` tuples,
`MultiState`, lists of bonds, and complex-level compartments are now
supported
([#592](https://github.com/PEtab-dev/libpetab-python/pull/592))
3 changes: 3 additions & 0 deletions changelog.d/+pysb-pattern-from-string-strict.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
`PySBModel.pattern_from_string` raises `ValueError` for unknown monomers,
sites, states, or compartments, instead of returning an incomplete pattern
([#592](https://github.com/PEtab-dev/libpetab-python/pull/592))
4 changes: 4 additions & 0 deletions changelog.d/+sciml-hybridization-math.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PEtab SciML extension: Hybridization target values are written and
validated as PEtab math instead of sympy strings (e.g., `x^2` instead of
`x**2.0`), so written hybridization tables can be read again
([#590](https://github.com/PEtab-dev/libpetab-python/pull/590))
4 changes: 4 additions & 0 deletions changelog.d/+spec0.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Follow SPEC 0 instead of NEP 29 for minimum supported dependency versions.
Require `numpy>=2.2`, and for the `vis` extra, `matplotlib>=3.10` and
`scipy>=1.15`
([#578](https://github.com/PEtab-dev/libpetab-python/pull/578))
4 changes: 4 additions & 0 deletions changelog.d/+sympify-boolean-piecewise.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
`sympify_petab` now returns top-level Boolean expressions as numeric
expressions, e.g., `x > 0` as `Piecewise((1.0, x > 0), (0.0, True))`
instead of a relational
([#584](https://github.com/PEtab-dev/libpetab-python/pull/584))
4 changes: 4 additions & 0 deletions changelog.d/+v2-lint-time.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PEtab v2 validation: `time` in condition target values, and in observable
or noise formulas of PySB or BNGL models, is no longer reported as a missing
parameter. A parameter table entry `time` is now reported as extraneous
([#588](https://github.com/PEtab-dev/libpetab-python/pull/588))
43 changes: 43 additions & 0 deletions changelog.d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Changelog fragments

Each pull request with user-visible changes adds its changelog entry as a
separate file to this directory, instead of editing `CHANGELOG.md` directly.
This avoids merge conflicts between pull requests. At release time, the
fragments are collected into `CHANGELOG.md` using
[towncrier](https://towncrier.readthedocs.io/).

## Adding an entry

Create a file `changelog.d/<name>.<type>.md`, where `<type>` is one of

* `breaking`: **Breaking changes**
* `deprecation`: **Deprecations**
* `feature`: **Features**
* `fix`: **Fixes**
* `doc`: **Documentation**
* `misc`: **Other changes**

and `<name>` is `+` followed by a short descriptive name
(e.g., `+unused-placeholders.feature.md`). The name only needs to be unique;
it does not appear in `CHANGELOG.md`.

The file contains the text of the entry as Markdown, without a leading
bullet, hard-wrapped at 79 characters. Describe the change from the user's
perspective, and end with a link to the pull request.
For example, `changelog.d/+unused-placeholders.feature.md`:

```markdown
New validation task `CheckUnusedPlaceholders` warns about observable and
noise placeholders that are not used in the respective formulas
([#599](https://github.com/PEtab-dev/libpetab-python/pull/599))
```

Changes that don't affect users, such as CI-only changes or refactoring,
don't need an entry.

You can also create the file using `towncrier create`, e.g.,
`towncrier create +unused-placeholders.feature.md`. towncrier is included in
the `test` dependency group.

To preview the changelog section for the next release, run
`towncrier build --draft --version <next version>` from the repository root.
9 changes: 9 additions & 0 deletions changelog.d/template.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% for section, _ in sections.items() %}
{% for category, val in definitions.items() if category in sections[section] %}
**{{ definitions[category]['name'] }}**
{% for text, values in sections[section][category].items() %}
* {{ text }}
{% endfor %}

{% endfor %}
{% endfor %}
21 changes: 17 additions & 4 deletions doc/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,23 @@ Release process

1. Update the version number in ``petab/version.py``.

2. Update the changelog in ``doc/CHANGELOG.md``.
The update content can be generated automatically:
draft a new dummy GitHub release with a dummy tag and the ``develop``
branch, then click :guilabel:`Generate release notes`.
2. Collect the changelog entries from ``changelog.d/`` into
``CHANGELOG.md`` by running
`towncrier <https://towncrier.readthedocs.io/>`__
(included in the ``test`` dependency group) from the repository root:

.. code-block:: shell

towncrier build --version X.Y.Z

This adds a new section for the release to ``CHANGELOG.md``, and removes
the collected fragments (``git rm``). Run with ``--draft`` to only preview
the result. Review the new section and edit it as necessary:
group related entries (e.g., by PEtab version or module),
reorder entries (they are sorted alphabetically within each category),
credit new contributors, and add the ``**Full Changelog**`` link.
For a new minor version, add a ``## X.Y series`` heading and move the
``<!-- towncrier release notes start -->`` marker below it.

3. Create a pull request with the to-be-released changes to the main branch
(usually from ``develop``).
Expand Down
42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ test = [
"pytest",
"pytest-cov",
"scipy",
# for collecting changelog entries, see changelog.d/README.md
"towncrier",
"petabtests @ git+https://github.com/PEtab-dev/petab_test_suite@main",
"benchmark_models_petab @ git+https://github.com/PEtab-dev/petab-benchmark-problems.git@main#subdirectory=src/python",
]
Expand Down Expand Up @@ -140,3 +142,43 @@ docstring-code-format = true
exclude = [
"petab/math/_generated/*", # auto-generated
]

# Collecting changelog entries from changelog.d/, see changelog.d/README.md
[tool.towncrier]
name = "libpetab-python"
filename = "CHANGELOG.md"
directory = "changelog.d"
template = "changelog.d/template.md.j2"
start_string = "<!-- towncrier release notes start -->\n"
title_format = "### {version}"
underlines = ["", "", ""]

[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking changes"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "Features"
showcontent = true

[[tool.towncrier.type]]
directory = "fix"
name = "Fixes"
showcontent = true

[[tool.towncrier.type]]
directory = "doc"
name = "Documentation"
showcontent = true

[[tool.towncrier.type]]
directory = "misc"
name = "Other changes"
showcontent = true
Loading