Skip to content

Commit

Permalink
Merge branch 'main' into no-no-setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus authored Sep 15, 2024
2 parents 68aec9f + 83e8054 commit 1be2b44
Show file tree
Hide file tree
Showing 140 changed files with 1,651 additions and 1,426 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/---feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "\U0001F381 Feature Request"
labels: ["kind/feature", "status/triage"]
description: "Did you find errors, omissions, or anything unintelligible in the documentation?"
description: "Want something new?"

body:
- type: markdown
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/.tests-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ defaults:
run:
shell: bash

env:
PYTHONWARNDEFAULTENCODING: 'true'

jobs:
mypy:
name: mypy
runs-on: ${{ inputs.runner }}
if: inputs.run-mypy
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- uses: ./.github/actions/bootstrap-poetry
id: bootstrap-poetry
Expand All @@ -37,7 +40,7 @@ jobs:

- uses: ./.github/actions/poetry-install

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: .mypy_cache
key: mypy-${{ runner.os }}-py${{ steps.bootstrap-poetry.outputs.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
Expand All @@ -52,7 +55,7 @@ jobs:
runs-on: ${{ inputs.runner }}
if: inputs.run-pytest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- uses: ./.github/actions/bootstrap-poetry
with:
Expand All @@ -74,7 +77,7 @@ jobs:
runs-on: ${{ inputs.runner }}
if: inputs.run-pytest-export
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- uses: ./.github/actions/bootstrap-poetry
with:
Expand All @@ -87,7 +90,7 @@ jobs:
- run: poetry run pip list --format json | jq -r '.[] | "\(.name)=\(.version)"' >> $GITHUB_OUTPUT
id: package-versions

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
path: poetry-plugin-export
repository: python-poetry/poetry-plugin-export
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/backport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,19 @@ jobs:
if: >
github.event.pull_request.merged
&& (
(github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'backport/'))
github.event.action == 'closed'
||
(github.event.action == 'labeled' && contains(github.event.label.name, 'backport/')
)
)
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
# This workflow requires a non-GHA token in order to trigger downstream CI, and to access the 'fork' repository.
- uses: actions/create-github-app-token@78e5f2ddc08efcb88fbbee6cfa3fed770ba550c3 # v1
- uses: actions/create-github-app-token@7bfa3a4717ef143a604ee0a99d859b8886a96d00 # v1.9.3
id: app-token
with:
app-id: ${{ secrets.POETRY_TOKEN_APP_ID }}
private-key: ${{ secrets.POETRY_TOKEN_APP_KEY }}
- name: backport.sh
run: |
git config --global user.name "${{ steps.app-token.outputs.slug }}[bot]"
git config --global user.email "${{ steps.app-token.outputs.slug }}[bot]@users.noreply.github.com"
gh repo fork --remote-name fork
./.github/scripts/backport.sh --pr ${{ github.event.pull_request.number }} --comment --remote fork
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2.0.4
with:
github_token: ${{ steps.app-token.outputs.token }}
title_template: "[<%= base %>] <%= title %>"
label_pattern: "^backport/(?<base>([^ ]+))$"
10 changes: 5 additions & 5 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ jobs:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
repository: python-poetry/website

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
path: poetry
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "18"

- uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2
- uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2.6.0
with:
hugo-version: '0.83.1'

Expand All @@ -59,7 +59,7 @@ jobs:
# Build the static website.
hugo -v --minify
- uses: amondnet/vercel-action@16e87c0a08142b0d0d33b76aeaf20823c381b9b9 # v25
- uses: amondnet/vercel-action@16e87c0a08142b0d0d33b76aeaf20823c381b9b9 # v25.2.0
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lock-threads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
permissions:
issues: write
steps:
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
with:
process-only: issues
issue-inactive-days: 30
Expand All @@ -29,7 +29,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
with:
process-only: prs
pr-inactive-days: 30
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- run: pipx run build

- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: distfiles
path: dist/
Expand All @@ -26,11 +26,17 @@ jobs:
contents: write
needs: build
steps:
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4
# We need to be in a git repo for gh to work.
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: distfiles
path: dist/

- run: gh release upload ${{ github.event.release.tag_name }} dist/*.{tar.gz,whl}
env:
GH_TOKEN: ${{ github.token }}

upload-pypi:
name: Upload (PyPI)
Expand All @@ -42,10 +48,11 @@ jobs:
id-token: write
needs: build
steps:
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: distfiles
path: dist/

- uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # release/v1
- uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
with:
print-hash: true
16 changes: 9 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
src: ${{ steps.changes.outputs.src }}
tests: ${{ steps.changes.outputs.tests }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
if: needs.changes.outputs.project == 'true'
needs: changes
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- uses: ./.github/actions/bootstrap-poetry

Expand All @@ -66,7 +66,7 @@ jobs:
if: needs.changes.outputs.project == 'true'
needs: lockfile
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- run: pipx run build

Expand All @@ -85,7 +85,7 @@ jobs:
if: needs.changes.outputs.fixtures-pypi == 'true'
needs: changes
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- uses: ./.github/actions/bootstrap-poetry

Expand All @@ -100,7 +100,7 @@ jobs:
tests-matrix:
# Use this matrix with multiple jobs defined in a reusable workflow:
uses: ./.github/workflows/.tests-matrix.yaml
name: ${{ matrix.os.name }} (Python ${{ matrix.python-version }})
name: "${{ matrix.os.name }} (Python ${{ matrix.python-version }})"
if: '!failure()'
needs:
- lockfile
Expand All @@ -117,10 +117,12 @@ jobs:
os:
- name: Ubuntu
image: ubuntu-22.04
- name: macOS
- name: macOS x86_64
image: macos-13
- name: Windows
image: windows-2022
- name: macOS aarch64
image: macos-14
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false

Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: tests/repositories/fixtures/pypi.org/metadata/.*\.metadata
Expand All @@ -22,12 +22,12 @@ repos:
- id: check-docstring-first

- repo: https://github.com/pre-commit/pre-commit
rev: v3.6.2
rev: v3.7.1
hooks:
- id: validate_manifest

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.3
rev: v0.5.4
hooks:
- id: ruff
- id: ruff-format
2 changes: 1 addition & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
entry: poetry check
language: python
pass_filenames: false
files: ^(.*/)?pyproject\.toml$
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$

- id: poetry-lock
name: poetry-lock
Expand Down
Loading

0 comments on commit 1be2b44

Please sign in to comment.