-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github Actions system from climpred and xskillscore (#103)
* Add Github Actions system for CI * Removes Travis CI * Switches to CodeCov for coverage testing * Fixes bug with vectorize=True with new dask/xarray
- Loading branch information
Showing
43 changed files
with
792 additions
and
603 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,8 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
# Require 50% coverage. | ||
target: 50 | ||
patch: false | ||
changes: false |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: esmtools installs | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
install-esmtools: # Installs esmtools on various OS. | ||
name: Install esmtools, ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
python -c "import esmtools" |
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,44 @@ | ||
name: esmtools testing | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
test: # Runs testing suite on various python versions. | ||
name: Test esmtools, python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
- name: Set up conda | ||
uses: conda-incubator/setup-miniconda@v1 | ||
with: | ||
auto-update-conda: true | ||
channels: conda-forge | ||
mamba-version: '*' | ||
activate-environment: esmtools-minimum-tests | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up conda environment | ||
run: | | ||
mamba env update -f ci/requirements/minimum-tests.yml | ||
- name: Conda info | ||
run: conda info | ||
- name: Conda list | ||
run: conda list | ||
- name: Run tests | ||
run: | | ||
pytest --cov=esmtools --cov-report=xml --verbose | ||
- name: Upload coverage to codecov | ||
uses: codecov/codecov-action@v1.0.7 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
fail_ci_if_error: false |
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,19 @@ | ||
|
||
name: Lint | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
lint: # Runs linting package checks for code styling. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.pull_request.head.ref}} | ||
repository: ${{github.event.pull_request.head.repo.full_name}} | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- name: Lint via pre-commit checks | ||
uses: pre-commit/action@v2.0.0 |
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 |
---|---|---|
@@ -1,37 +1,28 @@ | ||
repos: | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.2.3 | ||
rev: v3.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-docstring-first | ||
- id: check-yaml | ||
- id: double-quote-string-fixer | ||
- id: no-commit-to-branch | ||
- id: debug-statements | ||
- id: check-merge-conflict | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: 19.10b0 | ||
- repo: https://github.com/psf/black | ||
rev: stable | ||
hooks: | ||
- id: black | ||
args: ["--line-length", "88", "--skip-string-normalization"] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.4.0 | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
hooks: | ||
- id: flake8 | ||
args: ["--max-line-length=88", "--exclude=__init__.py", "--ignore=W605,W503,F722,C901"] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v4.3.21 | ||
rev: v5.6.4 | ||
hooks: | ||
- id: isort | ||
args: ["-w", "88"] | ||
|
||
- repo: https://github.com/PyCQA/doc8 | ||
rev: 0.8.1rc2 | ||
hooks: | ||
- id: doc8 | ||
args: ["--max-line-length", "100", "--ignore-path", "docs/source/setting-up-data.rst", "--allow-long-titles"] |
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
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,26 @@ | ||
name: esmtools-docs | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.6 | ||
- bottleneck | ||
- cartopy>=0.18.0 | ||
- importlib_metadata | ||
- jupyterlab | ||
- matplotlib | ||
- nbsphinx | ||
- nc-time-axis | ||
- netcdf4 | ||
- numpy | ||
- pandas | ||
- pygments==2.6.1 | ||
- sphinx | ||
- sphinxcontrib-napoleon | ||
- sphinx_rtd_theme | ||
- toolz | ||
- tqdm | ||
- xarray>=0.16.1 | ||
- pip | ||
- pip: | ||
# Install latest version of climpred. | ||
- -e ../.. |
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,19 @@ | ||
name: esmtools-minimum-tests | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- cftime | ||
- coveralls | ||
- dask | ||
- ipython | ||
- nc-time-axis | ||
- netcdf4 | ||
- pip | ||
- pytest | ||
- pytest-cov | ||
- scipy | ||
- xarray | ||
- xskillscore | ||
- pip: | ||
- pytest-lazy-fixture | ||
- -e ../.. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.