Skip to content

Commit 034c9ab

Browse files
committed
Merge branch 'stable'
2 parents c757984 + cdf0674 commit 034c9ab

20 files changed

+1530
-430
lines changed

.github/workflows/lock.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
permissions:
1111
issues: write
1212
pull-requests: write
13+
discussions: write
1314
concurrency:
1415
group: lock
1516
jobs:

.github/workflows/pre-commit.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,24 @@ name: pre-commit
22
on:
33
pull_request:
44
push:
5-
branches: [main, '*.x']
5+
branches: [main, stable]
66
jobs:
77
main:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
11-
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
12-
with:
13-
python-version: 3.x
14-
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
15-
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
16-
if: ${{ !cancelled() }}
10+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
11+
- uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
12+
with:
13+
enable-cache: true
14+
prune-cache: false
15+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
16+
id: setup-python
17+
with:
18+
python-version-file: pyproject.toml
19+
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
20+
with:
21+
path: ~/.cache/pre-commit
22+
key: pre-commit|${{ hashFiles('pyproject.toml', '.pre-commit-config.yaml') }}
23+
- run: uv run --locked --group pre-commit pre-commit run --show-diff-on-failure --color=always --all-files
24+
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
25+
if: ${{ !cancelled() }}

.github/workflows/publish.yaml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
name: Publish
22
on:
33
push:
4-
tags:
5-
- '*'
4+
tags: ['*']
65
jobs:
76
build:
87
runs-on: ubuntu-latest
98
outputs:
109
hash: ${{ steps.hash.outputs.hash }}
1110
steps:
1211
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13-
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
12+
- uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
1413
with:
15-
python-version: '3.x'
16-
cache: pip
17-
cache-dependency-path: requirements*/*.txt
18-
- run: pip install -r requirements/build.txt
19-
# Use the commit date instead of the current date during the build.
14+
enable-cache: true
15+
prune-cache: false
16+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
17+
with:
18+
python-version-file: pyproject.toml
2019
- run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
21-
- run: python -m build
22-
# Generate hashes used for provenance.
20+
- run: uv build
2321
- name: generate hash
2422
id: hash
2523
run: cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
26-
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
24+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
2725
with:
2826
path: ./dist
2927
provenance:
@@ -33,18 +31,16 @@ jobs:
3331
id-token: write
3432
contents: write
3533
# Can't pin with hash due to how this workflow works.
36-
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
34+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
3735
with:
3836
base64-subjects: ${{ needs.build.outputs.hash }}
3937
create-release:
40-
# Upload the sdist, wheels, and provenance to a GitHub release. They remain
41-
# available as build artifacts for a while as well.
4238
needs: [provenance]
4339
runs-on: ubuntu-latest
4440
permissions:
4541
contents: write
4642
steps:
47-
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
43+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
4844
- name: create release
4945
run: >
5046
gh release create --draft --repo ${{ github.repository }}
@@ -54,22 +50,14 @@ jobs:
5450
GH_TOKEN: ${{ github.token }}
5551
publish-pypi:
5652
needs: [provenance]
57-
# Wait for approval before attempting to upload to PyPI. This allows reviewing the
58-
# files in the draft release.
5953
environment:
6054
name: publish
6155
url: https://pypi.org/project/blinker/${{ github.ref_name }}
6256
runs-on: ubuntu-latest
6357
permissions:
6458
id-token: write
6559
steps:
66-
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
67-
- uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2
68-
with:
69-
repository-url: https://test.pypi.org/legacy/
70-
packages-dir: artifact/
71-
skip-existing: true
72-
attestations: false
73-
- uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2
60+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
61+
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
7462
with:
7563
packages-dir: artifact/

.github/workflows/tests.yaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Tests
22
on:
3+
pull_request:
4+
paths-ignore: ['docs/**', 'README.md']
35
push:
46
branches: [main, stable]
5-
paths-ignore: ['docs/**', '*.md', '*.rst']
6-
pull_request:
7-
paths-ignore: [ 'docs/**', '*.md', '*.rst' ]
7+
paths-ignore: ['docs/**', 'README.md']
88
jobs:
99
tests:
1010
name: ${{ matrix.name || matrix.python }}
@@ -20,27 +20,28 @@ jobs:
2020
- {python: '3.9'}
2121
steps:
2222
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23-
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
23+
- uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
24+
with:
25+
enable-cache: true
26+
prune-cache: false
27+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2428
with:
2529
python-version: ${{ matrix.python }}
26-
allow-prereleases: true
27-
cache: pip
28-
cache-dependency-path: requirements*/*.txt
29-
- run: pip install tox
30-
- run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
30+
- run: uv run --locked tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
3131
typing:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35-
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
35+
- uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
36+
with:
37+
enable-cache: true
38+
prune-cache: false
39+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3640
with:
37-
python-version: '3.x'
38-
cache: pip
39-
cache-dependency-path: requirements*/*.txt
41+
python-version-file: pyproject.toml
4042
- name: cache mypy
41-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
43+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4244
with:
4345
path: ./.mypy_cache
4446
key: mypy|${{ hashFiles('pyproject.toml') }}
45-
- run: pip install tox
46-
- run: tox run -e typing
47+
- run: uv run --locked tox run -e typing

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.idea/
22
.vscode/
3-
.venv*/
4-
venv*/
53
__pycache__/
64
dist/
75
.coverage*

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.7.3
3+
rev: d19233b89771be2d89273f163f5edc5a39bbc34a # frozen: v0.11.12
44
hooks:
55
- id: ruff
66
- id: ruff-format
7+
- repo: https://github.com/astral-sh/uv-pre-commit
8+
rev: 648bdbfd6bb1a82f132ecc2c666e0d1b2e4b0d94 # frozen: 0.7.8
9+
hooks:
10+
- id: uv-lock
711
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v5.0.0
12+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
913
hooks:
1014
- id: check-merge-conflict
1115
- id: debug-statements

.readthedocs.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
version: 2
22
build:
3-
os: ubuntu-22.04
3+
os: ubuntu-24.04
44
tools:
5-
python: '3.12'
6-
python:
7-
install:
8-
- requirements: requirements/docs.txt
9-
- method: pip
10-
path: .
11-
sphinx:
12-
builder: dirhtml
13-
fail_on_warning: true
5+
python: '3.13'
6+
commands:
7+
- asdf plugin add uv
8+
- asdf install uv latest
9+
- asdf global uv latest
10+
- uv run --group docs sphinx-build -W -b dirhtml docs $READTHEDOCS_OUTPUT/html

0 commit comments

Comments
 (0)