-
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.
- Loading branch information
Showing
48 changed files
with
3,194 additions
and
2,699 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[run] | ||
branch = true | ||
omit = */BOUT-dev/* | ||
|
||
[report] | ||
exclude_lines = | ||
if __name__ == .__main__.: | ||
omit = | ||
*/tests/* | ||
*/docs/* |
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,42 @@ | ||
name: Lint | ||
|
||
on: | ||
# Run each time we push and pull requests | ||
push: | ||
pull_request: | ||
# Cron job | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule | ||
schedule: | ||
# https://crontab.guru/#0_0_1_*_* | ||
- cron: "0 0 1 * *" | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Use the v2 tag of: https://github.com/actions/checkout | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
# Use the v2 tag of: https://github.com/actions/setup-python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
# https://github.com/PyCQA/pylint/issues/352 | ||
# pylint need the requirements to do the checks as the pre-commit repo is local | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade pre-commit | ||
pip install . | ||
- name: Lint | ||
run: pre-commit run --all-files |
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,51 @@ | ||
name: Test | ||
|
||
on: | ||
# Run each time we push and pull requests | ||
push: | ||
pull_request: | ||
# Cron job | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule | ||
schedule: | ||
# https://crontab.guru/#0_0_1_*_* | ||
- cron: "0 0 1 * *" | ||
|
||
jobs: | ||
# As we are running on different environments, we are splitting the jobs | ||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobs | ||
local: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: [3.7, 3.8] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup prerequisites | ||
run: | ||
sudo apt update && sudo apt install -y libhdf5-serial-dev netcdf-bin | ||
libnetcdf-dev libsm6 libxext6 libxrender-dev libxt6 libgl1-mesa-glx | ||
libfontconfig libxkbcommon-x11-0 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install setuptools_scm pytest-cov | ||
pip install . | ||
- name: Test local run | ||
run: | | ||
pytest --cov=./ | ||
- name: Upload to codecov | ||
run: | | ||
pip install codecov | ||
codecov |
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 |
---|---|---|
|
@@ -126,4 +126,3 @@ dmypy.json | |
.DS_Store | ||
.idea/ | ||
*.sw[po] | ||
|
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,29 @@ | ||
# NOTE: The versions can be updated by calling | ||
# pre-commit autoupdate | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 20.8b1 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
|
||
- repo: https://github.com/prettier/pre-commit | ||
rev: 57f39166b5a5a504d6808b87ab98d41ebf095b46 | ||
hooks: | ||
- id: prettier | ||
args: [--prose-wrap=always, --print-width=88] | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.7.0 | ||
hooks: | ||
- id: isort |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.