Skip to content

Renamed 'grib_errors' parameter to 'errors' to match open_file() signature #636

Renamed 'grib_errors' parameter to 'errors' to match open_file() signature

Renamed 'grib_errors' parameter to 'errors' to match open_file() signature #636

Workflow file for this run

name: on-push
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ${{ matrix.os }}-latest
strategy:
max-parallel: 5
matrix:
os: [ubuntu]
python: [3.8]
extras: ['']
include:
- os: macos
python: 3.8
- os: ubuntu
python: 3.9
extras: -minimal
# python-eccodes removed old versions from conda-forge
# - os: ubuntu
# python: 3.6
# extras: -minver
# python-eccodes fail on windows
# - os: windows
# python: 3.8
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python }}
activate-environment: ${{ matrix.os }}-${{ matrix.python }}${{ matrix.extras }}
environment-file: tests/environment-${{ matrix.os }}-${{ matrix.python }}${{ matrix.extras }}.yml
- name: Test with pytest
shell: bash -l {0}
run: |
pip install --no-deps -e .
pytest -v --cov=. --cov-report=xml .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.8
activate-environment: ubuntu-3.8
environment-file: tests/environment-ubuntu-3.8.yml
- name: Build documentation with Sphinx
shell: bash -l {0}
run: |
conda install sphinx
pip install --no-deps -e .
python setup.py build_sphinx
- name: Test README with pytest
shell: bash -l {0}
run: |
pip install --no-deps -e .
pytest -v --cov=. --cov-report=xml *.rst
pytest -v --doctest-modules cfgrib
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.8
activate-environment: ubuntu-3.8
environment-file: tests/environment-ubuntu-3.8.yml
- name: Lint with flake8
shell: bash -l {0}
run: |
conda install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Type check with mypy
shell: bash -l {0}
run: |
mypy cfgrib tests/test_*py
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check code style with black
run: |
$CONDA/bin/conda install black
$CONDA/bin/black --check .
- name: Check code style with isort
run: |
$CONDA/bin/conda install isort
$CONDA/bin/isort --check .
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check MANIFEST.in
run: |
$CONDA/bin/conda install -c conda-forge check-manifest
$CONDA/bin/check-manifest .
- name: Build distributions
run: |
$CONDA/bin/conda install pip setuptools wheel
$CONDA/bin/python setup.py sdist bdist_wheel