Skip to content

Commit

Permalink
Merge pull request #3780 from pybamm-team/v24.1
Browse files Browse the repository at this point in the history
Make release v24.1
  • Loading branch information
Saransh-cpp committed Jan 31, 2024
2 parents 97ca773 + e29dcc0 commit bb6fc9b
Show file tree
Hide file tree
Showing 332 changed files with 13,050 additions and 11,600 deletions.
87 changes: 86 additions & 1 deletion .all-contributorsrc
Expand Up @@ -442,7 +442,7 @@
"login": "wigging",
"name": "Gavin Wiggins",
"avatar_url": "https://avatars.githubusercontent.com/u/6828967?v=4",
"profile": "https://wigging.me",
"profile": "https://gavinw.me",
"contributions": [
"bug",
"code"
Expand Down Expand Up @@ -708,6 +708,91 @@
"contributions": [
"infra"
]
},
{
"login": "Agnik7",
"name": "Agnik Bakshi",
"avatar_url": "https://avatars.githubusercontent.com/u/77234005?v=4",
"profile": "https://github.com/Agnik7",
"contributions": [
"doc"
]
},
{
"login": "RuiheLi",
"name": "RuiheLi",
"avatar_url": "https://avatars.githubusercontent.com/u/84007676?v=4",
"profile": "https://github.com/RuiheLi",
"contributions": [
"code",
"test"
]
},
{
"login": "chmabaur",
"name": "chmabaur",
"avatar_url": "https://avatars.githubusercontent.com/u/127507466?v=4",
"profile": "https://github.com/chmabaur",
"contributions": [
"bug",
"code"
]
},
{
"login": "AbhishekChaudharii",
"name": "Abhishek Chaudhari",
"avatar_url": "https://avatars.githubusercontent.com/u/91185083?v=4",
"profile": "https://github.com/AbhishekChaudharii",
"contributions": [
"doc",
"code"
]
},
{
"login": "shubhambhar007",
"name": "Shubham Bhardwaj",
"avatar_url": "https://avatars.githubusercontent.com/u/32607282?v=4",
"profile": "https://github.com/shubhambhar007",
"contributions": [
"infra"
]
},
{
"login": "jlauber18",
"name": "Jonathan Lauber",
"avatar_url": "https://avatars.githubusercontent.com/u/28939653?v=4",
"profile": "https://github.com/jlauber18",
"contributions": [
"infra"
]
},
{
"login": "prady0t",
"name": "Pradyot Ranjan",
"avatar_url": "https://avatars.githubusercontent.com/u/99216956?v=4",
"profile": "https://github.com/prady0t",
"contributions": [
"infra"
]
},
{
"login": "XuboGU",
"name": "XuboGU",
"avatar_url": "https://avatars.githubusercontent.com/u/53944452?v=4",
"profile": "https://github.com/XuboGU",
"contributions": [
"code",
"bug"
]
},
{
"login": "cringeyburger",
"name": "Ankit Meda",
"avatar_url": "https://avatars.githubusercontent.com/u/121183876?v=4",
"profile": "https://github.com/cringeyburger",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Expand Up @@ -4,3 +4,9 @@
a63e49ece0f9336d1f5c2562f7459e555c6e6693
# activated standard pre-commits - https://github.com/pybamm-team/PyBaMM/pull/3192
5273214b585c5a4286609aed40e0b092d0e05f42
# migrated config to pyproject.toml - https://github.com/pybamm-team/PyBaMM/pull/3557
12c5d77203bd93542785d237bac00bad5ed5469a
# activated pyupgrade - https://github.com/pybamm-team/PyBaMM/pull/3579
ff6d81c01331c7d269303b4a8321d9881bdf98fa
# migrated to ruff-format - https://github.com/pybamm-team/PyBaMM/pull/3655
60ebd4148059a95428a496f4f55c1175ead362d3
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Expand Up @@ -5,3 +5,8 @@ updates:
directory: "/"
schedule:
interval: "weekly"
# group updates in a single PR
groups:
actions:
patterns:
- "*"
2 changes: 1 addition & 1 deletion .github/release_reminder.md
@@ -1,6 +1,6 @@
---
title: Create {{ date | date('YY.MM') }} (final or rc0) release
labels: priority:high
labels: "priority: high"
---
Quarterly reminder to create a -

Expand Down
23 changes: 12 additions & 11 deletions .github/release_workflow.md
@@ -1,6 +1,6 @@
# Release workflow

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

## rc0 releases (automated)

Expand All @@ -9,8 +9,8 @@ This file contains the workflow required to make a `PyBaMM` release on GitHub an
- `pybamm/version.py`
- `docs/conf.py`
- `CITATION.cff`
- `pyproject.toml`
- `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).
Expand All @@ -21,9 +21,9 @@ This file contains the workflow required to make a `PyBaMM` release on GitHub an

## 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 @@ -32,11 +32,11 @@ If a new release candidate is required after the release of `rc0` -
- `pybamm/version.py`
- `docs/conf.py`
- `CITATION.cff`
- `pyproject.toml`
- `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).
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 @@ -53,11 +53,11 @@ Once satisfied with the release candidates -
- `pybamm/version.py`
- `docs/conf.py`
- `CITATION.cff`
- `pyproject.toml`
- `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).
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 All @@ -70,10 +70,11 @@ Once satisfied with the release candidates -
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
- Update jax and jaxlib to the latest version in `pybamm.util` and `pyproject.toml`, fixing any bugs that arise
- 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
git push -f <pybamm-team/PyBaMM_remote_name> <tag_name> # can only be carried out by the maintainers
```
- 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
- 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.
2 changes: 1 addition & 1 deletion .github/wheel_failure.md
@@ -1,6 +1,6 @@
---
title: Fortnightly build for wheels failed
labels: priority:high, bug
labels: "priority: high, bug"
---

The build is failing with the following logs - {{ env.LOGS }}
2 changes: 1 addition & 1 deletion .github/workflows/benchmark_on_push.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/docker.yml
@@ -0,0 +1,61 @@
name: Build and push Docker images to Docker Hub

on:
workflow_dispatch:
push:
branches:
- develop

jobs:
build_docker_images:
# This workflow is only of value to PyBaMM and would always be skipped in forks
if: github.repository_owner == 'pybamm-team'
name: Image (${{ matrix.build-args }})
runs-on: ubuntu-latest
strategy:
matrix:
build-args: ["No solvers", "JAX", "ODES", "IDAKLU", "ALL"]
fail-fast: true

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create tags for Docker images based on build-time arguments
id: tags
run: |
if [ "${{ matrix.build-args }}" = "No solvers" ]; then
echo "tag=latest" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.build-args }}" = "JAX" ]; then
echo "tag=jax" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.build-args }}" = "ODES" ]; then
echo "tag=odes" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.build-args }}" = "IDAKLU" ]; then
echo "tag=idaklu" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.build-args }}" = "ALL" ]; then
echo "tag=all" >> "$GITHUB_OUTPUT"
fi
- name: Build and push Docker image to Docker Hub (${{ matrix.build-args }})
uses: docker/build-push-action@v5
with:
context: .
file: scripts/Dockerfile
tags: pybamm/pybamm:${{ steps.tags.outputs.tag }}
push: true
platforms: linux/amd64, linux/arm64

- name: List built image(s)
run: docker images
5 changes: 5 additions & 0 deletions .github/workflows/lychee_url_checker.yml
Expand Up @@ -45,13 +45,18 @@ jobs:
--accept 200,429
--exclude-path ./CHANGELOG.md
--exclude-path ./scripts/update_version.py
--exclude-path asv.conf.json
--exclude-path docs/conf.py
'./**/*.rst'
'./**/*.md'
'./**/*.py'
'./**/*.ipynb'
'./**/*.json'
'./**/*.toml'
# fail the action on broken links
fail: true
jobSummary: true
format: markdown
env:
# to be used in case rate limits are surpassed
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
12 changes: 6 additions & 6 deletions .github/workflows/periodic_benchmarks.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand All @@ -48,9 +48,9 @@ jobs:
LD_LIBRARY_PATH: $HOME/.local/lib

- name: Upload results as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: asv_new_results
name: asv_periodic_results
path: results

publish-results:
Expand All @@ -59,7 +59,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand All @@ -73,9 +73,9 @@ jobs:
token: ${{ secrets.BENCH_PAT }}

- name: Download results artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: asv_new_results
name: asv_periodic_results
path: new_results

- name: Copy new results and push to pybamm-bench repo
Expand Down

0 comments on commit bb6fc9b

Please sign in to comment.