forked from pybamm-team/PyBaMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pybamm-team:develop' into split_SOC_and_Vlimits
- Loading branch information
Showing
345 changed files
with
3,225 additions
and
5,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Remove needs-reply label | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event.comment.author_association != 'OWNER' && | ||
github.event.comment.author_association != 'COLLABORATOR' && | ||
github.repository-owner == 'pybamm-team' | ||
steps: | ||
- name: Remove needs-reply label | ||
uses: octokit/[email protected] | ||
continue-on-error: true | ||
with: | ||
route: DELETE /repos/:repository/issues/:issue/labels/:label | ||
repository: ${{ github.repository }} | ||
issue: ${{ github.event.issue.number }} | ||
label: needs-reply | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Close old issues that need reply | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
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 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-label: needs-reply |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# 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.10, and 3.11 | ||
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.9 and generate coverage report | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 | ||
run: python -m tox -e coverage | ||
|
||
- name: Upload coverage report | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 | ||
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 |
Oops, something went wrong.