Skip to content

Commit

Permalink
Merge changes from develop
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Sep 28, 2023
2 parents 1e164ae + fc570af commit 587c3bd
Show file tree
Hide file tree
Showing 132 changed files with 6,234 additions and 2,918 deletions.
23 changes: 23 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,29 @@
"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"
]
}
],
"contributorsPerLine": 7,
Expand Down
14 changes: 0 additions & 14 deletions .github/release_checklist.md

This file was deleted.

9 changes: 9 additions & 0 deletions .github/release_reminder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Create {{ date | date('YY.MM') }} (final or rc0) release
---
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](./release_workflow.md) for more information.
74 changes: 74 additions & 0 deletions .github/release_workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 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 `YY.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 `YY.MM`.

2. Create a new GitHub _pre-release_ with the tag `YY.MMrc0` from the `YY.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 `YY.MM` (no new features should be added to `YY.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 `YY.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 branch `YY.MM`.

4. Create a new GitHub _pre-release_ with the same tag (`YY.MMrcX`) from the `YY.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 `YY.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 branch `YY.MM`.

3. Next, a PR from `YY.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
5 changes: 3 additions & 2 deletions .github/workflows/benchmark_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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:
Expand All @@ -23,8 +23,9 @@ jobs:
sudo apt-get update
sudo apt install gfortran gcc libopenblas-dev
- name: Install python dependencies
# Pin asv==0.5.1 to fix failing benchmarks. Related to https://github.com/airspeed-velocity/asv/issues/1323
run: |
python -m pip install --upgrade pip wheel setuptools virtualenv asv wget cmake casadi numpy
python -m pip install --upgrade pip wheel setuptools virtualenv asv==0.5.1 wget cmake casadi numpy
- name: Install SuiteSparse and Sundials
run: python scripts/install_KLU_Sundials.py
- name: Fetch base branch
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/create_release.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/lychee_url_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
restore-keys: cache-lychee-

# check URLs with Lychee
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# use stable version for now to avoid breaking changes
- name: Lychee URL checker
Expand All @@ -46,6 +46,7 @@ jobs:
--exclude-path ./CHANGELOG.md
--exclude-path ./scripts/update_version.py
--exclude-path asv.conf.json
--exclude-path docs/conf.py
'./**/*.rst'
'./**/*.md'
'./**/*.py'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/periodic_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Install asv
run: pip install asv
- name: Checkout pybamm-bench repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pybamm-team/pybamm-bench
token: ${{ secrets.BENCH_PAT }}
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ name: Test building wheels
# Temporarily disable publishing to PyPI and enable
# building wheels on pull requests
on:
# push:
# branches: main
release:
types: [published]
pull_request:
workflow_dispatch:
inputs:
# target:
# description: 'Deployment target. Can be "pypi" or "testpypi"'
# default: "pypi"
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

jobs:
build_windows_wheels:
name: Build wheels on windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8
Expand Down Expand Up @@ -125,15 +125,12 @@ jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: 3.8

- name: Install dependencies
run: pip install wheel
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release_reminder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Create a release reminder

on:
schedule:
# Run at 10 am UTC on days-of-month 1 and 28 in January, May, and September.
- cron: "0 10 1,28 1,5,9 *"

permissions:
contents: read
issues: write

jobs:
remind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/release_reminder.md
4 changes: 2 additions & 2 deletions .github/workflows/run_benchmarks_over_history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ 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:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Install asv
run: pip install asv
- name: Checkout pybamm-bench repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pybamm-team/pybamm-bench
token: ${{ secrets.BENCH_PAT }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/run_periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
Expand All @@ -48,7 +48,7 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -99,6 +99,10 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: pipx run nox -s examples

- name: Run example scripts tests
if: matrix.os == 'ubuntu-latest'
run: nox -s scripts

#M-series Mac Mini
build-apple-mseries:
needs: style
Expand All @@ -111,7 +115,7 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install python & create virtualenv
shell: bash
run: |
Expand Down
Loading

0 comments on commit 587c3bd

Please sign in to comment.