Skip to content

Commit d3c6bc6

Browse files
Merge pull request #3047 from pybamm-team/v23.5
Make release v23.5
2 parents 563a73f + ad882c3 commit d3c6bc6

File tree

194 files changed

+4031
-5084
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+4031
-5084
lines changed

.all-contributorsrc

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@
441441
"login": "wigging",
442442
"name": "Gavin Wiggins",
443443
"avatar_url": "https://avatars.githubusercontent.com/u/6828967?v=4",
444-
"profile": "https://gavinw.me",
444+
"profile": "https://wigging.me",
445445
"contributions": [
446446
"bug",
447447
"code"
@@ -570,7 +570,8 @@
570570
"avatar_url": "https://avatars.githubusercontent.com/u/31622972?v=4",
571571
"profile": "https://aniketsinghrawat.vercel.app/",
572572
"contributions": [
573-
"code"
573+
"code",
574+
"doc"
574575
]
575576
},
576577
{
@@ -611,6 +612,34 @@
611612
"contributions": [
612613
"infra"
613614
]
615+
},
616+
{
617+
"login": "chenzhao-py",
618+
"name": "CHEN ZHAO",
619+
"avatar_url": "https://avatars.githubusercontent.com/u/75906533?v=4",
620+
"profile": "https://github.com/chenzhao-py",
621+
"contributions": [
622+
"bug"
623+
]
624+
},
625+
{
626+
"login": "darryl-ad",
627+
"name": "darryl-ad",
628+
"avatar_url": "https://avatars.githubusercontent.com/u/91731499?v=4",
629+
"profile": "https://www.aboutenergy.io/",
630+
"contributions": [
631+
"code",
632+
"bug"
633+
]
634+
},
635+
{
636+
"login": "julian-evers",
637+
"name": "julian-evers",
638+
"avatar_url": "https://avatars.githubusercontent.com/u/133691040?v=4",
639+
"profile": "https://github.com/julian-evers",
640+
"contributions": [
641+
"code"
642+
]
614643
}
615644
],
616645
"contributorsPerLine": 7,
@@ -619,5 +648,6 @@
619648
"repoType": "github",
620649
"repoHost": "https://github.com",
621650
"skipCi": true,
622-
"commitConvention": "angular"
651+
"commitConvention": "angular",
652+
"commitType": "docs"
623653
}

.github/workflows/benchmark_on_push.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Run benchmarks on push
22
on:
33
push:
4+
pull_request:
45

56
jobs:
67
benchmarks:
@@ -26,8 +27,11 @@ jobs:
2627
# on develop. In this case, we don't want to be
2728
# fetching the develop branch.
2829
current_branch=$(git rev-parse --abbrev-ref HEAD)
30+
# This workflow should also run on forks; hence,
31+
# we should fetch the upstream develop branch.
32+
git remote add upstream https://github.com/pybamm-team/PyBaMM/
2933
if [ $current_branch != "develop" ]; then
30-
git fetch origin develop:develop
34+
git fetch upstream develop:develop
3135
fi
3236
3337
- name: Run benchmarks

.github/workflows/need_reply_remove.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: |
1212
github.event.comment.author_association != 'OWNER' &&
13-
github.event.comment.author_association != 'COLLABORATOR'
13+
github.event.comment.author_association != 'COLLABORATOR' &&
14+
github.repository-owner == 'pybamm-team'
1415
steps:
1516
- name: Remove needs-reply label
1617
uses: octokit/[email protected]

.github/workflows/needs_reply.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10+
if: github.repository-owner == 'pybamm-team'
1011
steps:
1112
- name: Close old issues that need reply
1213
uses: dwieeb/needs-reply@v2

.github/workflows/periodic_benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install Linux system dependencies
2828
run: |
2929
sudo apt-get update
30-
sudo apt install gfortran gcc libopenblas-dev
30+
sudo apt-get install gfortran gcc libopenblas-dev
3131
- name: Install python dependencies
3232
run: |
3333
python -m pip install --upgrade pip wheel setuptools virtualenv asv wget cmake casadi numpy

.github/workflows/publish_pypi.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
target:
99
description: 'Deployment target. Can be "pypi" or "testpypi"'
1010
default: "pypi"
11+
debug_enabled:
12+
type: boolean
13+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
14+
required: false
15+
default: false
1116

1217
jobs:
1318
build_windows_wheels:
@@ -20,10 +25,10 @@ jobs:
2025
python-version: 3.8
2126

2227
- name: Install cibuildwheel
23-
run: python -m pip install cibuildwheel==1.9.0
28+
run: python -m pip install cibuildwheel==2.12.3
2429

2530
- name: Clone pybind11 repo (no history)
26-
run: git clone --depth 1 --branch v2.6.2 https://github.com/pybind/pybind11.git
31+
run: git clone --depth 1 --branch v2.10.4 https://github.com/pybind/pybind11.git
2732

2833
# remove when a new vcpkg version is released
2934
- name: Install the latest commit of vcpkg on windows
@@ -35,18 +40,23 @@ jobs:
3540
.\bootstrap-vcpkg.bat
3641
3742
- name: Cache packages installed through vcpkg on windows
38-
uses: actions/cache@v2
43+
uses: actions/cache@v3
3944
env:
4045
cache-name: vckpg_binary_cache
4146
with:
4247
path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
4348
key: ${{ runner.os }}-build-VS2022-${{ env.cache-name }}-${{ hashFiles('vcpkg*.json') }}
4449

50+
# Enable tmate debugging of manually-triggered workflows if the input option was provided
51+
- name: Setup tmate session
52+
uses: mxschmitt/action-tmate@v3
53+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
54+
4555
- name: Build 64 bits wheels on Windows
4656
run: |
4757
python -m cibuildwheel --output-dir wheelhouse
4858
env:
49-
CIBW_ENVIRONMENT: 'PYBAMM_USE_VCPKG=ON VCPKG_ROOT_DIR=$cd/vcpkg VCPKG_DEFAULT_TRIPLET=x64-windows-static-md VCPKG_FEATURE_FLAGS=manifests,registries CMAKE_GENERATOR="Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM=x64'
59+
CIBW_ENVIRONMENT: 'PYBAMM_USE_VCPKG=ON VCPKG_ROOT_DIR=C:\vcpkg VCPKG_DEFAULT_TRIPLET=x64-windows-static-md VCPKG_FEATURE_FLAGS=manifests,registries CMAKE_GENERATOR="Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM=x64'
5060
CIBW_ARCHS: "AMD64"
5161

5262
- name: Upload windows wheels
@@ -70,12 +80,12 @@ jobs:
7080
python-version: 3.8
7181

7282
- name: Install cibuildwheel
73-
run: python -m pip install cibuildwheel==1.9.0
83+
run: python -m pip install cibuildwheel==2.12.3
7484

7585
- name: Clone pybind11 repo (no history)
76-
run: git clone --depth 1 --branch v2.6.2 https://github.com/pybind/pybind11.git
86+
run: git clone --depth 1 --branch v2.10.4 https://github.com/pybind/pybind11.git
7787

78-
- name: Install sundials on macOS
88+
- name: Install SUNDIALS on macOS
7989
if: matrix.os == 'macos-latest'
8090
run: |
8191
# https://github.com/actions/virtual-environments/issues/1280
@@ -85,19 +95,30 @@ jobs:
8595
rm -f /usr/local/bin/python3*
8696
brew update
8797
brew reinstall gcc
98+
brew install libomp
8899
python -m pip install cmake wget
89100
python scripts/install_KLU_Sundials.py
90101
91102
- name: Build wheels on Linux and MacOS
92103
run: python -m cibuildwheel --output-dir wheelhouse
93104
env:
94-
CIBW_BEFORE_ALL_LINUX: "bash build_manylinux_wheels/install_sundials.sh 5.8.1 5.7.0"
105+
# TODO: openblas no longer available on centos 7 i686 image, use blas instead for now
106+
CIBW_BEFORE_ALL_LINUX: >
107+
yum -y install blas-devel lapack-devel &&
108+
bash build_manylinux_wheels/install_sundials.sh 5.8.1 6.5.0
109+
95110
CIBW_BEFORE_BUILD_LINUX: "python -m pip install cmake casadi numpy"
96-
CIBW_BEFORE_BUILD_MACOS: "python -m pip install cmake casadi numpy && python scripts/fix_casadi_rpath_mac.py"
111+
CIBW_BEFORE_BUILD_MACOS: >
112+
python -m pip
113+
install cmake casadi numpy &&
114+
python scripts/fix_casadi_rpath_mac.py &&
115+
scripts/fix_suitesparse_rpath_mac.sh
97116
# got error "re.error: multiple repeat at position 104" on python 3.7 when --require-archs added, so remove
98117
# it for mac
99-
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel}"
100-
CIBW_SKIP: pp*
118+
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
119+
delocate-listdeps {wheel} &&
120+
delocate-wheel -v -w {dest_dir} {wheel}
121+
CIBW_SKIP: "pp* *musllinux*"
101122

102123
- name: Upload wheels
103124
uses: actions/upload-artifact@v3
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Run all unit tests and integration tests for all Python versions
2+
# and platforms at 3am UTC every day and on PRs to the main branch
3+
name: Scheduled
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
branches:
9+
- main
10+
11+
# Run everyday at 3 am UTC
12+
schedule:
13+
- cron: "0 3 * * *"
14+
15+
jobs:
16+
pre_job:
17+
runs-on: ubuntu-latest
18+
# Map a step output to a job output
19+
outputs:
20+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
21+
steps:
22+
- id: skip_check
23+
uses: fkirc/skip-duplicate-actions@master
24+
with:
25+
# All of these options are optional, so you can remove them if you are happy with the defaults
26+
concurrent_skipping: "never"
27+
cancel_others: "true"
28+
paths_ignore: '["**/README.md"]'
29+
30+
style:
31+
needs: pre_job
32+
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v3
36+
- name: Setup python
37+
uses: actions/setup-python@v4
38+
with:
39+
python-version: 3.11
40+
41+
- name: Check style
42+
run: |
43+
python -m pip install pre-commit
44+
pre-commit run ruff
45+
46+
build:
47+
needs: style
48+
runs-on: ${{ matrix.os }}
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
os: [ubuntu-latest, macos-latest, windows-latest]
53+
python-version: ["3.8", "3.9", "3.10", "3.11"]
54+
55+
steps:
56+
- uses: actions/checkout@v3
57+
- name: Set up Python ${{ matrix.python-version }}
58+
uses: actions/setup-python@v4
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
62+
- name: Install Linux system dependencies
63+
if: matrix.os == 'ubuntu-latest'
64+
run: |
65+
sudo apt-get update
66+
sudo apt install gfortran gcc libopenblas-dev graphviz
67+
sudo apt install texlive-full
68+
69+
# Added fixes to homebrew installs:
70+
# rm -f /usr/local/bin/2to3
71+
# (see https://github.com/actions/virtual-environments/issues/2322)
72+
- name: Install MacOS system dependencies
73+
if: matrix.os == 'macos-latest'
74+
run: |
75+
rm -f /usr/local/bin/2to3*
76+
rm -f /usr/local/bin/idle3*
77+
rm -f /usr/local/bin/pydoc3*
78+
rm -f /usr/local/bin/python3*
79+
brew update
80+
brew install graphviz
81+
brew install openblas
82+
83+
- name: Install Windows system dependencies
84+
if: matrix.os == 'windows-latest'
85+
run: choco install graphviz --version=2.38.0.20190211
86+
87+
- name: Install standard python dependencies
88+
run: |
89+
python -m pip install --upgrade pip wheel setuptools
90+
python -m pip install "tox<4"
91+
92+
- name: Install SuiteSparse and Sundials
93+
if: matrix.os == 'ubuntu-latest'
94+
run: tox -e pybamm-requires
95+
96+
- name: Run unit tests for GNU/Linux with Python 3.8, 3.9, and 3.10
97+
if: matrix.os == 'ubuntu-latest' && matrix.python-version != 3.11
98+
run: python -m tox -e unit
99+
100+
- name: Run unit tests for GNU/Linux with Python 3.11 and generate coverage report
101+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11
102+
run: python -m tox -e coverage
103+
104+
- name: Upload coverage report
105+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11
106+
uses: codecov/[email protected]
107+
108+
- name: Run integration tests for GNU/Linux
109+
if: matrix.os == 'ubuntu-latest'
110+
run: python -m tox -e integration
111+
112+
- name: Run unit tests for Windows and MacOS
113+
if: matrix.os != 'ubuntu-latest'
114+
run: python -m tox -e mac-windows-unit
115+
116+
- name: Run integration tests for Windows and MacOS
117+
if: matrix.os != 'ubuntu-latest'
118+
run: python -m tox -e mac-windows-integration
119+
120+
- name: Install docs dependencies and run doctests
121+
if: matrix.os == 'ubuntu-latest'
122+
run: tox -e doctests
123+
124+
- name: Install dev dependencies and run example tests
125+
if: matrix.os == 'ubuntu-latest'
126+
run: tox -e examples
127+
128+
- name: Install scikits.odes and test pybamm_install_odes
129+
if: matrix.os == 'ubuntu-latest'
130+
run: |
131+
tox -e odes

0 commit comments

Comments
 (0)