diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 8c55cb6..200fc9e 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -19,23 +19,24 @@ 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 --file requirements.txt --file requirements-dev.txt --channel conda-forge - - name: Build environment + + - name: Install oceans 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 pushd docs make clean html linkcheck popd diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e7f4cc1..c320297 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,27 +19,25 @@ jobs: with: fetch-depth: 0 - - name: Setup Micromamba - uses: mamba-org/provision-with-micromamba@v16 + - name: Setup Micromamba Python ${{ 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 }} --file requirements.txt --file requirements-dev.txt --channel conda-forge - - name: Python ${{ matrix.python-version }} + - name: Install oceans 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=oceans tests + run: | + python -m pytest -n 2 -rxs --cov=oceans tests - name: Doctests shell: bash -l {0} - run: > - micromamba activate TEST - && python -m pytest -vv oceans --doctest-modules + run: | + python -m pytest -vv oceans --doctest-modules diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3a4cf9..a02b2fc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: - id: blackdoc - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.269 + rev: v0.0.272 hooks: - id: ruff @@ -39,18 +39,18 @@ repos: language_version: python3 - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.5 hooks: - id: codespell args: - --ignore-words-list=pres - repo: https://github.com/asottile/add-trailing-comma - rev: v2.4.0 + rev: v2.5.1 hooks: - id: add-trailing-comma - repo: https://github.com/tox-dev/pyproject-fmt - rev: "0.11.2" + rev: "0.12.1" hooks: - id: pyproject-fmt diff --git a/pyproject.toml b/pyproject.toml index b26ae6d..d1b7ce5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ license = {file = "LICENSE.txt"} maintainers = [ {name = "André Palóczy"}, {name = "Arnaldo Russo"}, - {name = "Filipe Fernandes"}, + {name = "Filipe Fernandes", email = "ocefpaf+oceans@gmail.com"}, ] requires-python = ">=3.8" classifiers = [ @@ -25,16 +25,9 @@ classifiers = [ "Programming Language :: Python :: 3.11", ] dynamic = [ + "dependencies", "version", ] -dependencies = [ - "contourpy", - "gsw", - "matplotlib>=3.6", - "numpy>=1.20", - "pandas>=1.0.1", - "seawater", -] [project.optional-dependencies] extras = [ "cartopy", @@ -53,6 +46,9 @@ packages = ["oceans"] zip-safe = false include-package-data = true +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} + [tool.setuptools.package-data] oceans = ["colormaps/cmap_data/*.dat"] @@ -60,11 +56,6 @@ oceans = ["colormaps/cmap_data/*.dat"] write_to = "oceans/_version.py" write_to_template = "__version__ = '{version}'" -[tool.pytest.ini_options] -markers = [ - "web: marks tests require connection (deselect with '-m \"not web\"')" - ] - [tool.ruff] select = [ "A", # flake8-builtins @@ -85,6 +76,11 @@ ignore = [ "docs/source/conf.py" = ["E402", "A001"] "oceans/plotting.py" = ["T201"] # `print` found +[tool.pytest.ini_options] +markers = [ + "web: marks tests require connection (deselect with '-m \"not web\"')" + ] + [tool.interrogate] ignore-init-method = true ignore-init-module = false