Skip to content

Commit

Permalink
Merge pull request #1025 from ioos/develop
Browse files Browse the repository at this point in the history
Merge in develop branch in preparation for Compliance Checker v5.1.0
  • Loading branch information
benjwadams authored May 17, 2023
2 parents a745fc7 + 07a7874 commit cb451c5
Show file tree
Hide file tree
Showing 61 changed files with 2,602 additions and 1,389 deletions.
39 changes: 15 additions & 24 deletions .github/workflows/cc-checker-ugrid-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: UGRID Plugin Tests
on:
pull_request:
push:
branches: [master]

jobs:
run:
Expand All @@ -12,32 +11,24 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Conda
uses: s-weigand/setup-conda@v1
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v15
with:
activate-conda: false
conda-channels: conda-forge
environment-file: false

- name: Python ${{ matrix.python-version }}
- name: Setup Env
shell: bash -l {0}
run: |
conda create --name TEST python=${{ matrix.python-version }} python=3 pip --file requirements.txt --file test_requirements.txt --strict-channel-priority
source activate TEST
pip install -e . --no-deps --force-reinstall
- name: Conda Info
shell: bash -l {0}
run: |
source activate TEST
conda info --all
conda list
run: >
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
&& micromamba activate TEST
&& pip install -e . --no-deps --force-reinstall
- name: cc-plugin-glider tests
shell: bash -l {0}
run: |
source activate TEST
git clone https://github.com/ioos/cc-checker-ugrid.git
cd cc-checker-ugrid
pip install -e . --no-deps --force-reinstall
conda install --file requirements.txt --file requirements-dev.txt ;
pytest -s -rxs -v cc_plugin_ugrid
run: >
micromamba activate TEST
&& git clone https://github.com/ioos/cc-checker-ugrid.git
&& cd cc-checker-ugrid
&& micromamba install --file requirements.txt --file requirements-dev.txt --channel conda-forge
&& pip install -e . --no-deps --force-reinstall
&& pytest -s -rxs -v cc_plugin_ugrid
4 changes: 2 additions & 2 deletions .github/workflows/cc-plugin-glider-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v14
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: false

- name: Python
- name: Setup Env
shell: bash -l {0}
run: >
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cc-plugin-sgrid-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: false

- name: Python
- name: Setup Env
shell: bash -l {0}
run: >
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cc-plugin-ugrid-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v14
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: false

- name: Python
- name: Setup Env
shell: bash -l {0}
run: >
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v14
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: false

- name: Python
- name: Setup Env
shell: bash -l {0}
run: >
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/default-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v14
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: false

- name: Python ${{ matrix.python-version }}
- name: Setup Env ${{ matrix.python-version }}
shell: bash -l {0}
run: >
micromamba create --name TEST python=${{ matrix.python-version }} pip --file requirements.txt --file test_requirements.txt --channel conda-forge
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

name: Documentation

on:
pull_request:
push:
release:
types:
- published

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Mamba
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: false

- name: Build environment
shell: bash -l {0}
run: |
micromamba create --name TEST python=3 --file requirements.txt --file test_requirements.txt --channel conda-forge
micromamba activate TEST
python -m pip install -e . --no-deps --force-reinstall
- name: Build documentation
shell: bash -l {0}
run: |
set -e
micromamba activate TEST
pushd docs
cp ../README.md source/quickintro.md
make clean html linkcheck
popd
- name: Deploy
if: success() && github.event_name == 'release'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
5 changes: 2 additions & 3 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Integration Tests
on:
pull_request:
push:
branches: [master,develop]

jobs:
run:
Expand All @@ -13,11 +12,11 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v14
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: false

- name: Create Environment
- name: Setup Env
shell: bash -l {0}
run: >
micromamba create --name TEST python=3 pip --file requirements.txt --file test_requirements.txt --channel conda-forge
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Publish to PyPI
on:
pull_request:
push:
branches:
- master
release:
types:
- published
Expand All @@ -29,7 +27,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install build tools
run: |
Expand All @@ -49,7 +47,7 @@ jobs:
- name: Publish a Python distribution to PyPI
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@v1.8.5
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_ACCESS_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ activate
# coverage output
coverage/
coverage.xml

# shpinx docs
docs/source/generated/
docs/source/quickintro.md
45 changes: 26 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,49 @@ repos:
exclude: compliance_checker/tests/data
- id: check-docstring-first
- id: check-added-large-files
- id: check-json
- id: check-merge-conflict
- id: check-yaml
- id: requirements-txt-fixer

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
exclude: docs/source/conf.py
args: [--max-line-length=200, "--ignore=E203,E501,W503", "--select=select=C,E,F,W,B,B950"]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
additional_dependencies: [toml]
args: ["--profile", "black", "--filter-files"]
args:
- requirements.txt
- test_requirements.txt

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
hooks:
- id: add-trailing-comma


- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.267
hooks:
- id: ruff

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.11.2
hooks:
- id: pyproject-fmt

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
args:
- --ignore-words-list=degreee,varn,poit,uint,sur,herat,claus,dedent,dedenting,dedents,dedented
- --ignore-words-list=degreeE,degreee,varn,poit,uint,sur,herat,claus,tung,messsages
exclude: >
(?x)^(
.*\.xml|
.*\.cdl|
.*_version\.py|
.*versioneer\.py|
compliance_checker/tests/cassettes/test_netcdf_content_type\.yaml|
compliance_checker/data/seanames\.csv
.*\.yaml|
.*_version.py|
.*versioneer.py
)$
ci:
Expand Down
Loading

0 comments on commit cb451c5

Please sign in to comment.