Skip to content

Commit cccefb8

Browse files
#1100 merge develop
2 parents af295f3 + e71a200 commit cccefb8

File tree

245 files changed

+5553
-3620
lines changed

Some content is hidden

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

245 files changed

+5553
-3620
lines changed

.all-contributorsrc

+35-3
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@
290290
"avatar_url": "https://avatars.githubusercontent.com/u/64051212?v=4",
291291
"profile": "https://github.com/priyanshuone6",
292292
"contributions": [
293-
"test"
293+
"test",
294+
"code",
295+
"bug"
294296
]
295297
},
296298
{
@@ -312,7 +314,8 @@
312314
"profile": "https://github.com/Saransh-cpp",
313315
"contributions": [
314316
"code",
315-
"test"
317+
"test",
318+
"doc"
316319
]
317320
},
318321
{
@@ -321,7 +324,36 @@
321324
"avatar_url": "https://avatars.githubusercontent.com/u/10965193?v=4",
322325
"profile": "https://github.com/DavidMStraub",
323326
"contributions": [
324-
"bug"
327+
"bug",
328+
"code"
329+
]
330+
},
331+
{
332+
"login": "maurosgroi",
333+
"name": "maurosgroi",
334+
"avatar_url": "https://avatars.githubusercontent.com/u/37576773?v=4",
335+
"profile": "https://github.com/maurosgroi",
336+
"contributions": [
337+
"ideas"
338+
]
339+
},
340+
{
341+
"login": "asinghgaba",
342+
"name": "Amarjit Singh Gaba",
343+
"avatar_url": "https://avatars.githubusercontent.com/u/77078706?v=4",
344+
"profile": "https://github.com/asinghgaba",
345+
"contributions": [
346+
"code"
347+
]
348+
},
349+
{
350+
"login": "KennethNwanoro",
351+
"name": "KennethNwanoro",
352+
"avatar_url": "https://avatars.githubusercontent.com/u/78538806?v=4",
353+
"profile": "https://github.com/KennethNwanoro",
354+
"contributions": [
355+
"code",
356+
"test"
325357
]
326358
}
327359
],

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Fixes # (issue)
66

77
## Type of change
88

9-
Please add a line in the relevant section of [CHANGELOG.md](https://github.com/pybamm-team/PyBaMM/blob/master/CHANGELOG.md) to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
9+
Please add a line in the relevant section of [CHANGELOG.md](https://github.com/pybamm-team/PyBaMM/blob/develop/CHANGELOG.md) to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
1010

1111
- [ ] New feature (non-breaking change which adds functionality)
1212
- [ ] Optimization (back-end change that speeds up the code)

.github/workflows/benchmark_on_PR.yml .github/workflows/benchmark_on_push.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ jobs:
1515
run: pip install -U pip virtualenv asv
1616
- name: Fetch base branch
1717
run: |
18-
git fetch origin $GITHUB_BASE_REF:$GITHUB_BASE_REF
19-
git fetch origin $GITHUB_HEAD_REF:$GITHUB_HEAD_REF
18+
# This workflow also runs for merge commits
19+
# on develop. In this case, we don't want to be
20+
# fetching the develop branch.
21+
current_branch=$(git rev-parse --abbrev-ref HEAD)
22+
if [ $current_branch != "develop" ]; then
23+
git fetch origin develop:develop
24+
fi
2025
- name: Run benchmarks
2126
run: |
2227
asv machine --machine "GitHubRunner"

.github/workflows/build_wheels.yml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: main
6+
workflow_dispatch:
7+
inputs:
8+
target:
9+
description: 'Deployment target. Can be "pypi" or "testpypi"'
10+
default: 'pypi'
11+
12+
jobs:
13+
build_wheels:
14+
name: Build wheels on ${{ matrix.os }}
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [macOS-10.15, ubuntu-20.04, windows-2019]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
# Used to host cibuildwheel
24+
- uses: actions/setup-python@v2
25+
26+
- name: Install cibuildwheel
27+
run: python -m pip install cibuildwheel==1.9.0
28+
29+
- name: Install sundials on macOS
30+
if: matrix.os == 'macOS-10.15'
31+
run: |
32+
brew update
33+
brew install sundials
34+
35+
- name: Clone pybind11 repo
36+
run: git clone https://github.com/pybind/pybind11.git
37+
38+
- name: Build wheels on manylinux and macos
39+
if: matrix.os != 'windows-2019'
40+
run: python -m cibuildwheel --output-dir wheelhouse
41+
env:
42+
CIBW_BEFORE_ALL_LINUX: "bash build_manylinux_wheels/install_sundials.sh 5.8.1 5.7.0"
43+
CIBW_BEFORE_BUILD_LINUX: "python -m pip install cmake"
44+
45+
- name: Build wheels on windows
46+
if: matrix.os == 'windows-2019'
47+
run: |
48+
python -m pip install wheel
49+
python -m pip wheel --no-deps --wheel-dir wheelhouse .
50+
51+
- uses: actions/upload-artifact@v2
52+
with:
53+
name: wheels
54+
path: ./wheelhouse/*.whl
55+
56+
57+
publish-pypi:
58+
name: Upload wheels to PyPI
59+
needs: build_wheels
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Download wheels
63+
uses: actions/download-artifact@v1
64+
with:
65+
name: wheels
66+
67+
- name: Publish wheels on PyPI
68+
if: github.events.inputs.target == 'pypi'
69+
uses: pypa/gh-action-pypi-publish@master
70+
with:
71+
user: __token__
72+
password: ${{ secrets.PYPI_TOKEN }}
73+
packages_dir: wheels/
74+
75+
- name: Publish wheels on TestPyPI
76+
if: github.events.inputs.target == 'testpypi'
77+
uses: pypa/gh-action-pypi-publish@master
78+
with:
79+
user: __token__
80+
password: ${{ secrets.TESTPYPI_TOKEN }}
81+
packages_dir: wheels/
82+
repository_url: https://test.pypi.org/legacy/

.github/workflows/build_wheels_and_publish.yml

-72
This file was deleted.

.github/workflows/periodic_benchmarks.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
# Everyday at 3 am UTC
1212
schedule:
1313
- cron: "0 3 * * *"
14+
# Make it possible to trigger the
15+
# workflow manually
16+
workflow_dispatch:
17+
1418
jobs:
1519
benchmarks:
1620
runs-on: ubuntu-latest
@@ -22,12 +26,6 @@ jobs:
2226
python-version: 3.8
2327
- name: Install tox and asv
2428
run: pip install -U pip tox asv
25-
- name: Fetch develop branch
26-
# Not required when worklow trigerred
27-
# on develop, but useful when
28-
# experimenting/developing on another one.
29-
run: |
30-
git fetch origin develop:develop
3129
- name: Run benchmarks
3230
run: |
3331
asv machine --machine "GitHubRunner"
@@ -60,10 +58,13 @@ jobs:
6058
name: asv_new_results
6159
path: new_results
6260
- name: Copy new results and push to pybamm-bench repo
61+
env:
62+
PUSH_BENCH_EMAIL: ${{ secrets.PUSH_BENCH_EMAIL }}
63+
PUSH_BENCH_NAME: ${{ secrets.PUSH_BENCH_NAME }}
6364
run: |
6465
cp -vr new_results/* results
65-
git config --global user.email ${{ secrets.PUSH_BENCH_EMAIL }}
66-
git config --global user.name ${{ secrets.PUSH_BENCH_NAME }}
66+
git config --global user.email "$PUSH_BENCH_EMAIL"
67+
git config --global user.name "$PUSH_BENCH_NAME"
6768
git add results
6869
git commit -am "Add new results"
6970
git push

.github/workflows/test_on_push.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
os: [ubuntu-latest, macos-latest, windows-latest]
35-
python-version: [3.6, 3.7, 3.8]
35+
python-version: [3.7, 3.8, 3.9]
3636

3737
steps:
3838
- uses: actions/checkout@v2
@@ -45,7 +45,6 @@ jobs:
4545
if: matrix.os == 'ubuntu-latest'
4646
run: |
4747
sudo apt install gfortran gcc libopenblas-dev graphviz
48-
sudo apt install python${{ matrix.python-version }}.dev
4948
5049
- name: Install MacOS system dependencies
5150
if: matrix.os == 'macos-latest'
@@ -84,10 +83,10 @@ jobs:
8483
run: tox -e examples
8584

8685
- name: Install and run coverage
87-
if: success() && (matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7)
86+
if: success() && (matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9)
8887
run: tox -e coverage
8988

9089
- name: Upload coverage report
91-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7
90+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
9291
uses: codecov/codecov-action@v1
9392

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Update parameter_sets.py docstring
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
paths:
8+
- 'pybamm/parameters/parameter_sets.py'
9+
- 'pybamm/parameters/CITATIONS.txt'
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: [3.8]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install wheel
29+
pip install --editable .
30+
pip install pybtex
31+
- name: Update docstring
32+
run: python pybamm/parameters/update_parameter_sets_doc.py
33+
- name: Create Pull Request
34+
uses: peter-evans/create-pull-request@v3
35+
with:
36+
delete-branch: true
37+
branch-suffix: short-commit-hash
38+
commit-message: update parameter_sets docstring
39+
title: Update parameter_sets.py docstring
40+
body: |
41+
Update docstring of parameter_sets.py
42+
43+
Auto-generated pull request

0 commit comments

Comments
 (0)