Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjrobins committed Mar 11, 2022
2 parents 2ad4aa1 + 804ea24 commit e39ec59
Show file tree
Hide file tree
Showing 201 changed files with 3,494 additions and 3,291 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,15 @@
"contributions": [
"code"
]
},
{
"login": "KAschad",
"name": "KAschad",
"avatar_url": "https://avatars.githubusercontent.com/u/93784399?v=4",
"profile": "https://github.com/KAschad",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 7,
Expand Down
27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: input
id: PyBaMM-version
attributes:
label: PyBaMM Version
description: What version of PyBaMM are you running?
placeholder: PyBaMM version
validations:
required: true
- type: input
id: python-version
attributes:
label: Python Version
description: What version of python are you running?
placeholder: python version
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to Reproduce
description: Tell us how to reproduce this behaviour. Ideally, this should take the form of a [Minimum Workable Example](https://stackoverflow.com/help/minimal-reproducible-example)
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: I'm unsure where to go
url: https://www.pybamm.org/contact
about: If you are unsure where to go, then joining our chat is recommended; Just ask!
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Feature Request
description: Suggest an idea for this project
labels: ["feature"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this form!
- type: textarea
id: description
attributes:
label: Description
description: Explanation of the feature.
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why are we doing this? What use cases does it support? What is the expected outcome?
- type: textarea
id: implementation
attributes:
label: Possible Implementation
description: Suggest an idea for implementing the addition or change.
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
16 changes: 10 additions & 6 deletions .github/release_checklist.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
- Increment version number in
- `pybamm/version`
- `docs/conf.py`
- `CITATION.cff`
- `vcpkg.json`
- Update CHANGELOG.md with a summary of the release
- Run `scripts/update_version.py` to
- Increment version number in
- `pybamm/version.py`
- `docs/conf.py`
- `CITATION.cff`
- `vcpkg.json`
- Update baseline of registries in `vcpkg-configuration.json` as the latest commit id from [pybamm-team/sundials-vcpkg-registry](https://github.com/pybamm-team/sundials-vcpkg-registry)
- Update `CHANGELOG.md` with a summary of the release

- Update jax and jaxlib to latest version in `pybamm.util` and fix any bugs that arise
- If building wheels on Windows gives a `vcpkg` related error - revert the baseline of default-registry to a stable commit in `vcpkg-configuration.json`
22 changes: 14 additions & 8 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ jobs:
CIBW_BEFORE_ALL_LINUX: "bash build_manylinux_wheels/install_sundials.sh 5.8.1 5.7.0"
CIBW_BEFORE_BUILD_LINUX: "python -m pip install cmake"

# see https://github.com/pybamm-team/PyBaMM/pull/1930
- name: Install the latest version of vcpkg on windows
if: matrix.os == 'windows-latest'
run: |
cd C:\
rm -r -fo 'C:\vcpkg'
git clone https://github.com/microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
- name: Cache packages installed through vcpkg on windows
if: matrix.os == 'windows-latest'
uses: actions/cache@v2
Expand All @@ -50,16 +60,12 @@ jobs:
path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}

- name: Build 32 bits wheels on Windows
if: matrix.os == 'windows-latest'
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ENVIRONMENT: "PYBAMM_USE_VCPKG=ON VCPKG_ROOT_DIR=$VCPKG_INSTALLATION_ROOT VCPKG_DEFAULT_TRIPLET=x86-windows-static VCPKG_FEATURE_FLAGS=manifests,registries CMAKE_GENERATOR=\"Visual Studio 16 2019\" CMAKE_GENERATOR_PLATFORM=Win32"
CIBW_ARCHS: "x86"

- name: Build 64 bits wheels on Windows
if: matrix.os == 'windows-latest'
run: python -m cibuildwheel --output-dir wheelhouse
run: |
choco install --yes visualstudio2019community
choco install --yes visualstudio2019-workload-nativedesktop
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ENVIRONMENT: "PYBAMM_USE_VCPKG=ON VCPKG_ROOT_DIR=$cd/vcpkg VCPKG_DEFAULT_TRIPLET=x64-windows-static VCPKG_FEATURE_FLAGS=manifests,registries CMAKE_GENERATOR=\"Visual Studio 16 2019\" CMAKE_GENERATOR_PLATFORM=x64"
CIBW_ARCHS: "AMD64"
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Create GitHub release

on:
push:
branches: main
workflow_dispatch:

jobs:
create-release:
# This workflow is only of value to PyBaMM and would always be skipped in forks
if: github.repository_owner == 'pybamm-team'
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2

- name: Get current date
run: |
echo "VERSION=$(date +'v%y.%-m')" >> $GITHUB_ENV
echo "TODAY=$(date +'%d')" >> $GITHUB_ENV
- name: Fail the job if date < 20
if: ${{ env.TODAY }} < 20
uses: actions/github-script@v5
with:
script: core.setFailed('This workflow should be triggered only at the end of the month, or else it will create a release for the wrong month.')

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install wheel
pip install --editable .
- name: Get Changelog
run: python -c "from scripts.update_version import get_changelog; get_changelog()"

- name: Create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
body_path: CHANGELOG.md
10 changes: 5 additions & 5 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: tox -e pybamm-requires

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

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

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

- name: Run integration tests for GNU/Linux
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/update_license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Update copyright year(s)

on:
# Manual trigger
workflow_dispatch:
# Every January 1st at 3am GMT
schedule:
- cron: "0 3 1 1 *"

jobs:
license:
# This workflow is only of value to PyBaMM and would always be skipped in forks
if: github.repository_owner == 'pybamm-team'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Update year in license
uses: FantasticFiasco/action-update-license-year@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: LICENSE.txt

docs:
# This workflow is only of value to PyBaMM and would always be skipped in forks
if: github.repository_owner == 'pybamm-team'
needs: license
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Update year in docs
uses: FantasticFiasco/action-update-license-year@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: docs/conf.py
transform: (?<=copyright = ")(?<from>\d{4})?-?(\d{4})?
42 changes: 0 additions & 42 deletions .github/workflows/update_vcpkg_baseline.yml

This file was deleted.

Loading

0 comments on commit e39ec59

Please sign in to comment.