Skip to content

Commit

Permalink
Merge branch 'pybamm-team:develop' into Saswatsusmoy-pybamm-team#3441-…
Browse files Browse the repository at this point in the history
…Call-processed-variables-with-custom-spatial-coordinates
  • Loading branch information
Saswatsusmoy committed Jan 29, 2024
2 parents 369034f + f23c3d4 commit 78a2ee6
Show file tree
Hide file tree
Showing 342 changed files with 13,487 additions and 11,610 deletions.
106 changes: 106 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,112 @@
"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"
]
},
{
"login": "AlessioBugetti",
"name": "Alessio Bugetti",
"avatar_url": "https://avatars.githubusercontent.com/u/38499721?v=4",
"profile": "https://github.com/AlessioBugetti",
"contributions": [
"infra",
"code",
"doc",
"test"
]
},
{
"login": "kawaMANMI",
"name": "kawaMANMI",
"avatar_url": "https://avatars.githubusercontent.com/u/39382602?v=4",
"profile": "https://github.com/kawaMANMI",
"contributions": [
"bug",
"code"
]
},
{
"login": "Akhil-Sharma30",
"name": "AKHIL SHARMA",
"avatar_url": "https://avatars.githubusercontent.com/u/68015525?v=4",
"profile": "http://akhilsharma.info",
"contributions": [
"doc"
]
},
{
"login": "HarshvirSandhu",
"name": "Harshvir Sandhu",
"avatar_url": "https://avatars.githubusercontent.com/u/75773763?v=4",
"profile": "https://github.com/HarshvirSandhu",
"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
Original file line number Diff line number Diff line change
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
34 changes: 34 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Automatically request reviews from maintainers

# Package
/pybamm/discretisations/ @martinjrobins @rtimms @tinosulzer
/pybamm/experiment/ @brosaplanella @martinjrobins @rtimms @tinosulzer @TomTranter
/pybamm/expression_tree/ @martinjrobins @rtimms @tinosulzer
/pybamm/geometry/ @martinjrobins @rtimms @tinosulzer
/pybamm/input/ @brosaplanella @DrSOKane @rtimms @tinosulzer @TomTranter @kratman
/pybamm/meshes/ @martinjrobins @rtimms @tinosulzer @rtimms
/pybamm/models/ @brosaplanella @DrSOKane @rtimms @tinosulzer @TomTranter @rtimms
/pybamm/parameters/ @brosaplanella @DrSOKane @rtimms @tinosulzer @TomTranter @rtimms @kratman
/pybamm/plotting/ @martinjrobins @rtimms @Saransh-cpp @tinosulzer @rtimms @kratman @agriyakhetarpal
/pybamm/solvers/ @martinjrobins @rtimms @tinosulzer @TomTranter @rtimms
/pybamm/spatial_methods/ @martinjrobins @rtimms @tinosulzer @rtimms
/pybamm/* @pybamm-team/maintainers # the files directly under /pybamm/, will not recurse

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

# Benchmarks
/benchmarks/ @brosaplanella @Saransh-cpp @agriyakhetarpal @arjxn-py

# Documentation
/docs/ @kratman @arjxn-py @agriyakhetarpal @Saransh-cpp

# Example scripts
/examples/ @kratman @agriyakhetarpal @Saransh-cpp

# Installation and other scripts
/scripts/ @martinjrobins @Saransh-cpp @agriyakhetarpal @kratman @arjxn-py

# Files in the root directory
/* @martinjrobins @Saransh-cpp @agriyakhetarpal @kratman @arjxn-py
/CHANGELOG.md # no owner (almost every PR edits the CHANGELOG)
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
21 changes: 11 additions & 10 deletions .github/release_workflow.md
Original file line number Diff line number Diff line change
@@ -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 -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
27 changes: 1 addition & 26 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ jobs:
echo "tag=all" >> "$GITHUB_OUTPUT"
fi
- name: Build and push Docker image to Docker Hub (no solvers)
if: matrix.build-args == 'No solvers'
- name: Build and push Docker image to Docker Hub (${{ matrix.build-args }})
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -58,29 +57,5 @@ jobs:
push: true
platforms: linux/amd64, linux/arm64

- name: Build and push Docker image to Docker Hub (with ODES and IDAKLU solvers)
if: matrix.build-args == 'ODES' || matrix.build-args == 'IDAKLU'
uses: docker/build-push-action@v5
with:
context: .
file: scripts/Dockerfile
tags: pybamm/pybamm:${{ steps.tags.outputs.tag }}
push: true
build-args: ${{ matrix.build-args }}=true
platforms: linux/amd64, linux/arm64

- name: Build and push Docker image to Docker Hub (with ALL and JAX solvers)
if: matrix.build-args == 'ALL' || matrix.build-args == 'JAX'
uses: docker/build-push-action@v5
with:
context: .
file: scripts/Dockerfile
tags: pybamm/pybamm:${{ steps.tags.outputs.tag }}
push: true
build-args: ${{ matrix.build-args }}=true
# exclude arm64 for JAX and ALL builds for now, see
# https://github.com/google/jax/issues/13608
platforms: linux/amd64

- name: List built image(s)
run: docker images
9 changes: 7 additions & 2 deletions .github/workflows/lychee_url_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

# cache Lychee results to avoid hitting rate limits
- name: Restore lychee cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
Expand All @@ -28,7 +28,7 @@ jobs:

# use stable version for now to avoid breaking changes
- name: Lychee URL checker
uses: lycheeverse/lychee-action@v1.8.0
uses: lycheeverse/lychee-action@v1.9.1
with:
# arguments with file types to check
args: >-
Expand All @@ -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
Original file line number Diff line number Diff line change
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 78a2ee6

Please sign in to comment.