Skip to content

Commit 0e50894

Browse files
authored
Merge pull request #4408 from kratman/release/v24.9.0
Release v24.9.0
2 parents d026075 + c212bb0 commit 0e50894

File tree

573 files changed

+9980
-7875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

573 files changed

+9980
-7875
lines changed

.all-contributorsrc

+20
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,26 @@
940940
"contributions": [
941941
"code"
942942
]
943+
},
944+
{
945+
"login": "MehrdadBabazadeh",
946+
"name": "Mehrdad Babazadeh",
947+
"avatar_url": "https://avatars.githubusercontent.com/u/30574522?v=4",
948+
"profile": "https://github.com/MehrdadBabazadeh",
949+
"contributions": [
950+
"code",
951+
"test"
952+
]
953+
},
954+
{
955+
"login": "pipliggins",
956+
"name": "Pip Liggins",
957+
"avatar_url": "https://avatars.githubusercontent.com/u/55396775?v=4",
958+
"profile": "https://github.com/pipliggins",
959+
"contributions": [
960+
"code",
961+
"test"
962+
]
943963
}
944964
],
945965
"contributorsPerLine": 7,

.github/CODEOWNERS

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Automatically request reviews from maintainers
22

33
# Package
4-
/pybamm/discretisations/ @martinjrobins @rtimms @valentinsulzer
5-
/pybamm/experiment/ @brosaplanella @martinjrobins @rtimms @valentinsulzer @TomTranter
6-
/pybamm/expression_tree/ @martinjrobins @rtimms @valentinsulzer
7-
/pybamm/geometry/ @martinjrobins @rtimms @valentinsulzer
8-
/pybamm/input/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @kratman
9-
/pybamm/meshes/ @martinjrobins @rtimms @valentinsulzer @rtimms
10-
/pybamm/models/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @rtimms
11-
/pybamm/parameters/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @rtimms @kratman
12-
/pybamm/plotting/ @martinjrobins @rtimms @Saransh-cpp @valentinsulzer @rtimms @kratman @agriyakhetarpal
13-
/pybamm/solvers/ @martinjrobins @rtimms @valentinsulzer @TomTranter @rtimms
14-
/pybamm/spatial_methods/ @martinjrobins @rtimms @valentinsulzer @rtimms
15-
/pybamm/* @pybamm-team/maintainers # the files directly under /pybamm/, will not recurse
4+
src/pybamm/discretisations/ @martinjrobins @rtimms @valentinsulzer
5+
src/pybamm/experiment/ @brosaplanella @martinjrobins @rtimms @valentinsulzer @TomTranter
6+
src/pybamm/expression_tree/ @martinjrobins @rtimms @valentinsulzer
7+
src/pybamm/geometry/ @martinjrobins @rtimms @valentinsulzer
8+
src/pybamm/input/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @kratman
9+
src/pybamm/meshes/ @martinjrobins @rtimms @valentinsulzer @rtimms
10+
src/pybamm/models/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @rtimms
11+
src/pybamm/parameters/ @brosaplanella @DrSOKane @rtimms @valentinsulzer @TomTranter @rtimms @kratman
12+
src/pybamm/plotting/ @martinjrobins @rtimms @Saransh-cpp @valentinsulzer @rtimms @kratman @agriyakhetarpal
13+
src/pybamm/solvers/ @martinjrobins @rtimms @valentinsulzer @TomTranter @rtimms
14+
src/pybamm/spatial_methods/ @martinjrobins @rtimms @valentinsulzer @rtimms
15+
src/pybamm/* @pybamm-team/maintainers # the files directly under /pybamm/, will not recurse
1616

1717
# CI/CD workflows
1818
/.github/ @martinjrobins @Saransh-cpp @agriyakhetarpal @kratman @arjxn-py

.github/release_workflow.md

+51-46
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Release workflow
22

3-
This file contains the workflow required to make a `PyBaMM` release on GitHub, PyPI, and conda-forge by the maintainers.
3+
This file contains the workflow required to make a `PyBaMM` release on
4+
GitHub, PyPI, and conda-forge by the maintainers.
45

5-
## rc0 releases (automated)
6+
## Initial release (automated)
67

7-
1. The `update_version.yml` workflow will run on every 1st of January, May and September, updating incrementing the version to `vYY.MMrc0` by running `scripts/update_version.py` in the following files -
8+
1. The `update_version.yml` workflow will run on every 1st of January, May
9+
and September, updating incrementing the version to `vYY.MM.0` by running
10+
`scripts/update_version.py` in the following files:
811

912
- `pybamm/version.py`
1013
- `docs/conf.py`
@@ -13,21 +16,27 @@ This file contains the workflow required to make a `PyBaMM` release on GitHub, P
1316
- `vcpkg.json`
1417
- `CHANGELOG.md`
1518

16-
These changes will be automatically pushed to a new branch `vYY.MM` and a PR from `vvYY.MM` to `develop` will be created (to sync the branches).
19+
These changes will be automatically pushed to a new branch `vYY.MM`
20+
and a PR from `vYY.MM` to `main` will be created.
1721

18-
2. Create a new GitHub _pre-release_ with the tag `vYY.MMrc0` from the `vYY.MM` branch and a description copied from `CHANGELOG.md`.
22+
2. Create a new GitHub _release_ with the tag `vYY.MM.0` from the `vYY.MM`
23+
branch and a description copied from `CHANGELOG.md`.
1924

20-
3. This release will automatically trigger `publish_pypi.yml` and create a _pre-release_ on PyPI.
25+
3. This release will automatically trigger `publish_pypi.yml` and create a
26+
_release_ on PyPI.
2127

22-
## rcX releases (manual)
28+
## Bug fix releases (manual)
2329

24-
If a new release candidate is required after the release of `rc{X-1}` -
30+
If a new release is required after the release of `vYY.MM.{x-1}` -
2531

26-
1. Cherry-pick the bug fix (no new features should be added to `vYY.MM` once `rc{X-1}` is released) commit to `vYY.MM` branch once the fix is merged into `develop`. The CHANGELOG entry for such fixes should go under the `rc{X-1}` heading in `CHANGELOG.md`
32+
1. Create a new branch for the `vYY.MM.x` release using the `vYY.MM.{x-1}` tag.
2733

28-
2. Run `update_version.yml` manually while using `append_to_tag` to specify the release candidate version number (`rc1`, `rc2`, ...).
34+
2. Cherry-pick the bug fixes to `vYY.MM.x` branch once the fix is
35+
merged into `develop`. The CHANGELOG entry for such fixes should go under the
36+
`YY.MM.x` heading in `CHANGELOG.md`
2937

30-
3. This will increment the version to `vYY.MMrcX` by running `scripts/update_version.py` in the following files -
38+
3. Run `scripts/update_version.py` manually while setting `VERSION=vYY.MM.x`
39+
in your environment. This will update the version in the following files:
3140

3241
- `pybamm/version.py`
3342
- `docs/conf.py`
@@ -36,45 +45,41 @@ If a new release candidate is required after the release of `rc{X-1}` -
3645
- `vcpkg.json`
3746
- `CHANGELOG.md`
3847

39-
These changes will be automatically pushed to the existing `vYY.MM` branch and a PR will be created to update version strings in `develop`.
48+
Commit the changes to your release branch.
4049

41-
4. Create a new GitHub _pre-release_ with the same tag (`vYY.MMrcX`) from the `vYY.MM` branch and a description copied from `CHANGELOG.md`.
50+
4. Create a PR for the release and configure it to merge into the `main` branch.
4251

43-
5. This release will automatically trigger `publish_pypi.yml` and create a _pre-release_ on PyPI.
44-
45-
## Actual release (manual)
46-
47-
Once satisfied with the release candidates -
48-
49-
1. Run `update_version.yml` manually, leaving the `append_to_tag` field blank ("") for an actual release.
50-
51-
2. This will increment the version to `vYY.MMrcX` by running `scripts/update_version.py` in the following files -
52-
53-
- `pybamm/version.py`
54-
- `docs/conf.py`
55-
- `CITATION.cff`
56-
- `pyproject.toml`
57-
- `vcpkg.json`
58-
- `CHANGELOG.md`
59-
60-
These changes will be automatically pushed to the existing `vYY.MM` branch and a PR will be created to update version strings in `develop`.
61-
62-
3. Next, a PR from `vYY.MM` to `main` will be generated that should be merged once all the tests pass.
63-
64-
4. Create a new GitHub _release_ with the same tag from the `main` branch and a description copied from `CHANGELOG.md`.
65-
66-
5. This release will automatically trigger `publish_pypi.yml` and create a _release_ on PyPI.
52+
5. Create a new GitHub release with the same tag (`YY.MM.x`) from the `main`
53+
branch and a description copied from `CHANGELOG.md`. This release will
54+
automatically trigger `publish_pypi.yml` and create a _release_ on PyPI.
6755

6856
## Other checks
6957

7058
Some other essential things to check throughout the release process -
7159

72-
- If updating our custom vcpkg registory entries [pybamm-team/sundials-vcpkg-registry](https://github.com/pybamm-team/sundials-vcpkg-registry) or [pybamm-team/casadi-vcpkg-registry](https://github.com/pybamm-team/casadi-vcpkg-registry) (used to build Windows wheels), make sure to update the baseline of the registories in vcpkg-configuration.json to the latest commit id.
73-
- Update jax and jaxlib to the latest version in `pybamm.util` and `pyproject.toml`, fixing any bugs that arise
74-
- As the release workflow is initiated by the `release` event, it's important to note that the default `GITHUB_REF` used by `actions/checkout` during the checkout process will correspond to the tag created during the release process. Consequently, the workflows will consistently build PyBaMM based on the commit associated with this tag. Should new commits be introduced to the `vYY.MM` branch, such as those addressing build issues, it becomes necessary to manually update this tag to point to the most recent commit -
75-
```
76-
git tag -f <tag_name> <commit_hash>
77-
git push -f <pybamm-team/PyBaMM_remote_name> <tag_name> # can only be carried out by the maintainers
78-
```
79-
- If changes are made to the API, console scripts, entry points, new optional dependencies are added, support for major Python versions is dropped or added, or core project information and metadata are modified at the time of the release, make sure to update the `meta.yaml` file in the `recipe/` folder of the [conda-forge/pybamm-feedstock](https://github.com/conda-forge/pybamm-feedstock) repository accordingly by following the instructions in the [conda-forge documentation](https://conda-forge.org/docs/maintainer/updating_pkgs.html#updating-the-feedstock-repository) and re-rendering the recipe
80-
- The conda-forge release workflow will automatically be triggered following a stable PyPI release, and the aforementioned updates should be carried out directly in the main repository by pushing changes to the automated PR created by the conda-forge-bot. A manual PR can also be created if the updates are not included in the automated PR for some reason. This manual PR **must** bump the build number in `meta.yaml` and **must** be from a personal fork of the repository.
60+
- If updating our custom vcpkg registry entries
61+
[sundials-vcpkg-registry][SUNDIALS_VCPKG]
62+
or [casadi-vcpkg-registry][CASADI_VCPKG] (used to build Windows
63+
wheels), make sure to update the baseline of the registries in
64+
vcpkg-configuration.json to the latest commit id.
65+
- Update jax and jaxlib to the latest version in `pybamm.util` and
66+
`pyproject.toml`, fixing any bugs that arise.
67+
- If changes are made to the API, console scripts, entry points, new optional
68+
dependencies are added, support for major Python versions is dropped or
69+
added, or core project information and metadata are modified at the time
70+
of the release, make sure to update the `meta.yaml` file in the `recipe/`
71+
folder of the [pybamm-feedstock][PYBAMM_FEED] repository accordingly by
72+
following the instructions in the [conda-forge documentation][FEED_GUIDE] and
73+
re-rendering the recipe.
74+
- The conda-forge release workflow will automatically be triggered following
75+
a stable PyPI release, and the aforementioned updates should be carried
76+
out directly in the main repository by pushing changes to the automated PR
77+
created by the conda-forge-bot. A manual PR can also be created if the
78+
updates are not included in the automated PR for some reason. This manual
79+
PR **must** bump the build number in `meta.yaml` and **must** be from a
80+
personal fork of the repository.
81+
82+
[SUNDIALS_VCPKG]: https://github.com/pybamm-team/sundials-vcpkg-registry
83+
[CASADI_VCPKG]: https://github.com/pybamm-team/casadi-vcpkg-registry
84+
[PYBAMM_FEED]: https://github.com/conda-forge/pybamm-feedstock
85+
[FEED_GUIDE]: https://conda-forge.org/docs/maintainer/updating_pkgs.html#updating-the-feedstock-repository

.github/workflows/benchmark_on_push.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ jobs:
2323
sudo apt-get update
2424
sudo apt install gfortran gcc libopenblas-dev
2525
26+
- name: Set up uv
27+
run: python -m pip install uv
28+
2629
- name: Install python dependencies
2730
run: |
28-
python -m pip install --upgrade pip wheel setuptools wget cmake casadi numpy
29-
python -m pip install asv[virtualenv]
31+
python -m uv pip install --upgrade pip wheel setuptools wget cmake casadi numpy
32+
python -m uv pip install asv[virtualenv]
3033
3134
- name: Install SuiteSparse and SUNDIALS
3235
run: python scripts/install_KLU_Sundials.py

.github/workflows/periodic_benchmarks.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ jobs:
3131
sudo apt-get update
3232
sudo apt-get install gfortran gcc libopenblas-dev
3333
34+
- name: Set up uv
35+
run: python -m pip install uv
36+
3437
- name: Install python dependencies
3538
run: |
36-
python -m pip install --upgrade pip wheel setuptools wget cmake casadi numpy
37-
python -m pip install asv[virtualenv]
39+
python -m uv pip install --upgrade pip wheel setuptools wget cmake casadi numpy
40+
python -m uv pip install asv[virtualenv]
3841
3942
- name: Install SuiteSparse and SUNDIALS
4043
run: python scripts/install_KLU_Sundials.py
@@ -48,7 +51,7 @@ jobs:
4851
LD_LIBRARY_PATH: $HOME/.local/lib
4952

5053
- name: Upload results as artifact
51-
uses: actions/upload-artifact@v4
54+
uses: actions/upload-artifact@v4.3.6
5255
with:
5356
name: asv_periodic_results
5457
path: results

.github/workflows/publish_pypi.yml

+18-11
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,15 @@ jobs:
8484
CMAKE_BUILD_PARALLEL_LEVEL=${{ steps.get_num_cores.outputs.count }}
8585
CIBW_ARCHS: AMD64
8686
CIBW_BEFORE_BUILD: python -m pip install setuptools wheel delvewheel # skip CasADi and CMake
87-
CIBW_REPAIR_WHEEL_COMMAND: delvewheel repair -w {dest_dir} {wheel}
88-
CIBW_TEST_COMMAND: python -c "import pybamm; print(pybamm.IDAKLUSolver())"
89-
87+
# Fix access violation because GHA runners have modified PATH that picks wrong
88+
# msvcp140.dll, see https://github.com/adang1345/delvewheel/issues/54
89+
CIBW_REPAIR_WHEEL_COMMAND: delvewheel repair --add-path C:/Windows/System32 -w {dest_dir} {wheel}
90+
CIBW_TEST_EXTRAS: "all,dev,jax"
91+
CIBW_TEST_COMMAND: |
92+
python -c "import pybamm; print(pybamm.IDAKLUSolver())"
93+
python -m pytest -m cibw {project}/tests/unit
9094
- name: Upload Windows wheels
91-
uses: actions/upload-artifact@v4
95+
uses: actions/upload-artifact@v4.3.6
9296
with:
9397
name: wheels_windows
9498
path: ./wheelhouse/*.whl
@@ -118,12 +122,14 @@ jobs:
118122
bash scripts/install_sundials.sh 6.0.3 6.5.0
119123
CIBW_BEFORE_BUILD_LINUX: python -m pip install cmake casadi setuptools wheel
120124
CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair -w {dest_dir} {wheel}
125+
CIBW_TEST_EXTRAS: "all,dev,jax"
121126
CIBW_TEST_COMMAND: |
122127
set -e -x
123128
python -c "import pybamm; print(pybamm.IDAKLUSolver())"
129+
python -m pytest -m cibw {project}/tests/unit
124130
125131
- name: Upload wheels for Linux
126-
uses: actions/upload-artifact@v4
132+
uses: actions/upload-artifact@v4.3.6
127133
with:
128134
name: wheels_manylinux
129135
path: ./wheelhouse/*.whl
@@ -145,9 +151,6 @@ jobs:
145151
- name: Clone pybind11 repo (no history)
146152
run: git clone --depth 1 --branch v2.12.0 https://github.com/pybind/pybind11.git -c advice.detachedHead=false
147153

148-
- name: Set macOS-specific environment variables
149-
run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
150-
151154
- name: Install cibuildwheel
152155
run: python -m pip install cibuildwheel
153156

@@ -239,22 +242,26 @@ jobs:
239242
python scripts/install_KLU_Sundials.py
240243
python -m cibuildwheel --output-dir wheelhouse
241244
env:
245+
# 10.13 for Intel (macos-12/macos-13), 11.0 for Apple Silicon (macos-14 and macos-latest)
246+
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-14' && '11.0' || '10.13' }}
242247
CIBW_ARCHS_MACOS: auto
243248
CIBW_BEFORE_BUILD: python -m pip install cmake casadi setuptools wheel delocate
244249
CIBW_REPAIR_WHEEL_COMMAND: |
245250
if [[ $(uname -m) == "x86_64" ]]; then
246251
delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel}
247252
elif [[ $(uname -m) == "arm64" ]]; then
248-
# Use higher macOS target for now: https://github.com/casadi/casadi/issues/3698
253+
# Use higher macOS target for now since casadi/libc++.1.0.dylib is still not fixed
249254
delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel} --require-target-macos-version 11.1
250255
for file in {dest_dir}/*.whl; do mv "$file" "${file//macosx_11_1/macosx_11_0}"; done
251256
fi
257+
CIBW_TEST_EXTRAS: "all,dev,jax"
252258
CIBW_TEST_COMMAND: |
253259
set -e -x
254260
python -c "import pybamm; print(pybamm.IDAKLUSolver())"
261+
python -m pytest -m cibw {project}/tests/unit
255262
256263
- name: Upload wheels for macOS (amd64, arm64)
257-
uses: actions/upload-artifact@v4
264+
uses: actions/upload-artifact@v4.3.6
258265
with:
259266
name: wheels_${{ matrix.os }}
260267
path: ./wheelhouse/*.whl
@@ -274,7 +281,7 @@ jobs:
274281
run: pipx run build --sdist
275282

276283
- name: Upload SDist
277-
uses: actions/upload-artifact@v4
284+
uses: actions/upload-artifact@v4.3.6
278285
with:
279286
name: sdist
280287
path: ./dist/*.tar.gz

.github/workflows/run_benchmarks_over_history.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
${{ github.event.inputs.commit_start }}..${{ github.event.inputs.commit_end }}
4747
4848
- name: Upload results as artifact
49-
uses: actions/upload-artifact@v4
49+
uses: actions/upload-artifact@v4.3.6
5050
with:
5151
name: asv_over_history_results
5252
path: results

0 commit comments

Comments
 (0)