Skip to content

Commit 6662b6b

Browse files
chore(deps): update from template
1 parent 61cf45c commit 6662b6b

43 files changed

Lines changed: 1994 additions & 212 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.copier-answers.yml

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

.dockerignore

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# .dockerignore of project OE Python Template Example
2+
3+
# .dockerfile specifics
4+
5+
**/.git
6+
**/.gitignore
7+
Dockerfile
8+
docker-compose.yml
9+
10+
# Environment
11+
**/.env
12+
**/.env.backup
13+
**/.env.bak
14+
**/ENV/
15+
**/env/
16+
**/.envrc
17+
18+
## secrets
19+
**/.secret
20+
**/.secrets
21+
**/.secrets.toml
22+
**/.secrets.yaml
23+
**/.secrets.yml
24+
**/.secrets.json
25+
**/.act-env-secret
26+
27+
# More secrets
28+
**/.ssh
29+
**/.aws
30+
31+
# Python virtual environment
32+
**/venv/
33+
**/.venv/
34+
35+
# Python temps
36+
**/*.py[cdo]
37+
**/__pycache__/
38+
**/*.so
39+
**/*.egg
40+
**/*.egg-info/
41+
**/*.log
42+
**/dist/
43+
**/build/
44+
**/eggs/
45+
**/parts/
46+
**/sdist/
47+
**/develop-eggs/
48+
**/.installed.cfg
49+
**/.Python
50+
**/.pytest_cache/
51+
**/.ruff_cache/
52+
**/.nox
53+
**/.dmypy.json
54+
**/.mypy_cache/
55+
**/.coverage
56+
**/.coverage.*
57+
58+
59+
# Build Report
60+
**/reports/*
61+
**/!reports/.keep
62+
**/!reports/README.md
63+
64+
# IDE
65+
**/.idea/
66+
**/*.swp
67+
**/*.swo
68+
69+
# macOS
70+
**/.DS_Store
71+
72+
# Other OS
73+
**/lib/
74+
**/lib64/
75+
76+
# Data
77+
**/var/
78+
**/tmp/
79+
80+
# Node temps
81+
**/node_modules/
82+
83+
# AI workflow
84+
**/.fixme
85+
86+
# Copier
87+
**/*.rej
88+
89+
90+
# Vercel
91+
**/.vercel
92+
93+
94+
# Application specific

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

Lines changed: 59 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ on:
77

88

99
env:
10-
REGISTRY: docker.io
11-
IMAGE_NAME: helmuthva/oe-python-template-example
10+
DOCKER_IO_REGISTRY: docker.io
11+
DOCKER_IO_IMAGE_NAME_ALL: helmuthva/oe-python-template-example
12+
DOCKER_IO_IMAGE_NAME_SLIM: helmuthva/oe-python-template-example-slim
1213

1314

1415
jobs:
@@ -52,14 +53,14 @@ jobs:
5253
password: ${{ secrets.GITHUB_TOKEN }}
5354

5455

55-
- name: Extract metadata (tags, labels) for Docker
56-
id: meta
56+
- name: (all target): Extract metadata (tags, labels) for Docker
57+
id: meta-all
5758
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
5859
with:
5960

6061

6162
images: |
62-
${{ env.IMAGE_NAME }}
63+
${{ env.DOCKER_IO_IMAGE_NAME_ALL }}
6364
ghcr.io/${{ github.repository }}
6465
6566
@@ -73,25 +74,71 @@ jobs:
7374
type=semver,pattern={{major}}
7475
7576
77+
- name: (slim target): Extract metadata (tags, labels) for Docker
78+
id: meta-slim
79+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
80+
with:
81+
82+
83+
images: |
84+
${{ env.DOCKER_IO_IMAGE_NAME_SLIM }}
85+
ghcr.io/${{ github.repository }}-slim
86+
87+
88+
89+
tags: |
90+
# set latest tag for releases
91+
type=raw,value=latest
92+
# set semver tags from git tags (v1.2.3 -> 1.2.3, 1.2, 1)
93+
type=semver,pattern={{version}}
94+
type=semver,pattern={{major}}.{{minor}}
95+
type=semver,pattern={{major}}
96+
97+
7698
77-
- name: Build and push Docker image
78-
id: push
99+
- name: (all target):Build and push Docker image
100+
id: build-and-push-all
79101
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
80102
with:
81103
context: .
82104
file: ./Dockerfile
105+
target: all
83106
platforms: linux/amd64,linux/arm64
84107
push: true
85-
tags: ${{ steps.meta.outputs.tags }}
86-
labels: ${{ steps.meta.outputs.labels }}
108+
tags: ${{ steps.meta-all.outputs.tags }}
109+
labels: ${{ steps.meta-all.outputs.labels }}
87110

88111

89112

113+
- name: (slim target):Build and push Docker image
114+
id: build-and-push-slim
115+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
116+
with:
117+
context: .
118+
file: ./Dockerfile
119+
target: slim
120+
platforms: linux/amd64,linux/arm64
121+
push: true
122+
tags: ${{ steps.meta-slim.outputs.tags }}
123+
labels: ${{ steps.meta-slim.outputs.labels }}
124+
125+
126+
127+
128+
129+
- name: (all target): Generate artifact attestation
130+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
131+
with:
132+
subject-name: ${{ env.DOCKER_IO_REGISTRY }}/${{ env.DOCKER_IO_IMAGE_NAME_ALL }}
133+
subject-digest: ${{ steps.build-and-push-all.outputs.digest }}
134+
push-to-registry: true
135+
136+
90137

91138

92-
- name: Generate artifact attestation
139+
- name: (slim target): Generate artifact attestation
93140
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
94141
with:
95-
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
96-
subject-digest: ${{ steps.push.outputs.digest }}
142+
subject-name: ${{ env.DOCKER_IO_REGISTRY }}/${{ env.DOCKER_IO_IMAGE_NAME_SLIM }}
143+
subject-digest: ${{ steps.build-and-push-slim.outputs.digest }}
97144
push-to-registry: true

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ jobs:
5757
envkey_ENV: "TEST"
5858
envkey_OE_PYTHON_TEMPLATE_EXAMPLE_LOGFIRE_TOKEN: "${{ secrets.OE_PYTHON_TEMPLATE_EXAMPLE_LOGFIRE_TOKEN }}"
5959
envkey_OE_PYTHON_TEMPLATE_EXAMPLE_SENTRY_DSN: "${{ secrets.OE_PYTHON_TEMPLATE_EXAMPLE_SENTRY_DSN }}"
60-
envkey_OE_PYTHON_TEMPLATE_EXAMPLE_LOG_LEVEL: "DEBUG"
61-
envkey_OE_PYTHON_TEMPLATE_EXAMPLE_LOG_FILE_ENABLED: 1
6260
fail_on_empty: false
6361

6462
- name: Validate installation

.github/workflows/test-scheduled.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ jobs:
3232
envkey_ENV: "TEST"
3333
envkey_OE_PYTHON_TEMPLATE_EXAMPLE_LOGFIRE_TOKEN: "${{ secrets.OE_PYTHON_TEMPLATE_EXAMPLE_LOGFIRE_TOKEN }}"
3434
envkey_OE_PYTHON_TEMPLATE_EXAMPLE_SENTRY_DSN: "${{ secrets.OE_PYTHON_TEMPLATE_EXAMPLE_SENTRY_DSN }}"
35-
envkey_OE_PYTHON_TEMPLATE_EXAMPLE_LOG_LEVEL: "DEBUG"
36-
envkey_OE_PYTHON_TEMPLATE_EXAMPLE_LOG_FILE_ENABLED: 1
3735
fail_on_empty: false
3836

3937
- name: Run scheduled tests

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ env/
1717
.secrets.json
1818
.act-env-secret
1919

20+
# More secrets
21+
.ssh
22+
.aws
23+
2024
# Python virtual environment
2125
venv/
2226
.venv/
@@ -69,6 +73,7 @@ tmp/
6973
# Node temps
7074
node_modules/
7175

76+
7277
# AI workflow
7378
.fixme
7479

@@ -80,4 +85,5 @@ node_modules/
8085
.vercel
8186

8287

83-
# Application specific
88+
89+
# Application specific

.license-types-allowed

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Apache-2.0
55
Apache License, Version 2.0
66
Apache License 2.0
77
0BSD
8+
BSD
89
BSD License
910
BSD-2-Clause
1011
CC0 1.0
@@ -19,4 +20,4 @@ Python Software Foundation License
1920
UNKNOWN
2021
Unlicense
2122

22-
# Additions for oe-python-template-example
23+
# Additions for oe-python-template-example

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.11
1+
3.13

CLI_REFERENCE.md

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CLI Reference
22

3-
Command Line Interface of
3+
Command Line Interface of OE Python Template Example
44

55
**Usage**:
66

@@ -18,9 +18,41 @@ $ oe-python-template-example [OPTIONS] COMMAND [ARGS]...
1818

1919
**Commands**:
2020

21+
* `gui`: Start graphical user interface (GUI) in...
22+
* `notebook`: Start notebook in web browser.
2123
* `hello`: Hello commands
2224
* `system`: System commands
2325

26+
## `oe-python-template-example gui`
27+
28+
Start graphical user interface (GUI) in native window.
29+
30+
**Usage**:
31+
32+
```console
33+
$ oe-python-template-example gui [OPTIONS]
34+
```
35+
36+
**Options**:
37+
38+
* `--help`: Show this message and exit.
39+
40+
## `oe-python-template-example notebook`
41+
42+
Start notebook in web browser.
43+
44+
**Usage**:
45+
46+
```console
47+
$ oe-python-template-example notebook [OPTIONS]
48+
```
49+
50+
**Options**:
51+
52+
* `--host TEXT`: Host to bind the server to [default: 127.0.0.1]
53+
* `--port INTEGER`: Port to bind the server to [default: 8001]
54+
* `--help`: Show this message and exit.
55+
2456
## `oe-python-template-example hello`
2557

2658
Hello commands
@@ -95,7 +127,7 @@ $ oe-python-template-example system [OPTIONS] COMMAND [ARGS]...
95127

96128
* `health`: Determine and print system health.
97129
* `info`: Determine and print system info.
98-
* `serve`: Start the webservice API server.
130+
* `serve`: Start the web server, hosting the...
99131
* `openapi`: Dump the OpenAPI specification.
100132
* `fail`: Fail by dividing by zero.
101133
* `sleep`: Sleep given for given number of seconds.
@@ -142,12 +174,15 @@ $ oe-python-template-example system info [OPTIONS]
142174

143175
### `oe-python-template-example system serve`
144176

145-
Start the webservice API server.
177+
Start the web server, hosting the graphical web application and/or webservice API.
146178

147179
Args:
180+
app (bool): Enable web application.
181+
api (bool): Enable webservice API.
148182
host (str): Host to bind the server to.
149183
port (int): Port to bind the server to.
150-
watch (bool): Enable auto-reload.
184+
watch (bool): Enable auto-reload on changes of source code.
185+
open_browser (bool): Open app in browser after starting the server.
151186

152187
**Usage**:
153188

@@ -157,9 +192,12 @@ $ oe-python-template-example system serve [OPTIONS]
157192

158193
**Options**:
159194

195+
* `--app / --no-app`: Enable web application [default: app]
196+
* `--api / --no-api`: Enable webservice API [default: api]
160197
* `--host TEXT`: Host to bind the server to [default: 127.0.0.1]
161198
* `--port INTEGER`: Port to bind the server to [default: 8000]
162-
* `--watch / --no-watch`: Enable auto-reload [default: watch]
199+
* `--watch / --no-watch`: Enable auto-reload on changes of source code [default: watch]
200+
* `--open-browser / --no-open-browser`: Open app in browser after starting the server [default: no-open-browser]
163201
* `--help`: Show this message and exit.
164202

165203
### `oe-python-template-example system openapi`

0 commit comments

Comments
 (0)