Skip to content

Commit 85847bd

Browse files
authored
Merge pull request #93 from ocefpaf/update_umamba_GHA
Update umamba gha
2 parents dc50154 + c63319c commit 85847bd

File tree

4 files changed

+35
-40
lines changed

4 files changed

+35
-40
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,24 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121

22-
- name: Setup Mamba
23-
uses: mamba-org/provision-with-micromamba@v16
22+
- name: Setup Micromamba
23+
uses: mamba-org/setup-micromamba@v1
2424
with:
25-
environment-file: false
25+
environment-name: TEST
26+
init-shell: bash
27+
create-args: >-
28+
python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
2629
27-
- name: Build environment
30+
31+
- name: Install oceans
2832
shell: bash -l {0}
2933
run: |
30-
micromamba create --name TEST python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
31-
micromamba activate TEST
3234
python -m pip install -e . --no-deps --force-reinstall
3335
3436
- name: Build documentation
3537
shell: bash -l {0}
3638
run: |
3739
set -e
38-
micromamba activate TEST
3940
pushd docs
4041
make clean html linkcheck
4142
popd

.github/workflows/tests.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,25 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121

22-
- name: Setup Micromamba
23-
uses: mamba-org/provision-with-micromamba@v16
22+
- name: Setup Micromamba Python ${{ matrix.python-version }}
23+
uses: mamba-org/setup-micromamba@v1
2424
with:
25-
environment-file: false
25+
environment-name: TEST
26+
init-shell: bash
27+
create-args: >-
28+
python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
2629
27-
- name: Python ${{ matrix.python-version }}
30+
- name: Install oceans
2831
shell: bash -l {0}
29-
run: >
30-
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
31-
&& micromamba activate TEST
32-
&& python -m pip install -e . --no-deps --force-reinstall
33-
32+
run: |
33+
python -m pip install -e . --no-deps --force-reinstall
3434
3535
- name: Tests
3636
shell: bash -l {0}
37-
run: >
38-
micromamba activate TEST
39-
&& python -m pytest -n 2 -rxs --cov=oceans tests
37+
run: |
38+
python -m pytest -n 2 -rxs --cov=oceans tests
4039
4140
- name: Doctests
4241
shell: bash -l {0}
43-
run: >
44-
micromamba activate TEST
45-
&& python -m pytest -vv oceans --doctest-modules
42+
run: |
43+
python -m pytest -vv oceans --doctest-modules

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
- id: blackdoc
2929

3030
- repo: https://github.com/charliermarsh/ruff-pre-commit
31-
rev: v0.0.269
31+
rev: v0.0.272
3232
hooks:
3333
- id: ruff
3434

@@ -39,18 +39,18 @@ repos:
3939
language_version: python3
4040

4141
- repo: https://github.com/codespell-project/codespell
42-
rev: v2.2.4
42+
rev: v2.2.5
4343
hooks:
4444
- id: codespell
4545
args:
4646
- --ignore-words-list=pres
4747

4848
- repo: https://github.com/asottile/add-trailing-comma
49-
rev: v2.4.0
49+
rev: v2.5.1
5050
hooks:
5151
- id: add-trailing-comma
5252

5353
- repo: https://github.com/tox-dev/pyproject-fmt
54-
rev: "0.11.2"
54+
rev: "0.12.1"
5555
hooks:
5656
- id: pyproject-fmt

pyproject.toml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ license = {file = "LICENSE.txt"}
1414
maintainers = [
1515
{name = "André Palóczy"},
1616
{name = "Arnaldo Russo"},
17-
{name = "Filipe Fernandes"},
17+
{name = "Filipe Fernandes", email = "[email protected]"},
1818
]
1919
requires-python = ">=3.8"
2020
classifiers = [
@@ -25,16 +25,9 @@ classifiers = [
2525
"Programming Language :: Python :: 3.11",
2626
]
2727
dynamic = [
28+
"dependencies",
2829
"version",
2930
]
30-
dependencies = [
31-
"contourpy",
32-
"gsw",
33-
"matplotlib>=3.6",
34-
"numpy>=1.20",
35-
"pandas>=1.0.1",
36-
"seawater",
37-
]
3831
[project.optional-dependencies]
3932
extras = [
4033
"cartopy",
@@ -53,18 +46,16 @@ packages = ["oceans"]
5346
zip-safe = false
5447
include-package-data = true
5548

49+
[tool.setuptools.dynamic]
50+
dependencies = {file = ["requirements.txt"]}
51+
5652
[tool.setuptools.package-data]
5753
oceans = ["colormaps/cmap_data/*.dat"]
5854

5955
[tool.setuptools_scm]
6056
write_to = "oceans/_version.py"
6157
write_to_template = "__version__ = '{version}'"
6258

63-
[tool.pytest.ini_options]
64-
markers = [
65-
"web: marks tests require connection (deselect with '-m \"not web\"')"
66-
]
67-
6859
[tool.ruff]
6960
select = [
7061
"A", # flake8-builtins
@@ -85,6 +76,11 @@ ignore = [
8576
"docs/source/conf.py" = ["E402", "A001"]
8677
"oceans/plotting.py" = ["T201"] # `print` found
8778

79+
[tool.pytest.ini_options]
80+
markers = [
81+
"web: marks tests require connection (deselect with '-m \"not web\"')"
82+
]
83+
8884
[tool.interrogate]
8985
ignore-init-method = true
9086
ignore-init-module = false

0 commit comments

Comments
 (0)