From 12993fbcde59344096652b15d9063e0e7328937b Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:08:58 -0400 Subject: [PATCH] fast-forward cookiecutter --- .cruft.json | 23 ++--------------------- .github/workflows/first-pull-request.yml | 2 +- .github/workflows/main.yml | 21 ++++++++------------- .pre-commit-config.yaml | 4 ++-- CI/requirements_ci.in | 9 +++++---- CI/requirements_ci.txt | 14 ++++++-------- Makefile | 2 +- environment-dev.yml | 18 +++++++++--------- pyproject.toml | 18 +++++++++--------- tox.ini | 19 ++++++++++++++----- 10 files changed, 57 insertions(+), 73 deletions(-) diff --git a/.cruft.json b/.cruft.json index 5107575..60eab8a 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/Ouranosinc/cookiecutter-pypackage", - "commit": "9e52dd4dcbae384ca055d1edd4aa79ec5b436ca0", + "commit": "fb24d9af1a97700633333a8c8246b3e504e865f7", "checkout": null, "context": { "cookiecutter": { @@ -22,26 +22,7 @@ "create_author_file": "y", "open_source_license": "MIT license", "generated_with_cruft": "y", - "__gh_slug": "https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_name.replace(' ', '-') }}", - "__prompts__": { - "full_name": "Your full name", - "email": "Your email address", - "github_username": "Your GitHub username (or organization)", - "project_name": "The name of your project", - "project_short_description": "A short description of your project", - "pypi_username": "Your PyPI username (or organization)", - "version": "The version of your project", - "use_pytest": "Do you want to use pytest?", - "use_black": "Do you want to use Black for code formatting?", - "use_conda": "Do you want to add configurations for Anaconda package management?", - "add_pyup_badge": "Do you want to add a pyup.io badge? (not recommended)", - "make_docs": "Do you want to generate documentation files", - "add_translations": "Do you want to add translations?", - "command_line_interface": "Which command-line interface do you want to use?", - "create_author_file": "Do you want to create an AUTHORS.rst file?", - "open_source_license": "Which open-source license do you want to use?", - "generated_with_cruft": "Was this project generated with Cruft? (Add a '.cruft.json' file)" - }, + "__gh_slug": "https://github.com/hydrologie/xdatasets", "_template": "https://github.com/Ouranosinc/cookiecutter-pypackage" } }, diff --git a/.github/workflows/first-pull-request.yml b/.github/workflows/first-pull-request.yml index 7f89710..9543fd9 100644 --- a/.github/workflows/first-pull-request.yml +++ b/.github/workflows/first-pull-request.yml @@ -56,5 +56,5 @@ jobs: It appears that this is your first Pull Request. To give credit where it's due, we ask that you add your information to the \`AUTHORS.rst\` and \`.zenodo.json\`: - [ ] The relevant author information has been added to \`AUTHORS.rst\` and \`.zenodo.json\`. - Please make sure you've read our [contributing guide](CONTRIBUTING.rst). We look forward to reviewing your Pull Request shortly ✨` + Please make sure you've read our [contributing guide](https://github.com/hydrologie/xdatasets/blob/main/CONTRIBUTING.rst). We look forward to reviewing your Pull Request shortly ✨` }) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 648cb55..c72a099 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,17 +55,12 @@ jobs: ESMF_VERSION: "v8.5.0" strategy: matrix: - include: - - tox-env: "py38-coveralls" - python-version: "3.8" - - tox-env: "py39-coveralls" - python-version: "3.9" - - tox-env: "py310-coveralls" - python-version: "3.10" - - tox-env: "py311-coveralls" - python-version: "3.11" - - tox-env: "py312-coveralls" - python-version: "3.12" + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" steps: - name: Harden Runner uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 @@ -93,11 +88,11 @@ jobs: python -m pip install --require-hashes -r CI/requirements_ci.txt - name: Test with tox run: | - tox -e ${{ matrix.tox-env }} + tox env: ESMF_VERSION: ${{ env.ESMF_VERSION }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_FLAG_NAME: run-${{ matrix.tox-env }} + COVERALLS_FLAG_NAME: run-${{ matrix.python-version }} COVERALLS_PARALLEL: true COVERALLS_SERVICE_NAME: github diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6b993b2..adca1f5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: hooks: - id: isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.6 + rev: v0.5.7 hooks: - id: ruff args: [ '--fix' ] @@ -79,7 +79,7 @@ repos: - id: yamllint args: [ '--config-file=.yamllint.yaml' ] - repo: https://github.com/numpy/numpydoc - rev: v1.8.0rc2 + rev: v1.8.0 hooks: - id: numpydoc-validation exclude: ^docs/|^tests/ diff --git a/CI/requirements_ci.in b/CI/requirements_ci.in index d0063e3..0ba0bff 100644 --- a/CI/requirements_ci.in +++ b/CI/requirements_ci.in @@ -1,4 +1,5 @@ -bump-my-version -coveralls -flit -tox +bump-my-version==0.25.1 +coveralls==4.0.1 +flit==3.9.0 +pip==24.2.0 +tox==4.17.1 diff --git a/CI/requirements_ci.txt b/CI/requirements_ci.txt index 97c4ad0..3b2801f 100644 --- a/CI/requirements_ci.txt +++ b/CI/requirements_ci.txt @@ -12,9 +12,9 @@ bracex==2.4 \ --hash=sha256:a27eaf1df42cf561fed58b7a8f3fdf129d1ea16a81e1fadd1d17989bc6384beb \ --hash=sha256:efdc71eff95eaff5e0f8cfebe7d01adf2c8637c8c92edaf63ef348c241a82418 # via wcmatch -bump-my-version==0.24.3 \ - --hash=sha256:9b8ac82458a703a968a9a438b460175494cc0e0c6bd5f316019945a6b66eb81f \ - --hash=sha256:cdd86e158430dd5e5e25fc61703c140a1107579fdd8d74f8f3a5f991daa07168 +bump-my-version==0.25.1 \ + --hash=sha256:d5e72b1a88db4cc808009fd4f03c3b3ab5c06db7bf1501e4f8387eb50c352589 \ + --hash=sha256:f9a2723999be5c4416c854ad4a7f950491644944dff82a91634f8a45d1da81ac # via -r CI/requirements_ci.in cachetools==5.3.3 \ --hash=sha256:0abad1021d3f8325b2fc1d2e9c8b9c9d57b04c3932657a72465447332c24d945 \ @@ -393,18 +393,16 @@ tomlkit==0.13.0 \ --hash=sha256:08ad192699734149f5b97b45f1f18dad7eb1b6d16bc72ad0c2335772650d7b72 \ --hash=sha256:7075d3042d03b80f603482d69bf0c8f345c2b30e41699fd8883227f89972b264 # via bump-my-version -tox==4.16.0 \ - --hash=sha256:43499656f9949edb681c0f907f86fbfee98677af9919d8b11ae5ad77cb800748 \ - --hash=sha256:61e101061b977b46cf00093d4319438055290ad0009f84497a07bf2d2d7a06d0 +tox==4.17.1 \ + --hash=sha256:2974597c0353577126ab014f52d1a399fb761049e165ff34427f84e8cfe6c990 \ + --hash=sha256:2c41565a571e34480bd401d668a4899806169a4633e972ac296c54406d2ded8a # via -r CI/requirements_ci.in typing-extensions==4.12.2 \ --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 # via - # annotated-types # pydantic # pydantic-core - # rich # rich-click urllib3==2.2.2 \ --hash=sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472 \ diff --git a/Makefile b/Makefile index 416bb31..6e73312 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ clean-test: ## remove test and coverage artifacts lint/flake8: ## check style with flake8 python -m ruff check src/xdatasets tests python -m flake8 --config=.flake8 src/xdatasets tests - validate-docstrings src/xdatasets/**.py + python -m numpydoc lint src/xdatasets/**.py lint/black: ## check style with black python -m black --check src/xdatasets tests diff --git a/environment-dev.yml b/environment-dev.yml index 96d45a1..4fb1637 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -22,22 +22,22 @@ dependencies: - xarray >=2023.1 - zarr # Dev tools and testing - - pip >=24.0 - - bump-my-version >=0.24.3 - - black ==24.4.2 + - pip >=24.2.0 + - bump-my-version >=0.25.1 + - black ==24.8.0 - blackdoc ==0.3.9 - coverage >=7.5.0 - - coveralls >=4.0.0 - - flake8 >=7.1.0 + - coveralls >=4.0.1 + - flake8 >=7.1.1 - flake8-rst-docstrings >=0.3.0 - flit >=3.9.0,<4.0 - isort ==5.13.2 - - numpydoc >=1.7.0 + - numpydoc >=1.8.0 - pip >=23.3.0 - pre-commit >=3.5.0 - - pytest >=8.2.2 + - pytest >=8.3.2 - pytest-cov >=5.0.0 - - ruff >=0.5.0 + - ruff >=0.5.7 - tokenize-rt >=3.2.0 - - tox >=4.16.0 + - tox >=4.17.1 - watchdog >=4.0.0 diff --git a/pyproject.toml b/pyproject.toml index bb052b0..cbb6115 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,27 +66,27 @@ dependencies = [ [project.optional-dependencies] dev = [ # Dev tools and testing - "black ==24.4.2", + "black ==24.8.0", "blackdoc ==0.3.9", - "bump-my-version >=0.24.3", + "bump-my-version >=0.25.1", "coverage >=7.5.0", - "coveralls >=4.0.0", - "flake8 >=7.1.0", + "coveralls >=4.0.1", + "flake8 >=7.1.1", "flake8-rst-docstrings >=0.3.0", "flit >=3.9.0,<4.0", "ipython", "isort ==5.13.2", "mypy", "nbval", - "numpydoc >=1.7.0", - "pip >=24.0", + "numpydoc >=1.8.0", + "pip >=24.2.0", "pre-commit >=3.5.0", "pylint", "pytest-cov >=5.0.0", - "pytest >=8.2.2", - "ruff >=0.5.0", + "pytest >=8.3.2", + "ruff >=0.5.7", "tokenize-rt", - "tox >=4.16.0", + "tox >=4.17.1", "watchdog >=4.0.0", "xdoctest" ] diff --git a/tox.ini b/tox.ini index edf5325..0568116 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -min_version = 4.16.0 +min_version = 4.17.1 envlist = lint py{38,39,310,311,312} @@ -7,19 +7,28 @@ envlist = coveralls requires = flit ~= 3.9.0 + pip >=24.2.0 opts = --verbose +[gh] +python = + 3.8 = py38-coveralls + 3.9 = py39-coveralls + 3.10 = py310-coveralls + 3.11 = py311-coveralls + 3.12 = py312-coveralls + [testenv:lint] skip_install = True deps = - black == 24.4.2 + black == 24.8.0 blackdoc == 0.3.9 isort == 5.13.2 - flake8 >= 7.1.0 + flake8 >= 7.1.1 flake8-rst-docstrings >=0.3.0 - ruff >=0.5.0 - numpydoc >=1.7.0 + ruff >=0.5.7 + numpydoc >=1.8.0 commands = make lint allowlist_externals =