From 8b35677046567ac2c1331e489cfc71ef97a75d6e Mon Sep 17 00:00:00 2001 From: Facundo Tuesca Date: Thu, 14 Mar 2024 22:52:51 +0100 Subject: [PATCH] Misc fixes and updates (#24) * Ignore conflicting ruff lint rules * Make Python 3.9 the minimum version and support Python 3.12 * Bump GitHub Actions versions to latest --- .github/workflows/tests.yml | 4 ++-- {{cookiecutter.project_slug}}/.github/workflows/docs.yml | 6 +++--- {{cookiecutter.project_slug}}/.github/workflows/lint.yml | 2 +- {{cookiecutter.project_slug}}/.github/workflows/release.yml | 4 ++-- {{cookiecutter.project_slug}}/.github/workflows/tests.yml | 6 +++--- {{cookiecutter.project_slug}}/pyproject.toml | 6 +++++- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 75fd6c5..11ddf6a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,9 +10,9 @@ jobs: self-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.x" diff --git a/{{cookiecutter.project_slug}}/.github/workflows/docs.yml b/{{cookiecutter.project_slug}}/.github/workflows/docs.yml index 209530d..79cb494 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/docs.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/docs.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: @@ -26,7 +26,7 @@ jobs: make doc - name: upload docs artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: ./html/ @@ -42,4 +42,4 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4 diff --git a/{{cookiecutter.project_slug}}/.github/workflows/lint.yml b/{{cookiecutter.project_slug}}/.github/workflows/lint.yml index da9720d..f484a39 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/lint.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/lint.yml @@ -10,7 +10,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: diff --git a/{{cookiecutter.project_slug}}/.github/workflows/release.yml b/{{cookiecutter.project_slug}}/.github/workflows/release.yml index 1b2ba50..04eb840 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/release.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: name: upload release to PyPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: @@ -36,7 +36,7 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 - name: sign - uses: sigstore/gh-action-sigstore-python@v1.2.1 + uses: sigstore/gh-action-sigstore-python@v2.1.1 with: inputs: ./dist/*.tar.gz ./dist/*.whl release-signing-artifacts: true diff --git a/{{cookiecutter.project_slug}}/.github/workflows/tests.yml b/{{cookiecutter.project_slug}}/.github/workflows/tests.yml index c4ca955..9bd0005 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/tests.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/tests.yml @@ -11,15 +11,15 @@ jobs: strategy: matrix: python: - - "3.8" - "3.9" - "3.10" - "3.11" + - "3.12" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} cache: "pip" diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 77c05ee..71fbacd 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ {%- endif %} ] dependencies = [] -requires-python = ">=3.8" +requires-python = ">=3.9" [project.optional-dependencies] doc = [ @@ -88,6 +88,10 @@ target-version = "py38" [tool.ruff.lint] select = ["ALL"] +# D203 and D213 are incompatible with D211 and D212 respectively. +# COM812 and ISC001 can cause conflicts when using ruff as a formatter. +# See https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules. +ignore = ["D203", "D213", "COM812", "ISC001"] [tool.ruff.lint.per-file-ignores] {% if cookiecutter.entry_point -%}