From cdc8f256e0b1e164f83bde1bdda6dcd173f6d370 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 01:00:09 +0200 Subject: [PATCH 1/5] Bump GitHub Actions --- .github/workflows/lint.yml | 6 +++--- .github/workflows/test.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1a7cb24c..095038af 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,6 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 338fb1a5..28e22b5e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,10 +14,10 @@ jobs: python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: pip @@ -38,7 +38,7 @@ jobs: coverage xml - name: Upload coverage - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: name: Python ${{ matrix.python-version }} From 25f9cf9ea93496c4ad78c82ad1d527462f598754 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 01:02:52 +0200 Subject: [PATCH 2/5] Update pre-commit --- .pre-commit-config.yaml | 36 ++++++++++++++++++++++++++++-------- index.html | 2 +- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 01904c3c..5f71f9cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,44 +1,64 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v2.31.0 + rev: v3.15.0 hooks: - id: pyupgrade args: [--py37-plus] - - repo: https://github.com/psf/black - rev: 22.1.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.1.1 hooks: - id: black args: [--target-version=py37] - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: [flake8-2020, flake8-implicit-str-concat] - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 + rev: v1.10.0 hooks: - id: python-check-blanket-noqa - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.5.0 hooks: + - id: check-case-conflict - id: check-merge-conflict - id: check-toml - id: check-yaml + - id: debug-statements - id: end-of-file-fixer - id: requirements-txt-fixer - id: trailing-whitespace + - repo: https://github.com/tox-dev/pyproject-fmt + rev: 1.7.0 + hooks: + - id: pyproject-fmt + + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.16 + hooks: + - id: validate-pyproject + - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.5.1 + rev: v4.0.0-alpha.8 hooks: - id: prettier args: [--prose-wrap=always, --print-width=88] + + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + +ci: + autoupdate_schedule: quarterly diff --git a/index.html b/index.html index ec38c3c1..57afa1a7 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + Date: Sun, 4 Feb 2024 01:04:01 +0200 Subject: [PATCH 3/5] Update CI config --- .github/workflows/lint.yml | 8 ++++++++ .github/workflows/test.yml | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 095038af..dae63b03 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,6 +2,12 @@ name: Lint on: [push, pull_request, workflow_dispatch] +env: + FORCE_COLOR: 1 + +permissions: + contents: read + jobs: lint: runs-on: ubuntu-latest @@ -9,4 +15,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 + with: + python-version: "3.x" - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28e22b5e..4808859b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,13 +38,14 @@ jobs: coverage xml - name: Upload coverage - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v3.1.5 with: name: Python ${{ matrix.python-version }} success: needs: test runs-on: ubuntu-latest + name: Test successful steps: - name: Success run: echo Test successful From eda0e60f7c674f942e2a03c37fe23c7735ebfb74 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 01:05:25 +0200 Subject: [PATCH 4/5] Drop support for EOL Python 3.7 --- .github/workflows/test.yml | 2 +- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4808859b..150db1da 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f71f9cc..b857f568 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,13 +3,13 @@ repos: rev: v3.15.0 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py38-plus] - repo: https://github.com/psf/black-pre-commit-mirror rev: 24.1.1 hooks: - id: black - args: [--target-version=py37] + args: [--target-version=py38] - repo: https://github.com/PyCQA/isort rev: 5.13.2 diff --git a/pyproject.toml b/pyproject.toml index 95c2f408..a2b3f6bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,2 @@ [tool.black] -target_version = ['py37'] +target_version = ['py38'] From 9b19f03233cefdbb0f3cbd343322ffde61f5404a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 01:07:53 +0200 Subject: [PATCH 5/5] Add support for Python 3.11-312 --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 150db1da..0ec621b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 @@ -20,6 +20,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true cache: pip - name: Install dependencies