Skip to content

Commit

Permalink
Merge pull request #3538 from pybamm-team/v23.9
Browse files Browse the repository at this point in the history
Make release v23.9
  • Loading branch information
Saransh-cpp authored Nov 20, 2023
2 parents d3c6bc6 + e00b0d5 commit 97ca773
Show file tree
Hide file tree
Showing 523 changed files with 27,344 additions and 16,881 deletions.
76 changes: 72 additions & 4 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@
"example",
"doc",
"test",
"tutorial"
"tutorial",
"review"
]
},
{
Expand Down Expand Up @@ -530,7 +531,8 @@
"contributions": [
"infra",
"code",
"doc"
"doc",
"review"
]
},
{
Expand Down Expand Up @@ -610,7 +612,10 @@
"avatar_url": "https://avatars.githubusercontent.com/u/104268427?v=4",
"profile": "https://github.com/arjxn-py",
"contributions": [
"infra"
"infra",
"code",
"doc",
"review"
]
},
{
Expand All @@ -629,7 +634,8 @@
"profile": "https://www.aboutenergy.io/",
"contributions": [
"code",
"bug"
"bug",
"ideas"
]
},
{
Expand All @@ -640,6 +646,68 @@
"contributions": [
"code"
]
},
{
"login": "js1tr3",
"name": "Jason Siegel",
"avatar_url": "https://avatars.githubusercontent.com/u/633873?v=4",
"profile": "https://batterycontrolgroup.engin.umich.edu/",
"contributions": [
"code",
"ideas"
]
},
{
"login": "tommaull",
"name": "Tom Maull",
"avatar_url": "https://avatars.githubusercontent.com/u/101814207?v=4",
"profile": "https://github.com/tommaull",
"contributions": [
"code",
"test"
]
},
{
"login": "ejfdickinson",
"name": "ejfdickinson",
"avatar_url": "https://avatars.githubusercontent.com/u/116663050?v=4",
"profile": "https://github.com/ejfdickinson",
"contributions": [
"ideas",
"bug"
]
},
{
"login": "bobonice",
"name": "bobonice",
"avatar_url": "https://avatars.githubusercontent.com/u/22030806?v=4",
"profile": "https://github.com/bobonice",
"contributions": [
"bug",
"code"
]
},
{
"login": "kratman",
"name": "Eric G. Kratz",
"avatar_url": "https://avatars.githubusercontent.com/u/10170302?v=4",
"profile": "https://github.com/kratman",
"contributions": [
"doc",
"infra",
"bug",
"code",
"test"
]
},
{
"login": "aitorres",
"name": "Andrés Ignacio Torres",
"avatar_url": "https://avatars.githubusercontent.com/u/26191851?v=4",
"profile": "https://aitorres.com",
"contributions": [
"infra"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
source = pybamm
concurrency = multiprocessing
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# activated pre-commit - https://github.com/pybamm-team/PyBaMM/pull/2272
0054efe388d2d17301f7e0554449eac9a7d3b7fc
# activated pre-commit for notebooks - https://github.com/pybamm-team/PyBaMM/pull/3110
a63e49ece0f9336d1f5c2562f7459e555c6e6693
# activated standard pre-commits - https://github.com/pybamm-team/PyBaMM/pull/3192
5273214b585c5a4286609aed40e0b092d0e05f42
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new_parameter_set.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
value: |
Third-party parameter sets can be added to PyBaMM by registering an entry
point with `pybamm-parameter-sets` as described in our
[documentation](https://pybamm.readthedocs.io/en/latest/source/api/parameters/parameter_sets.html).
[documentation](https://docs.pybamm.org/en/latest/source/api/parameters/parameter_sets.html).
- type: input
id: parameter-set-url
attributes:
Expand Down
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Please add a line in the relevant section of [CHANGELOG.md](https://github.com/p

# Key checklist:

- [ ] No style issues: `$ pre-commit run` (see [CONTRIBUTING.md](https://github.com/pybamm-team/PyBaMM/blob/develop/CONTRIBUTING.md#installing-and-using-pre-commit) for how to set this up to run automatically when committing locally, in just two lines of code)
- [ ] All tests pass: `$ python run-tests.py --all`
- [ ] The documentation builds: `$ python run-tests.py --doctest`
- [ ] No style issues: `$ pre-commit run` (or `$ nox -s pre-commit`) (see [CONTRIBUTING.md](https://github.com/pybamm-team/PyBaMM/blob/develop/CONTRIBUTING.md#installing-and-using-pre-commit) for how to set this up to run automatically when committing locally, in just two lines of code)
- [ ] All tests pass: `$ python run-tests.py --all` (or `$ nox -s tests`)
- [ ] The documentation builds: `$ python run-tests.py --doctest` (or `$ nox -s doctests`)

You can run unit and doctests together at once, using `$ python run-tests.py --quick`.
You can run integration tests, unit tests, and doctests together at once, using `$ python run-tests.py --quick` (or `$ nox -s quick`).

## Further checks:

Expand Down
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
12 changes: 0 additions & 12 deletions .github/release_checklist.md

This file was deleted.

10 changes: 10 additions & 0 deletions .github/release_reminder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Create {{ date | date('YY.MM') }} (final or rc0) release
labels: priority:high
---
Quarterly reminder to create a -

1. pre-release if the month has just started.
2. non-pre-release if the month is about to end (**before the end of the month**).

See [Release Workflow](https://github.com/pybamm-team/PyBaMM/blob/develop/.github/release_workflow.md) for more information.
79 changes: 79 additions & 0 deletions .github/release_workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Release workflow

This file contains the workflow required to make a `PyBaMM` release on GitHub and PyPI by the maintainers.

## rc0 releases (automated)

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 -

- `pybamm/version.py`
- `docs/conf.py`
- `CITATION.cff`
- `vcpkg.json`
- `docs/_static/versions.json`
- `CHANGELOG.md`

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

2. Create a new GitHub _pre-release_ with the tag `vYY.MMrc0` from the `vYY.MM` branch and a description copied from `CHANGELOG.md`.

3. This release will automatically trigger `publish_pypi.yml` and create a _pre-release_ on PyPI.

## rcX releases (manual)

If a new release candidate is required after the release of `rc0` -

1. Fix a bug in `vYY.MM` (no new features should be added to `vYY.MM` once `rc0` is released) and `develop` individually.

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

3. This will increment the version to `vYY.MMrcX` by running `scripts/update_version.py` in the following files -

- `pybamm/version.py`
- `docs/conf.py`
- `CITATION.cff`
- `vcpkg.json`
- `docs/_static/versions.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).

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

5. This release will automatically trigger `publish_pypi.yml` and create a _pre-release_ on PyPI.

## Actual release (manual)

Once satisfied with the release candidates -

1. Run `update_version.yml` manually, leaving the `append_to_tag` field blank ("") for an actual release.

2. This will increment the version to `vYY.MMrcX` by running `scripts/update_version.py` in the following files -

- `pybamm/version.py`
- `docs/conf.py`
- `CITATION.cff`
- `vcpkg.json`
- `docs/_static/versions.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).

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

4. Create a new GitHub _release_ with the same tag from the `main` branch and a description copied from `CHANGELOG.md`.

5. This release will automatically trigger `publish_pypi.yml` and create a _release_ on PyPI.

## Other checks

Some other essential things to check throughout the release process -

- 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.
- Update jax and jaxlib to the latest version in `pybamm.util` and `setup.py`, fixing any bugs that arise
- Make sure the URLs in `docs/_static/versions.json` are valid
- 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 -
```
git tag -f <tag_name> <commit_hash>
git push origin <tag_name> # can only be carried out by the maintainers
```
6 changes: 6 additions & 0 deletions .github/wheel_failure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Fortnightly build for wheels failed
labels: priority:high, bug
---

The build is failing with the following logs - {{ env.LOGS }}
20 changes: 16 additions & 4 deletions .github/workflows/benchmark_on_push.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
name: Run benchmarks on push
on:
push:
branches: [main, develop]
pull_request:

concurrency:
# Cancel intermediate builds always
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install Linux system dependencies
run: |
sudo apt-get update
sudo apt install gfortran gcc libopenblas-dev
- name: Install python dependencies
run: |
python -m pip install --upgrade pip wheel setuptools virtualenv asv wget cmake casadi numpy
- name: Install SuiteSparse and Sundials
python -m pip install --upgrade pip wheel setuptools wget cmake casadi numpy
python -m pip install asv[virtualenv]
- name: Install SuiteSparse and SUNDIALS
run: python scripts/install_KLU_Sundials.py

- name: Fetch base branch
run: |
# This workflow also runs for merge commits
Expand All @@ -42,7 +53,8 @@ jobs:
HEAD_COMMIT=$(git rev-parse HEAD)
echo $BASE_COMMIT | tee commits_to_compare.txt
echo $HEAD_COMMIT | tee -a commits_to_compare.txt
asv run HASHFILE:commits_to_compare.txt --m "GitHubRunner" --show-stderr --strict -v
asv run HASHFILE:commits_to_compare.txt --m "GitHubRunner" --show-stderr -v
- name: Compare commits' benchmark results
run: |
BASE_COMMIT=$(head -1 commits_to_compare.txt)
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/create_release.yml

This file was deleted.

Loading

0 comments on commit 97ca773

Please sign in to comment.