Skip to content

Commit

Permalink
Merge branch 'develop' into issue-2111-custom-transport-efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTranter committed Apr 29, 2024
2 parents 7f4c703 + 43ca3de commit eca0c9b
Show file tree
Hide file tree
Showing 259 changed files with 9,768 additions and 6,708 deletions.
47 changes: 44 additions & 3 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"files": [
"README.md"
"all_contributors.md"
],
"imageSize": 100,
"commit": false,
Expand Down Expand Up @@ -215,7 +215,8 @@
"profile": "https://github.com/jonchapman1",
"contributions": [
"ideas",
"fundingFinding"
"fundingFinding",
"doc"
]
},
{
Expand Down Expand Up @@ -772,7 +773,9 @@
"avatar_url": "https://avatars.githubusercontent.com/u/99216956?v=4",
"profile": "https://github.com/prady0t",
"contributions": [
"infra"
"infra",
"code",
"test"
]
},
{
Expand Down Expand Up @@ -815,6 +818,44 @@
"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"
]
},
{
"login": "lorenzofavaro",
"name": "Lorenzo",
"avatar_url": "https://avatars.githubusercontent.com/u/44714920?v=4",
"profile": "https://github.com/lorenzofavaro",
"contributions": [
"code",
"test",
"doc"
]
},
{
"login": "AndyLiuElysia",
"name": "AndyLiuElysia",
"avatar_url": "https://avatars.githubusercontent.com/u/143705453?v=4",
"profile": "https://github.com/AndyLiuElysia",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ a63e49ece0f9336d1f5c2562f7459e555c6e6693
ff6d81c01331c7d269303b4a8321d9881bdf98fa
# migrated to ruff-format - https://github.com/pybamm-team/PyBaMM/pull/3655
60ebd4148059a95428a496f4f55c1175ead362d3
# implemented cleaner string formatting via f-strings - https://github.com/pybamm-team/PyBaMM/pull/3890
f395819d1c874071b7e76e32ec4f0bbe42462b48
2 changes: 0 additions & 2 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
ignore:
- pybamm/install_odes.py
5 changes: 2 additions & 3 deletions .github/workflows/benchmark_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Run benchmarks on push
on:
push:
branches: [main, develop]
pull_request:

concurrency:
# Cancel intermediate builds always
Expand All @@ -14,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install Linux system dependencies
run: |
Expand Down
27 changes: 4 additions & 23 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ on:
- develop

jobs:
build_docker_images:
build_docker_image:
# This workflow is only of value to PyBaMM and would always be skipped in forks
if: github.repository_owner == 'pybamm-team'
name: Image (${{ matrix.build-args }})
name: Build image
runs-on: ubuntu-latest
strategy:
matrix:
build-args: ["No solvers", "JAX", "ODES", "IDAKLU", "ALL"]
fail-fast: true

steps:
- name: Checkout
Expand All @@ -33,27 +29,12 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create tags for Docker images based on build-time arguments
id: tags
run: |
if [ "${{ matrix.build-args }}" = "No solvers" ]; then
echo "tag=latest" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.build-args }}" = "JAX" ]; then
echo "tag=jax" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.build-args }}" = "ODES" ]; then
echo "tag=odes" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.build-args }}" = "IDAKLU" ]; then
echo "tag=idaklu" >> "$GITHUB_OUTPUT"
elif [ "${{ matrix.build-args }}" = "ALL" ]; then
echo "tag=all" >> "$GITHUB_OUTPUT"
fi
- name: Build and push Docker image to Docker Hub (${{ matrix.build-args }})
- name: Build and push Docker image to Docker Hub
uses: docker/build-push-action@v5
with:
context: .
file: scripts/Dockerfile
tags: pybamm/pybamm:${{ steps.tags.outputs.tag }}
tags: pybamm/pybamm:latest
push: true
platforms: linux/amd64, linux/arm64

Expand Down
5 changes: 3 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.9.1
uses: lycheeverse/lychee-action@v1.9.3
with:
# arguments with file types to check
args: >-
Expand All @@ -47,6 +47,7 @@ jobs:
--exclude-path ./scripts/update_version.py
--exclude-path asv.conf.json
--exclude-path docs/conf.py
--exclude-path all_contributors.md
'./**/*.rst'
'./**/*.md'
'./**/*.py'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/need_reply_remove.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Remove needs-reply label

on:
schedule:
- cron: '0 3 * * 1'
issue_comment:
types:
- created
Expand All @@ -11,7 +13,8 @@ jobs:
if: |
github.event.comment.author_association != 'OWNER' &&
github.event.comment.author_association != 'COLLABORATOR' &&
github.repository_owner == 'pybamm-team'
github.repository_owner == 'pybamm-team' &&
github.event_name != 'pull_request'
steps:
- name: Remove needs-reply label
uses: octokit/request-action@v2.x
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/periodic_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# - Publish website
name: Benchmarks
on:
# Everyday at 3 am UTC
# Every day at 3 am UTC
schedule:
- cron: "0 3 * * *"
# Make it possible to trigger the
Expand All @@ -21,10 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install Linux system dependencies
run: |
Expand Down Expand Up @@ -52,16 +52,18 @@ jobs:
with:
name: asv_periodic_results
path: results
if-no-files-found: error

publish-results:
if: github.repository == 'pybamm-team/PyBaMM'
name: Push and publish results
needs: benchmarks
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Install asv
run: pip install asv
Expand All @@ -72,18 +74,17 @@ jobs:
repository: pybamm-team/pybamm-bench
token: ${{ secrets.BENCH_PAT }}

- name: Download results artifact
- name: Download results artifact(s)
uses: actions/download-artifact@v4
with:
name: asv_periodic_results
path: new_results
path: results
merge-multiple: true

- name: Copy new results and push to pybamm-bench repo
env:
PUSH_BENCH_EMAIL: ${{ secrets.PUSH_BENCH_EMAIL }}
PUSH_BENCH_NAME: ${{ secrets.PUSH_BENCH_NAME }}
run: |
cp -vr new_results/* results
git config --global user.email "$PUSH_BENCH_EMAIL"
git config --global user.name "$PUSH_BENCH_NAME"
git add results
Expand Down

0 comments on commit eca0c9b

Please sign in to comment.