Skip to content

Commit

Permalink
Merge pull request #3047 from pybamm-team/v23.5
Browse files Browse the repository at this point in the history
Make release v23.5
  • Loading branch information
brosaplanella authored Jul 3, 2023
2 parents 563a73f + ad882c3 commit d3c6bc6
Show file tree
Hide file tree
Showing 194 changed files with 4,031 additions and 5,084 deletions.
36 changes: 33 additions & 3 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
"login": "wigging",
"name": "Gavin Wiggins",
"avatar_url": "https://avatars.githubusercontent.com/u/6828967?v=4",
"profile": "https://gavinw.me",
"profile": "https://wigging.me",
"contributions": [
"bug",
"code"
Expand Down Expand Up @@ -570,7 +570,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/31622972?v=4",
"profile": "https://aniketsinghrawat.vercel.app/",
"contributions": [
"code"
"code",
"doc"
]
},
{
Expand Down Expand Up @@ -611,6 +612,34 @@
"contributions": [
"infra"
]
},
{
"login": "chenzhao-py",
"name": "CHEN ZHAO",
"avatar_url": "https://avatars.githubusercontent.com/u/75906533?v=4",
"profile": "https://github.com/chenzhao-py",
"contributions": [
"bug"
]
},
{
"login": "darryl-ad",
"name": "darryl-ad",
"avatar_url": "https://avatars.githubusercontent.com/u/91731499?v=4",
"profile": "https://www.aboutenergy.io/",
"contributions": [
"code",
"bug"
]
},
{
"login": "julian-evers",
"name": "julian-evers",
"avatar_url": "https://avatars.githubusercontent.com/u/133691040?v=4",
"profile": "https://github.com/julian-evers",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand All @@ -619,5 +648,6 @@
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true,
"commitConvention": "angular"
"commitConvention": "angular",
"commitType": "docs"
}
6 changes: 5 additions & 1 deletion .github/workflows/benchmark_on_push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Run benchmarks on push
on:
push:
pull_request:

jobs:
benchmarks:
Expand All @@ -26,8 +27,11 @@ jobs:
# on develop. In this case, we don't want to be
# fetching the develop branch.
current_branch=$(git rev-parse --abbrev-ref HEAD)
# This workflow should also run on forks; hence,
# we should fetch the upstream develop branch.
git remote add upstream https://github.com/pybamm-team/PyBaMM/
if [ $current_branch != "develop" ]; then
git fetch origin develop:develop
git fetch upstream develop:develop
fi
- name: Run benchmarks
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/need_reply_remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
runs-on: ubuntu-latest
if: |
github.event.comment.author_association != 'OWNER' &&
github.event.comment.author_association != 'COLLABORATOR'
github.event.comment.author_association != 'COLLABORATOR' &&
github.repository-owner == 'pybamm-team'
steps:
- name: Remove needs-reply label
uses: octokit/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/needs_reply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: github.repository-owner == 'pybamm-team'
steps:
- name: Close old issues that need reply
uses: dwieeb/needs-reply@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/periodic_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Linux system dependencies
run: |
sudo apt-get update
sudo apt install gfortran gcc libopenblas-dev
sudo apt-get install gfortran gcc libopenblas-dev
- name: Install python dependencies
run: |
python -m pip install --upgrade pip wheel setuptools virtualenv asv wget cmake casadi numpy
Expand Down
43 changes: 32 additions & 11 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
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

jobs:
build_windows_wheels:
Expand All @@ -20,10 +25,10 @@ jobs:
python-version: 3.8

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==1.9.0
run: python -m pip install cibuildwheel==2.12.3

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

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

# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}

- name: Build 64 bits wheels on Windows
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
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'
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'
CIBW_ARCHS: "AMD64"

- name: Upload windows wheels
Expand All @@ -70,12 +80,12 @@ jobs:
python-version: 3.8

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==1.9.0
run: python -m pip install cibuildwheel==2.12.3

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

- name: Install sundials on macOS
- name: Install SUNDIALS on macOS
if: matrix.os == 'macos-latest'
run: |
# https://github.com/actions/virtual-environments/issues/1280
Expand All @@ -85,19 +95,30 @@ jobs:
rm -f /usr/local/bin/python3*
brew update
brew reinstall gcc
brew install libomp
python -m pip install cmake wget
python scripts/install_KLU_Sundials.py
- name: Build wheels on Linux and MacOS
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_ALL_LINUX: "bash build_manylinux_wheels/install_sundials.sh 5.8.1 5.7.0"
# TODO: openblas no longer available on centos 7 i686 image, use blas instead for now
CIBW_BEFORE_ALL_LINUX: >
yum -y install blas-devel lapack-devel &&
bash build_manylinux_wheels/install_sundials.sh 5.8.1 6.5.0
CIBW_BEFORE_BUILD_LINUX: "python -m pip install cmake casadi numpy"
CIBW_BEFORE_BUILD_MACOS: "python -m pip install cmake casadi numpy && python scripts/fix_casadi_rpath_mac.py"
CIBW_BEFORE_BUILD_MACOS: >
python -m pip
install cmake casadi numpy &&
python scripts/fix_casadi_rpath_mac.py &&
scripts/fix_suitesparse_rpath_mac.sh
# got error "re.error: multiple repeat at position 104" on python 3.7 when --require-archs added, so remove
# it for mac
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel}"
CIBW_SKIP: pp*
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
delocate-listdeps {wheel} &&
delocate-wheel -v -w {dest_dir} {wheel}
CIBW_SKIP: "pp* *musllinux*"

- name: Upload wheels
uses: actions/upload-artifact@v3
Expand Down
131 changes: 131 additions & 0 deletions .github/workflows/run_periodic_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Run all unit tests and integration tests for all Python versions
# and platforms at 3am UTC every day and on PRs to the main branch
name: Scheduled

on:
workflow_dispatch:
pull_request:
branches:
- main

# Run everyday at 3 am UTC
schedule:
- cron: "0 3 * * *"

jobs:
pre_job:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: "never"
cancel_others: "true"
paths_ignore: '["**/README.md"]'

style:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Check style
run: |
python -m pip install pre-commit
pre-commit run ruff
build:
needs: style
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Linux system dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt install gfortran gcc libopenblas-dev graphviz
sudo apt install texlive-full
# Added fixes to homebrew installs:
# rm -f /usr/local/bin/2to3
# (see https://github.com/actions/virtual-environments/issues/2322)
- name: Install MacOS system dependencies
if: matrix.os == 'macos-latest'
run: |
rm -f /usr/local/bin/2to3*
rm -f /usr/local/bin/idle3*
rm -f /usr/local/bin/pydoc3*
rm -f /usr/local/bin/python3*
brew update
brew install graphviz
brew install openblas
- name: Install Windows system dependencies
if: matrix.os == 'windows-latest'
run: choco install graphviz --version=2.38.0.20190211

- name: Install standard python dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install "tox<4"
- name: Install SuiteSparse and Sundials
if: matrix.os == 'ubuntu-latest'
run: tox -e pybamm-requires

- name: Run unit tests for GNU/Linux with Python 3.8, 3.9, and 3.10
if: matrix.os == 'ubuntu-latest' && matrix.python-version != 3.11
run: python -m tox -e unit

- name: Run unit tests for GNU/Linux with Python 3.11 and generate coverage report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11
run: python -m tox -e coverage

- name: Upload coverage report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11
uses: codecov/[email protected]

- name: Run integration tests for GNU/Linux
if: matrix.os == 'ubuntu-latest'
run: python -m tox -e integration

- name: Run unit tests for Windows and MacOS
if: matrix.os != 'ubuntu-latest'
run: python -m tox -e mac-windows-unit

- name: Run integration tests for Windows and MacOS
if: matrix.os != 'ubuntu-latest'
run: python -m tox -e mac-windows-integration

- name: Install docs dependencies and run doctests
if: matrix.os == 'ubuntu-latest'
run: tox -e doctests

- name: Install dev dependencies and run example tests
if: matrix.os == 'ubuntu-latest'
run: tox -e examples

- name: Install scikits.odes and test pybamm_install_odes
if: matrix.os == 'ubuntu-latest'
run: |
tox -e odes
Loading

0 comments on commit d3c6bc6

Please sign in to comment.