Skip to content

Commit 512252e

Browse files
chore(deps): update from template
1 parent 5aba271 commit 512252e

11 files changed

Lines changed: 73 additions & 59 deletions

File tree

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_commit: v0.6.15
1+
_commit: v0.6.20
22
_src_path: gh:helmut-hoffer-von-ankershoffen/oe-python-template
33
author_email: helmuthva@gmail.com
44
author_github_username: helmut-hoffer-von-ankershoffen

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
# Prefix the list here with "+" to use these queries and those in the config file.
7777

7878
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
79-
# queries: security-extended,security-and-quality
79+
queries: security-extended,security-and-quality
8080

8181
# If the analyze step fails for one of the languages you are analyzing with
8282
# "We were unable to automatically build your code", modify the matrix above

.github/workflows/docker-image-build-publish.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ jobs:
2121
id-token: write
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525

2626
- name: Set up QEMU
27-
uses: docker/setup-qemu-action@v3
27+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
2828

2929
- name: Set up Docker Buildx
30-
uses: docker/setup-buildx-action@v3
30+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
3131

3232

3333

3434
- name: Log in to Docker Hub
35-
uses: docker/login-action@v3
35+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
3636
with:
3737

3838
username: ${{ secrets.DOCKER_USERNAME }}
@@ -41,7 +41,7 @@ jobs:
4141

4242

4343
- name: Log in to GitHub container registry
44-
uses: docker/login-action@v3
44+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
4545
with:
4646
registry: ghcr.io
4747

@@ -51,7 +51,7 @@ jobs:
5151

5252
- name: Extract metadata (tags, labels) for Docker
5353
id: meta
54-
uses: docker/metadata-action@v5
54+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
5555
with:
5656

5757

@@ -73,7 +73,7 @@ jobs:
7373
7474
- name: Build and push Docker image
7575
id: push
76-
uses: docker/build-push-action@v6
76+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
7777
with:
7878
context: .
7979
file: ./Dockerfile
@@ -86,7 +86,7 @@ jobs:
8686

8787

8888
- name: Generate artifact attestation
89-
uses: actions/attest-build-provenance@v2
89+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
9090
with:
9191
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
9292
subject-digest: ${{ steps.push.outputs.digest }}

.github/workflows/package-build-publish-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
packages: read
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919
with:
2020
fetch-depth: 0
2121

2222
- name: Generate release notes
23-
uses: orhun/git-cliff-action@v4
23+
uses: orhun/git-cliff-action@4a4a951bc43fafe41cd2348d181853f52356bee7 # v4.4.2
2424
id: git-cliff
2525
with:
2626
config: pyproject.toml
@@ -34,9 +34,9 @@ jobs:
3434

3535

3636
- name: Install uv
37-
uses: astral-sh/setup-uv@v5
37+
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
3838
with:
39-
version: "0.5.9"
39+
version: "0.6.7"
4040
cache-dependency-glob: uv.lock
4141
enable-cache: true
4242

.github/workflows/test-and-report.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
id-token: write
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
with:
2222
fetch-depth: 0
2323

@@ -30,7 +30,7 @@ jobs:
3030
sudo apt-get install -y curl jq xsltproc gnupg2 libcairo2
3131
3232
- name: Install uv (python package manager)
33-
uses: astral-sh/setup-uv@v5
33+
uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
3434
with:
3535
version: "0.5.9"
3636
enable-cache: true
@@ -58,7 +58,7 @@ jobs:
5858
echo "Development build - Current version in pyproject.toml: $TOML_VERSION"
5959
6060
- name: Create .env file
61-
uses: SpicyPizza/create-envfile@v2.0
61+
uses: SpicyPizza/create-envfile@ace6d4f5d7802b600276c23ca417e669f1a06f6f # v2.0.3
6262
with:
6363
envkey_ENV_KEY: "ENV_VALUE"
6464
fail_on_empty: true
@@ -80,7 +80,7 @@ jobs:
8080
uv run nox
8181
8282
- name: Upload test results
83-
uses: actions/upload-artifact@v4
83+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
8484
if: ${{ always() && (env.GITHUB_WORKFLOW_RUNTIME != 'ACT') }}
8585
with:
8686
name: test-results
@@ -94,20 +94,20 @@ jobs:
9494
retention-days: 30
9595

9696
- name: Upload coverage reports to Codecov
97-
uses: codecov/codecov-action@v5
97+
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
9898
if: ${{ !cancelled() && (env.GITHUB_WORKFLOW_RUNTIME != 'ACT') }}
9999
with:
100100
token: ${{ secrets.CODECOV_TOKEN }}
101101
slug: helmut-hoffer-von-ankershoffen/oe-python-template-example
102102

103103
- name: Upload test results to Codecov
104104
if: ${{ !cancelled() && (env.GITHUB_WORKFLOW_RUNTIME != 'ACT') }}
105-
uses: codecov/test-results-action@v1
105+
uses: codecov/test-results-action@f2dba722c67b86c6caa034178c6e4d35335f6706 # v1.1.0
106106
with:
107107
token: ${{ secrets.CODECOV_TOKEN }}
108108
- name: SonarQube Scan
109109
if: ${{ !cancelled() && (env.GITHUB_WORKFLOW_RUNTIME != 'ACT') }}
110-
uses: SonarSource/sonarqube-scan-action@v5
110+
uses: SonarSource/sonarqube-scan-action@0303d6b62e310685c0e34d0b9cde218036885c4d # v5.0.0
111111
env:
112112
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113113
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ fi
2020
which jq &> /dev/null || brew install jq
2121
which xmllint &> /dev/null || brew install xmllint
2222
which act &> /dev/null || brew install act
23+
which pinact &> /dev/null || brew install pinact
2324
uv run pre-commit install # install pre-commit hooks, see https://pre-commit.com/
2425
```
2526

@@ -88,9 +89,10 @@ uv run nox -s test # run tests
8889
uv run nox -s lint # run formatting and linting
8990
uv run nox -s audit # run security and license audit, inc. sbom generation
9091
uv run nox -s docs # build documentation, output in docs/build/html
92+
uv run nox -s docs_pdf # locally build pdf manual to docs/build/latex/oe-python-template-example.pdf
9193
```
9294

93-
As a shortcut, you can run build steps using `./n`:
95+
As a shortcut, you can run build steps using `./n`, e.g.
9496

9597
```shell
9698
./n test
@@ -129,22 +131,20 @@ docker build -t oe-python-template-example .
129131
docker run --env THE_VAR=THE_VALUE oe-python-template-example --help
130132
```
131133

132-
### Copier
133-
134-
Update from template
134+
### Pinning github actions
135135

136136
```shell
137-
uv run nox -s update_from_template
137+
pinact run # See https://dev.to/suzukishunsuke/pin-github-actions-to-a-full-length-commit-sha-for-security-2n7p
138138
```
139139

140-
### Generate PDF manual
140+
### Copier
141+
142+
Update from template
141143

142144
```shell
143-
brew install mactex # install MacTeX, will take a while and requires sudo
144-
./n docs_pdf # build latex, then generate pdf from it. Output in docs/build/latex/oe-python-template-example.pdf
145+
uv run nox -s update_from_template
145146
```
146147

147-
148148
## Pull Request Guidelines
149149

150150
- Before starting to write code read the [code style guide](CODE_STYLE.md) document for mandatory coding style
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Traceback (most recent call last):
22
File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/bin/oe-python-template-example", line 4, in <module>
33
from oe_python_template_example.cli import cli
4-
File "/Users/helmut/Code/oe-python-template-example/src/oe_python_template_example/cli.py", line 9, in <module>
5-
import yaml
6-
File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/yaml/__init__.py", line 8, in <module>
7-
from .loader import *
8-
File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/yaml/loader.py", line 8, in <module>
9-
from .constructor import *
10-
File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/yaml/constructor.py", line 19, in <module>
11-
class BaseConstructor:
12-
...<149 lines>...
13-
cls.yaml_multi_constructors[tag_prefix] = multi_constructor
4+
File "/Users/helmut/Code/oe-python-template-example/src/oe_python_template_example/cli.py", line 7, in <module>
5+
import typer
6+
File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/typer/__init__.py", line 29, in <module>
7+
from .main import Typer as Typer
8+
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
9+
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
10+
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
11+
File "<frozen importlib._bootstrap_external>", line 1022, in exec_module
12+
File "<frozen importlib._bootstrap_external>", line 1118, in get_code
13+
File "<frozen importlib._bootstrap_external>", line 1218, in get_data
1414
KeyboardInterrupt

docs/source/api_v1.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ API V1
33

44
.. only:: html
55

6-
.. swagger-plugin:: _static/openapi_v1.yaml
7-
:full-page:
6+
.. swagger-plugin:: _static/openapi_v1.yaml
7+
:full-page:
88

9-
.. only:: singlehtml
10-
11-
Visit the `Interactive API Documentation <https://oe-python-template-example.readthedocs.io/en/latest/api_v1.html>`_
12-
13-
.. only:: latex
14-
15-
Visit the `Interactive API Documentation <https://oe-python-template-example.readthedocs.io/en/latest/api_v1.html>`_
9+
Visit the `Interactive API Documentation <https: //oe-python-template-example.readthedocs.io/en/latest/api_v1.html>`_

docs/source/api_v2.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,4 @@ API V2
66
.. swagger-plugin:: _static/openapi_v2.yaml
77
:full-page:
88

9-
.. only:: singlehtml
10-
11-
Visit the `Interactive API Documentation <https://oe-python-template-example.readthedocs.io/en/latest/api_v2.html>`_
12-
13-
.. only:: latex
14-
15-
Visit the `Interactive API Documentation <https://oe-python-template-example.readthedocs.io/en/latest/api_v2.html>`_
9+
Visit the `Interactive API Documentation <https://oe-python-template-example.readthedocs.io/en/latest/api_v2.html>`_

examples/notebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def _():
1010

1111
service = Service()
1212
message = service.get_hello_world()
13-
message # type: ignore
13+
print(message)
1414
return Service, message, service
1515

1616

0 commit comments

Comments
 (0)