Skip to content

Commit

Permalink
Merge pull request #24 from ocefpaf/update_umamba_GHA
Browse files Browse the repository at this point in the history
Update umamba gha
  • Loading branch information
ocefpaf authored May 29, 2023
2 parents 6f26402 + 5405e9f commit 541d540
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 24 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,26 @@ jobs:
with:
fetch-depth: 0

- name: Setup Mamba
uses: mamba-org/provision-with-micromamba@v16
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false
environment-name: TEST
init-shell: bash
create-args: >-
python=3 pip
--file requirements.txt
--file requirements-dev.txt
--channel conda-forge
- name: Build environment
- name: Install package
shell: bash -l {0}
run: |
micromamba create --name TEST python=3 --file requirements.txt --file requirements-dev.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
jupyter nbconvert --to notebook --execute notebooks/tutorial.ipynb --output=tutorial-output.ipynb
mv notebooks/*output.ipynb docs/source/
pushd docs
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Install build tools
run: |
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine
python -m pip install --upgrade pip build
shell: bash

Expand All @@ -41,6 +41,7 @@ jobs:
- name: Test wheels
run: |
cd dist && python -m pip install *.whl
python -m pip install --upgrade twine
python -m twine check *
shell: bash

Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,23 @@ jobs:
with:
fetch-depth: 0

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v16
- name: Setup Micromamba ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v1
with:
environment-file: false
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }} pip
--file requirements.txt
--file requirements-dev.txt
--channel conda-forge
- name: Python ${{ matrix.python-version }}
- name: Install package
shell: bash -l {0}
run: >
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
&& micromamba activate TEST
&& python -m pip install -e . --no-deps --force-reinstall
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Tests
shell: bash -l {0}
run: >
micromamba activate TEST
&& python -m pytest -n 2 -rxs --cov=ioos_pkg_skeleton tests
run: |
python -m pytest -n 2 -rxs --cov=ioos_pkg_skeleton tests
14 changes: 10 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ repos:
- id: blackdoc

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

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

- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.4
hooks:
- id: codespell
args:
Expand All @@ -50,6 +50,12 @@ repos:
- id: add-trailing-comma

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

- repo: https://github.com/aio-libs/sort-all
rev: "v1.2.0"
hooks:
- id: sort-all
types: [file, python]
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ license = {file = "LICENSE.txt"}
authors = [
{name = "AUTHOR NAME", email = "[email protected]"},
]
requires-python = ">=3.6"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dynamic = [
"version",
]
Expand Down

0 comments on commit 541d540

Please sign in to comment.