Skip to content

Commit 7182f40

Browse files
authored
Merge branch 'main' into dm/dep-group
2 parents d5439a9 + d5a1d6a commit 7182f40

8 files changed

Lines changed: 51 additions & 52 deletions

File tree

.github/workflows/tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ on:
66
- main
77
pull_request:
88

9+
permissions: {}
10+
911
jobs:
1012
self-test:
1113
runs-on: ubuntu-latest
1214
steps:
13-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1416
with:
1517
persist-credentials: false
1618

1719
- name: Install uv
18-
uses: astral-sh/setup-uv@v5
20+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
1921
with:
20-
enable-cache: true
2122
cache-dependency-glob: cookiecutter.json
2223

2324
# we need the git config setup here to make sure the subsequent git commit in each test works

.github/workflows/zizmor.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,22 @@ on:
66
pull_request:
77
branches: ["**"]
88

9+
permissions: {}
10+
911
jobs:
1012
zizmor:
1113
name: zizmor latest via PyPI
1214
runs-on: ubuntu-latest
1315
permissions:
14-
security-events: write
15-
# required for workflows in private repositories
16-
contents: read
17-
actions: read
16+
security-events: write # needed by upload-sarif for all repositories
1817
steps:
1918
- name: Checkout repository
20-
uses: actions/checkout@v4
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2120
with:
2221
persist-credentials: false
2322

2423
- name: Install the latest version of uv
25-
uses: astral-sh/setup-uv@v5
24+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
2625

2726
- name: Run zizmor 🌈
2827
# Run it for both this repo and the templated cookiecutter repo.
@@ -31,7 +30,7 @@ jobs:
3130
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3231

3332
- name: Upload SARIF file
34-
uses: github/codeql-action/upload-sarif@v3
33+
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
3534
with:
3635
sarif_file: results.sarif
3736
category: zizmor

{{cookiecutter.project_slug}}/.github/workflows/docs.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ on:
55
branches:
66
- main
77

8+
permissions: {}
9+
810
jobs:
911
build:
1012
runs-on: ubuntu-latest
1113
steps:
12-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1315
with:
1416
persist-credentials: false
1517

1618
- name: Install uv
17-
uses: astral-sh/setup-uv@v5
18-
with:
19-
enable-cache: true
20-
cache-dependency-glob: pyproject.toml
19+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
2120

2221
- name: setup
2322
run: |
@@ -28,7 +27,7 @@ jobs:
2827
make doc
2928
3029
- name: upload docs artifact
31-
uses: actions/upload-pages-artifact@v3
30+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
3231
with:
3332
path: ./html/
3433

@@ -44,4 +43,4 @@ jobs:
4443
url: ${{ steps.deployment.outputs.page_url }}
4544
steps:
4645
- id: deployment
47-
uses: actions/deploy-pages@v4
46+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

{{cookiecutter.project_slug}}/.github/workflows/lint.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@ on:
66
- main
77
pull_request:
88

9+
permissions: {}
10+
911
jobs:
1012
lint:
1113
runs-on: ubuntu-latest
1214
steps:
13-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1416
with:
1517
persist-credentials: false
1618

1719
- name: Install uv
18-
uses: astral-sh/setup-uv@v5
19-
with:
20-
enable-cache: true
21-
cache-dependency-glob: pyproject.toml
20+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
2221

2322
- name: lint
2423
run: make lint INSTALL_EXTRA=lint

{{cookiecutter.project_slug}}/.github/workflows/release.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,25 @@ on:
55

66
name: release
77

8+
permissions: {}
9+
810
jobs:
911
build:
1012
name: Build distributions
1113
runs-on: ubuntu-latest
1214
steps:
13-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1416
with:
1517
persist-credentials: false
1618

1719
- name: Install uv
18-
uses: astral-sh/setup-uv@v5
19-
with:
20-
enable-cache: true
21-
cache-dependency-glob: pyproject.toml
20+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
2221

2322
- name: Build distributions
2423
run: uv build
2524

2625
- name: Upload distributions
27-
uses: actions/upload-artifact@v4
26+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
2827
with:
2928
name: distributions
3029
path: dist/
@@ -38,12 +37,12 @@ jobs:
3837
attestations: write # To persist the attestation files.
3938
steps:
4039
- name: Download distributions
41-
uses: actions/download-artifact@v4
40+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
4241
with:
4342
name: distributions
4443
path: dist/
4544
- name: Generate build provenance
46-
uses: actions/attest-build-provenance@v2
45+
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
4746
with:
4847
subject-path: 'dist/*'
4948

@@ -60,12 +59,12 @@ jobs:
6059
id-token: write
6160
steps:
6261
- name: Download distributions
63-
uses: actions/download-artifact@v4
62+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
6463
with:
6564
name: distributions
6665
path: dist/
6766

6867
- name: Publish distributions
69-
uses: pypa/gh-action-pypi-publish@release/v1
68+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
7069
with:
7170
attestations: true

{{cookiecutter.project_slug}}/.github/workflows/tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- main
77
pull_request:
88

9+
permissions: {}
10+
911
jobs:
1012
test:
1113
strategy:
@@ -17,15 +19,12 @@ jobs:
1719
- "3.12"
1820
runs-on: ubuntu-latest
1921
steps:
20-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2123
with:
2224
persist-credentials: false
2325

2426
- name: Install uv
25-
uses: astral-sh/setup-uv@v5
26-
with:
27-
enable-cache: true
28-
cache-dependency-glob: pyproject.toml
27+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
2928

3029
- name: Install Python ${{ matrix.python }}
3130
run: uv python install ${{ matrix.python }}

{{cookiecutter.project_slug}}/.github/workflows/zizmor.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,32 @@ on:
66
pull_request:
77
branches: ["**"]
88

9+
permissions: {}
10+
911
jobs:
1012
zizmor:
1113
name: zizmor latest via PyPI
1214
runs-on: ubuntu-latest
1315
permissions:
14-
security-events: write
15-
# required for workflows in private repositories
16-
contents: read
17-
actions: read
16+
security-events: write # needed by upload-sarif for all repositories
17+
contents: read # needed by upload-sarif for private repositories
18+
actions: read # needed by upload-sarif for private repositories
1819
steps:
1920
- name: Checkout repository
20-
uses: actions/checkout@v4
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2122
with:
2223
persist-credentials: false
2324

2425
- name: Install the latest version of uv
25-
uses: astral-sh/setup-uv@v5
26+
uses: astral-sh/setup-uv@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
2627

2728
- name: Run zizmor 🌈
2829
run: uvx zizmor --format sarif . > results.sarif
2930
env:
3031
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3132

3233
- name: Upload SARIF file
33-
uses: github/codeql-action/upload-sarif@v3
34+
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
3435
with:
3536
sarif_file: results.sarif
3637
category: zizmor

{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@ name = "{{ cookiecutter.project_slug }}"
33
dynamic = ["version"]
44
description = "{{ cookiecutter.project_description }}"
55
readme = "README.md"
6-
license = { file = "LICENSE" }
6+
license-files = ["LICENSE"]
7+
8+
{%- if cookiecutter.license == "Apache 2.0" %}
9+
license = "Apache-2.0"
10+
{%- elif cookiecutter.license == "AGPL v3" %}
11+
license = "AGPL-3.0-or-later"
12+
{%- elif cookiecutter.license == "Proprietary" %}
13+
license = "LicenseRef-Proprietary-License"
14+
{%- endif %}
15+
716
authors = [
817
{ name = "{{ cookiecutter.author_name }}", email = "{{ cookiecutter.author_email }}" },
918
]
1019
classifiers = [
1120
"Programming Language :: Python :: 3",
12-
{%- if cookiecutter.license == "Apache 2.0" %}
13-
"License :: OSI Approved :: Apache Software License",
14-
{%- elif cookiecutter.license == "AGPL v3" %}
15-
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
16-
{%- elif cookiecutter.license == "Proprietary" %}
17-
"License :: Other/Proprietary License",
18-
{%- endif %}
1921
]
2022
dependencies = []
2123
requires-python = ">=3.9"

0 commit comments

Comments
 (0)