Skip to content

Commit

Permalink
Merge branch 'develop' into expression-tree-typing
Browse files Browse the repository at this point in the history
  • Loading branch information
pipliggins committed Jan 18, 2024
2 parents ed2288b + 40be4bc commit 062bd00
Show file tree
Hide file tree
Showing 18 changed files with 665 additions and 545 deletions.
5 changes: 4 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,10 @@
"avatar_url": "https://avatars.githubusercontent.com/u/38499721?v=4",
"profile": "https://github.com/AlessioBugetti",
"contributions": [
"infra"
"infra",
"code",
"doc",
"test"
]
}
],
Expand Down
8 changes: 4 additions & 4 deletions .github/release_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ This file contains the workflow required to make a `PyBaMM` release on GitHub, P

## rcX releases (manual)

If a new release candidate is required after the release of `rc0` -
If a new release candidate is required after the release of `rc{X-1}` -

1. Fix a bug in `vYY.MM` (no new features should be added to `vYY.MM` once `rc0` is released) and `develop` individually.
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`

2. Run `update_version.yml` manually while using `append_to_tag` to specify the release candidate version number (`rc1`, `rc2`, ...).

Expand All @@ -36,7 +36,7 @@ If a new release candidate is required after the release of `rc0` -
- `vcpkg.json`
- `CHANGELOG.md`

These changes will be automatically pushed to the existing `vYY.MM` branch and a PR from `vvYY.MM` to `develop` will be created (to sync the branches).
These changes will be automatically pushed to the existing `vYY.MM` branch and a PR will be created to update version strings in `develop`.

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`.

Expand All @@ -57,7 +57,7 @@ Once satisfied with the release candidates -
- `vcpkg.json`
- `CHANGELOG.md`

These changes will be automatically pushed to the existing `vYY.MM` branch and a PR from `vvYY.MM` to `develop` will be created (to sync the branches).
These changes will be automatically pushed to the existing `vYY.MM` branch and a PR will be created to update version strings in `develop`.

3. Next, a PR from `vYY.MM` to `main` will be generated that should be merged once all the tests pass.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:
open_failure_issue:
needs: [build_windows_wheels, build_macos_and_linux_wheels, build_sdist]
name: Open an issue if build fails
if: ${{ always() && contains(needs.*.result, 'failure') }}
if: ${{ always() && contains(needs.*.result, 'failure') && github.repository_owner == 'pybamm-team'}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
42 changes: 35 additions & 7 deletions .github/workflows/update_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ jobs:
echo "VERSION=$(date +'v%y.%-m')${{ github.event.inputs.append_to_tag }}" >> $GITHUB_ENV
echo "NON_RC_VERSION=$(date +'v%y.%-m')" >> $GITHUB_ENV
# the schedule workflow is for rc0 release
- uses: actions/checkout@v4
if: github.event_name == 'schedule'
with:
ref: 'develop'

# the dispatch workflow is for rcX and final releases
- uses: actions/checkout@v4
if: github.event_name == 'workflow_dispatch'
with:
Expand All @@ -49,29 +51,55 @@ jobs:
pip install wheel
pip install --editable ".[all]"
# update all the version strings and add CHANGELOG headings
- name: Update version
run: python scripts/update_version.py

# create a new version branch for rc0 release and commit
- uses: EndBug/add-and-commit@v9
if: github.event_name == 'schedule'
with:
message: 'Bump to ${{ env.VERSION }}'
new_branch: '${{ env.NON_RC_VERSION }}'

# use the already created release branch for rcX + final releases
# and commit
- uses: EndBug/add-and-commit@v9
if: github.event_name == 'workflow_dispatch'
with:
message: 'Bump to ${{ env.VERSION }}'

- name: Make a PR from ${{ env.NON_RC_VERSION }} to develop
uses: repo-sync/pull-request@v2
# checkout to develop for updating versions in the same
- uses: actions/checkout@v4
with:
source_branch: '${{ env.NON_RC_VERSION }}'
destination_branch: "develop"
pr_title: "Sync ${{ env.NON_RC_VERSION }} and develop"
pr_body: "**Merge as soon as possible to avoid potential conflicts.**"
github_token: ${{ secrets.GITHUB_TOKEN }}
ref: 'develop'

# update all the version strings
- name: Update version
if: github.event_name == 'workflow_dispatch'
run: python scripts/update_version.py

# create a pull request updating versions in develop
- name: Create Pull Request
id: version_pr
uses: peter-evans/create-pull-request@v3
with:
delete-branch: true
branch-suffix: short-commit-hash
base: develop
commit-message: Update version to ${{ env.VERSION }}
title: Bump to ${{ env.VERSION }}
body: |
- [x] Update to ${{ env.VERSION }}
- [ ] Check the [release workflow](https://github.com/pybamm-team/PyBaMM/blob/develop/.github/release_workflow.md)
# checkout to the version branch for the final release
- uses: actions/checkout@v4
if: github.event_name == 'workflow_dispatch' && !startsWith(github.event.inputs.append_to_tag, 'rc')
with:
ref: '${{ env.NON_RC_VERSION }}'

# for final releases, create a PR from version branch to main
- name: Make a PR from ${{ env.NON_RC_VERSION }} to main
id: release_pr
if: github.event_name == 'workflow_dispatch' && !startsWith(github.event.inputs.append_to_tag, 'rc')
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# [Unreleased](https://github.com/pybamm-team/PyBaMM/)

## Bug Fixes

- Fixed a bug where if the first step(s) in a cycle are skipped then the cycle solution started from the model's initial conditions instead of from the last state of the previous cycle ([#3708](https://github.com/pybamm-team/PyBaMM/pull/3708))
# [v24.1rc0](https://github.com/pybamm-team/PyBaMM/tree/v24.1rc0) - 2024-01-31
# [v24.1rc1](https://github.com/pybamm-team/PyBaMM/tree/v24.1rc1) - 2024-01-17

## Features

Expand All @@ -21,6 +18,8 @@

## Bug fixes

- Fixed a bug where if the first step(s) in a cycle are skipped then the cycle solution started from the model's initial conditions instead of from the last state of the previous cycle ([#3708](https://github.com/pybamm-team/PyBaMM/pull/3708))
- Fixed a bug where the lumped thermal model conflates cell volume with electrode volume ([#3707](https://github.com/pybamm-team/PyBaMM/pull/3707))
- Reverted a change to the coupled degradation example notebook that caused it to be unstable for large numbers of cycles ([#3691](https://github.com/pybamm-team/PyBaMM/pull/3691))
- Fixed a bug where simulations using the CasADi-based solvers would fail randomly with the half-cell model ([#3494](https://github.com/pybamm-team/PyBaMM/pull/3494))
- Fixed bug that made identical Experiment steps with different end times crash ([#3516](https://github.com/pybamm-team/PyBaMM/pull/3516))
Expand All @@ -33,6 +32,7 @@

## Breaking changes

- The parameters `GeometricParameters.A_cooling` and `GeometricParameters.V_cell` are now automatically computed from the electrode heights, widths and thicknesses if the "cell geometry" option is "pouch" and from the parameters "Cell cooling surface area [m2]" and "Cell volume [m3]", respectively, otherwise. When using the lumped thermal model we recommend using the "arbitrary" cell geometry and specifying the parameters "Cell cooling surface area [m2]", "Cell volume [m3]" and "Total heat transfer coefficient [W.m-2.K-1]" directly. ([#3707](https://github.com/pybamm-team/PyBaMM/pull/3707))
- Dropped support for the `[jax]` extra, i.e., the Jax solver when running on Python 3.8. The Jax solver is now available on Python 3.9 and above ([#3550](https://github.com/pybamm-team/PyBaMM/pull/3550))

# [v23.9](https://github.com/pybamm-team/PyBaMM/tree/v23.9) - 2023-10-31
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ keywords:
- "expression tree"
- "python"
- "symbolic differentiation"
version: "24.1rc0"
version: "24.1rc1"
repository-code: "https://github.com/pybamm-team/PyBaMM"
title: "Python Battery Mathematical Modelling (PyBaMM)"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/prady0t"><img src="https://avatars.githubusercontent.com/u/99216956?v=4?s=100" width="100px;" alt="Pradyot Ranjan"/><br /><sub><b>Pradyot Ranjan</b></sub></a><br /><a href="#infra-prady0t" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/XuboGU"><img src="https://avatars.githubusercontent.com/u/53944452?v=4?s=100" width="100px;" alt="XuboGU"/><br /><sub><b>XuboGU</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=XuboGU" title="Code">💻</a> <a href="https://github.com/pybamm-team/PyBaMM/issues?q=author%3AXuboGU" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cringeyburger"><img src="https://avatars.githubusercontent.com/u/121183876?v=4?s=100" width="100px;" alt="Ankit Meda"/><br /><sub><b>Ankit Meda</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=cringeyburger" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/AlessioBugetti"><img src="https://avatars.githubusercontent.com/u/38499721?v=4?s=100" width="100px;" alt="Alessio Bugetti"/><br /><sub><b>Alessio Bugetti</b></sub></a><br /><a href="#infra-AlessioBugetti" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/AlessioBugetti"><img src="https://avatars.githubusercontent.com/u/38499721?v=4?s=100" width="100px;" alt="Alessio Bugetti"/><br /><sub><b>Alessio Bugetti</b></sub></a><br /><a href="#infra-AlessioBugetti" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=AlessioBugetti" title="Code">💻</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=AlessioBugetti" title="Documentation">📖</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=AlessioBugetti" title="Tests">⚠️</a></td>
</tr>
</tbody>
</table>
Expand Down
19 changes: 11 additions & 8 deletions docs/source/examples/notebooks/models/jelly-roll-model.ipynb

Large diffs are not rendered by default.

31 changes: 10 additions & 21 deletions docs/source/examples/notebooks/models/pouch-cell-model.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 062bd00

Please sign in to comment.