From 6bcb2291eea0ddb23be2331296393616bc3235e1 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:40:27 -0500 Subject: [PATCH 1/4] set base versions on some dependencies --- environment-dev.yml | 6 +++--- pyproject.toml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/environment-dev.yml b/environment-dev.yml index 4fce3da..ab521f8 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -6,16 +6,16 @@ dependencies: - python>=3.9,<3.13 # Main - cartopy >=0.23.0 - - cairosvg + - cairosvg >=2.6.0 - matplotlib-base >=3.6.0 - - seaborn + - seaborn >=0.13.0 - geopandas >=1.0 - numpy >=1.23.0,<2.0.0 - pandas >=2.2.0 - platformdirs - pint >=0.10,<0.24 - pyyaml >=6.0.1 - - scikit-image + - scikit-image >=0.20.0 - xarray >=2022.6.0 - xclim >=0.52.2 # To make the package and notebooks usable diff --git a/pyproject.toml b/pyproject.toml index 49db918..2af193d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ classifiers = [ dynamic = ["description", "version"] dependencies = [ "cartopy >=0.23.0", - "cairosvg", + "cairosvg >=2.6.0", "geopandas >=1.0", "matplotlib >=3.6.0", "numpy >=1.23.0,<2.0.0", @@ -44,8 +44,8 @@ dependencies = [ "pint >=0.10,<0.24", "platformdirs", "pyyaml >=6.0.1", - "seaborn", - "scikit-image", + "seaborn >=0.13.0", + "scikit-image >=0.20.0", "xarray >=2022.6.0", "xclim >=0.52.2" ] From 884ea32a4a2297fd382e514626c9e205027e2521 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:18:20 -0500 Subject: [PATCH 2/4] update cookiecutter --- .cruft.json | 2 +- .github/workflows/bump-version.yml | 2 +- .github/workflows/cache-cleaner.yml | 2 +- .github/workflows/dependency-review.yml | 4 ++-- .github/workflows/first-pull-request.yml | 2 +- .github/workflows/label.yml | 2 +- .github/workflows/main.yml | 15 ++++++-------- .github/workflows/publish-pypi.yml | 4 ++-- .github/workflows/scorecard.yml | 2 +- .github/workflows/tag-testpypi.yml | 8 ++++---- .github/workflows/workflow-warning.yml | 2 +- .pre-commit-config.yaml | 4 ++-- environment-dev.yml | 4 ++-- pyproject.toml | 25 ++++++++++++------------ tox.ini | 3 ++- 15 files changed, 39 insertions(+), 42 deletions(-) diff --git a/.cruft.json b/.cruft.json index 6a4baa8..7cb3a89 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/Ouranosinc/cookiecutter-pypackage", - "commit": "f750ad2185cbb56df6f7e98a269bdd8399283ea8", + "commit": "b27c2d5f8126ea1aefae29a6f5ccfdafad96395d", "checkout": null, "context": { "cookiecutter": { diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index d355071..72b4d75 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -47,7 +47,7 @@ jobs: contents: write steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: block diff --git a/.github/workflows/cache-cleaner.yml b/.github/workflows/cache-cleaner.yml index 15ffca6..73cc92a 100644 --- a/.github/workflows/cache-cleaner.yml +++ b/.github/workflows/cache-cleaner.yml @@ -16,7 +16,7 @@ jobs: actions: write steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: block diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index a73a7e8..b59a398 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: block @@ -30,4 +30,4 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Dependency Review - uses: actions/dependency-review-action@4081bf99e2866ebe428fc0477b69eb4fcda7220a # v4.4.0 + uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0 diff --git a/.github/workflows/first-pull-request.yml b/.github/workflows/first-pull-request.yml index 13e2f10..d059e97 100644 --- a/.github/workflows/first-pull-request.yml +++ b/.github/workflows/first-pull-request.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: block diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index ec4394d..f7d1d41 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -23,7 +23,7 @@ jobs: pull-requests: write steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: block diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 583866c..b8ff5c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: - "3.x" steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: egress-policy: audit - name: Checkout Repository @@ -63,7 +63,7 @@ jobs: # - "3.13" steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: egress-policy: audit - name: Checkout Repository @@ -108,27 +108,24 @@ jobs: shell: bash -l {0} steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: egress-policy: audit - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup Conda (Micromamba) with Python${{ matrix.python-version }} - uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v2.0.0 + uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # v2.0.2 with: cache-downloads: true environment-file: environment-dev.yml create-args: >- python=${{ matrix.python-version }} - - name: Micromamba version - run: | - echo "micromamba $(micromamba --version)" - name: Install figanos run: | python -m pip install --no-deps . - name: Check versions run: | - conda list + micromamba list python -m pip check || true - name: Test with pytest run: | @@ -149,7 +146,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: audit diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 71bb6ac..f530394 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -18,7 +18,7 @@ jobs: id-token: write steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: block @@ -41,4 +41,4 @@ jobs: run: | python -m flit build - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@fb13cb306901256ace3dab689990e13a5550ffaa # v1.11.0 + uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 3ed465e..9211dd2 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -29,7 +29,7 @@ jobs: id-token: write steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: block diff --git a/.github/workflows/tag-testpypi.yml b/.github/workflows/tag-testpypi.yml index e78ccaf..08a4836 100644 --- a/.github/workflows/tag-testpypi.yml +++ b/.github/workflows/tag-testpypi.yml @@ -17,7 +17,7 @@ jobs: contents: write steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: block @@ -29,7 +29,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Create Release - uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # 2.0.8 + uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # 2.1.0 env: # This token is provided by Actions, you do not need to create your own token GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -48,7 +48,7 @@ jobs: id-token: write steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: egress-policy: audit - name: Checkout Repository @@ -64,7 +64,7 @@ jobs: run: | python -m flit build - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@fb13cb306901256ace3dab689990e13a5550ffaa # v1.11.0 + uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2 with: repository-url: https://test.pypi.org/legacy/ skip-existing: true diff --git a/.github/workflows/workflow-warning.yml b/.github/workflows/workflow-warning.yml index 98ad0f9..d12aedf 100644 --- a/.github/workflows/workflow-warning.yml +++ b/.github/workflows/workflow-warning.yml @@ -25,7 +25,7 @@ jobs: pull-requests: write steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: disable-sudo: true egress-policy: block diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1edc503..bb96b93 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: check-yaml args: [ '--allow-multiple-documents' ] - repo: https://github.com/pappasam/toml-sort - rev: v0.23.1 + rev: v0.24.2 hooks: - id: toml-sort-fix - repo: https://github.com/pre-commit/pygrep-hooks @@ -82,7 +82,7 @@ repos: - id: numpydoc-validation exclude: ^docs/|^tests/ - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.30.0 hooks: - id: check-github-workflows - id: check-readthedocs diff --git a/environment-dev.yml b/environment-dev.yml index ab521f8..fcdd318 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -27,6 +27,7 @@ dependencies: - pooch >=1.8.0 # for xclim-testdata - zarr >=2.13.0 # Development + - pip >=24.3.1 - black ==24.10.0 - blackdoc ==0.3.9 - bump-my-version >=0.28.0 @@ -38,11 +39,10 @@ dependencies: - isort ==5.13.2 - mypy - numpydoc >=1.8.0 - - pip >=24.3.1 - pre-commit >=3.5.0 - pytest >=8.3.2 - pytest-cov >=5.0.0 - - ruff >=0.7.0 + - ruff >=0.8.2 - tox >=4.23.2 - watchdog >=4.0.0 # Docs diff --git a/pyproject.toml b/pyproject.toml index 2af193d..eb0772c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,25 +53,24 @@ dependencies = [ [project.optional-dependencies] dev = [ # Dev tools and testing - "pip >=24.3.1", + "black ==24.10.0", + "blackdoc ==0.3.9", "bump-my-version >=0.28.0", - "watchdog >=4.0.0", + "coverage >=7.5.0", + "coveralls >=4.0.1", "flake8 >=7.1.0", - "flake8-alphabetize >=0.0.21", "flake8-rst-docstrings >=0.3.0", "flit >=3.9.0,<4.0", - "tox >=4.23.2", - "coverage >=7.5.0", - "coveralls >=4.0.1", + "isort ==5.13.2", "mypy", "numpydoc >=1.8.0", + "pip >=24.3.1", + "pre-commit >=3.5.0", "pytest >=8.3.2", "pytest-cov >=5.0.0", - "black ==24.10.0", - "blackdoc ==0.3.9", - "isort ==5.13.2", - "ruff >=0.7.0", - "pre-commit >=3.5.0" + "ruff >=0.8.2", + "tox >=4.23.2", + "watchdog >=4.0.0" ] docs = [ # To make the package and notebooks usable @@ -87,11 +86,11 @@ docs = [ "ipython >=8.5.0", "jupyter_client", "nbsphinx", + "sphinx >=7.0.0", "sphinx-book-theme >=1.0", "sphinx-codeautolink", "sphinx-copybutton", "sphinx-intl", - "sphinx >=7.0.0", "sphinxcontrib-napoleon" ] all = ["figanos[dev]", "figanos[docs]"] @@ -234,7 +233,7 @@ py_version = 39 [tool.mypy] files = "." -python_version = 3.8 +python_version = 3.9 show_error_codes = true strict = true warn_no_return = true diff --git a/tox.ini b/tox.ini index 7cdb566..2abd108 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ deps = blackdoc ==0.3.9 isort ==5.13.2 flake8 >=7.1.1 - ruff >=0.7.0 + ruff >=0.8.2 numpydoc >=1.8.0 commands = make lint @@ -37,6 +37,7 @@ allowlist_externals = extras = docs commands = + make autodoc make --directory=docs clean html allowlist_externals = make From c79aea660f6fbd21cc124687c8df498a6a18cb24 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:20:10 -0500 Subject: [PATCH 3/4] adjust repo URL in pitou --- src/figanos/_testing.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/figanos/_testing.py b/src/figanos/_testing.py index 210e2a0..e0a6e30 100644 --- a/src/figanos/_testing.py +++ b/src/figanos/_testing.py @@ -18,8 +18,7 @@ def pitou(): _pitou = pooch.Pooch( path=pooch.os_cache("figanos"), - # base_url="https://raw.githubusercontent.com/Ouranosinc/figanos/main/src/figanos/data/test_data/", - base_url="https://raw.githubusercontent.com/Ouranosinc/figanos/split-doc/src/figanos/data/test_data/", + base_url="https://raw.githubusercontent.com/Ouranosinc/figanos/main/src/figanos/data/test_data/", registry={ "hatchmap-ens_stats.nc": "fc52d0551747fa0a7153f1ecfebf3e697993590c6c7c4c6a6f9f32700df9d32d", "hatchmap-inf_5.nc": "8f22522dc153d8d347bdf97bf85e49d08a5ecbc61c64372e713a0d25638e48ac", From 15a0cc63b880ac6fb0c2cb5931bdb98fa96652fb Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:32:01 -0500 Subject: [PATCH 4/4] update CHANGELOG.rst --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 26c093b..db28b59 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -53,10 +53,12 @@ Internal changes * Several development dependencies have been updated to their latest versions. * Updated the GitHub Actions in Workflows to their latest versions. * The documentation has been adapted to use the latest testing data fetching mechanism from `xclim`. (:pull:`273`). +* Updated the `cookiecutter` template to the latest version. Dependencies and GitHub Actions have been updated. (:pull:`282`). Bug fixes ^^^^^^^^^ * Creating the colormap in `fg.matplotlib.scattermap` is now done like `fg.matplotlib.gridmap` (:pull:`238`, :issue:`239`). +* Updated the default testing data URL in the `pitou` function to point to the correct branch. (:pull:`282`). 0.3.0 (2024-02-16) ------------------