From 15f61ccdda984006f0c1fc53e107f2aa0822c33f Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Thu, 16 Jan 2025 16:42:55 +0000 Subject: [PATCH 1/3] Update actions artifact upload/download --- .github/workflows/python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 3007b77..1cf6e11 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -41,7 +41,7 @@ jobs: run: | python -m build pip install dist/*.whl - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: ./dist/* @@ -64,7 +64,7 @@ jobs: # runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: artifact path: dist @@ -98,7 +98,7 @@ jobs: permissions: id-token: write steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: artifact path: dist From 8ef179d3661eae9c6dc27eaa9ce7723460e33c86 Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Thu, 16 Jan 2025 16:46:39 +0000 Subject: [PATCH 2/3] Refresh pre-commit --- .pre-commit-config.yaml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70b9c85..342412d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,16 @@ -repos: +ci: + autoupdate_schedule: quarterly -# Automatic source code formatting -- repo: https://github.com/psf/black - rev: 23.9.1 +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.9.2 hooks: - - id: black - args: [--safe, --quiet] + - id: ruff + args: [--fix, --exit-non-zero-on-fix, --show-fixes] + - id: ruff-format -# Syntax check and some basic - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-ast -- repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.291 - hooks: - - id: ruff - args: ["--fix", "--show-fixes"] - From 356dd3b02145122590e349b3a316ef7358997d2b Mon Sep 17 00:00:00 2001 From: Nicholas Devenish Date: Thu, 16 Jan 2025 16:48:40 +0000 Subject: [PATCH 3/3] Remove lint in favour of pre-commit.ci Reformat yml --- .github/workflows/python.yml | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 1cf6e11..c5fc677 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -8,20 +8,6 @@ defaults: shell: bash -l {0} jobs: - Lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - name: Lint with Ruff - run: | - pip install ruff - ruff --output-format=github --target-version=py39 . - continue-on-error: true - Build: runs-on: ubuntu-latest steps: @@ -52,14 +38,14 @@ jobs: python-version: ["3.9", "3.10", "3.11"] os: [ubuntu-latest, windows-latest, macos-latest] exclude: - - os: windows-latest - python-version: "3.10" - - os: windows-latest - python-version: "3.11" - - os: macos-latest - python-version: "3.10" - - os: macos-latest - python-version: "3.11" + - os: windows-latest + python-version: "3.10" + - os: windows-latest + python-version: "3.11" + - os: macos-latest + python-version: "3.10" + - os: macos-latest + python-version: "3.11" runs-on: ${{ matrix.os }} # runs-on: ubuntu-latest steps: