oe-python-template-example 0.0.7__tar.gz → 0.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.copier-answers.yml +1 -1
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.pre-commit-config.yaml +2 -2
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/CHANGELOG.md +1 -1
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/CONTRIBUTING.md +1 -1
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/PKG-INFO +5 -4
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/README.md +3 -3
- oe_python_template_example-0.0.8/RELEASE_NOTES.md +1 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/SERVICE_CONNECTIONS.md +11 -2
- oe_python_template_example-0.0.8/VERSION +1 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/_readme_main.md +3 -3
- oe_python_template_example-0.0.8/docs/source/_static/openapi.json +185 -0
- oe_python_template_example-0.0.8/docs/source/_static/openapi.yaml +131 -0
- oe_python_template_example-0.0.8/docs/source/api.rst +5 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/source/conf.py +2 -1
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/source/index.rst +1 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/noxfile.py +9 -1
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/pyproject.toml +45 -43
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/sonar-project.properties +1 -1
- oe_python_template_example-0.0.8/src/oe_python_template_example/api.py +87 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/src/oe_python_template_example/cli.py +33 -0
- oe_python_template_example-0.0.8/tests/api_test.py +48 -0
- oe_python_template_example-0.0.8/tests/cli_test.py +75 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/uv.lock +300 -5
- oe_python_template_example-0.0.7/RELEASE_NOTES.md +0 -8
- oe_python_template_example-0.0.7/VERSION +0 -1
- oe_python_template_example-0.0.7/tests/cli_test.py +0 -39
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.act-env +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.act-secret +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.devcontainer/Dockerfile +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.devcontainer/devcontainer.json +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.devcontainer/onCreateCommand +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.devcontainer/postAttachCommand +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.devcontainer/postCreateCommand +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.env.example +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.github/workflows/docker-image-build-publish.yml +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.github/workflows/package-build-publish-release.yml +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.github/workflows/test-and-report.yml +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.gitignore +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.python-version +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.readthedocs.yml +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.secrets.baseline +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.vscode/extensions.json +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.vscode/settings.json +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/CODEOWNERS +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/Dockerfile +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/LICENSE +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/_readme_footer.md +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/_readme_header.md +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/bin/git-cliff +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/bump +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/codecov.yml +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/compose.yaml +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/Makefile +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/make.bat +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/source/_static/.keep +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/source/contributing.rst +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/source/latexmkrc +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/source/main.rst +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/source/reference.rst +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/docs/source/release-notes.rst +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/examples/__init__.py +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/examples/notebook.ipynb +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/examples/notebook.py +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/examples/script.py +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/examples/streamlit.py +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/CHANGELOG.md +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/LICENSE-APACHE +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/LICENSE-MIT +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/README.md +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/completions/_git-cliff +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/completions/_git-cliff.ps1 +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/completions/git-cliff.bash +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/completions/git-cliff.elv +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/completions/git-cliff.fish +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/git-cliff-completions +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/git-cliff-mangen +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0/man/git-cliff.1 +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/git-cliff-2.7.0-x86_64-unknown-linux-gnu.tar.gz +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/github-action-run +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/latexmkrc +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/logo.png +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/src/oe_python_template_example/__init__.py +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/src/oe_python_template_example/constants.py +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/src/oe_python_template_example/service.py +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/tests/__init__.py +0 -0
- {oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/tests/fixtures/.keep +0 -0
{oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/.pre-commit-config.yaml
RENAMED
@@ -53,6 +53,7 @@ repos:
|
|
53
53
|
- id: name-tests-test
|
54
54
|
- id: requirements-txt-fixer
|
55
55
|
- id: trailing-whitespace
|
56
|
+
exclude: "docs/source/_static"
|
56
57
|
- repo: https://github.com/Yelp/detect-secrets
|
57
58
|
rev: v1.5.0
|
58
59
|
hooks:
|
@@ -60,8 +61,7 @@ repos:
|
|
60
61
|
args: ['--baseline', '.secrets.baseline']
|
61
62
|
additional_dependencies: ["gibberish-detector"]
|
62
63
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
63
|
-
|
64
|
-
rev: 0.5.8
|
64
|
+
rev: 0.6.5
|
65
65
|
hooks:
|
66
66
|
- id: uv-lock
|
67
67
|
- repo: local
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[🧠 OE Python Template Example](https://oe-python-template-example.readthedocs.io/en/latest/)
|
2
2
|
|
3
|
-
## [0.0.7](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/compare/v0.0.4..
|
3
|
+
## [0.0.7](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/compare/v0.0.4..v0.0.7) - 2025-03-08
|
4
4
|
|
5
5
|
### ⚙️ Miscellaneous Tasks
|
6
6
|
|
@@ -119,7 +119,7 @@ Update scaffold from template
|
|
119
119
|
copier update --trust --skip-tasks --skip-answered
|
120
120
|
```
|
121
121
|
|
122
|
-
### Updating demo application contained within oe-python-template
|
122
|
+
### Updating demo application contained within oe-python-template-example
|
123
123
|
|
124
124
|
```shell
|
125
125
|
copier copy -r HEAD . . --force --trust
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: oe-python-template-example
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.8
|
4
4
|
Summary: 🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
|
5
5
|
Project-URL: Homepage, https://oe-python-template-example.readthedocs.io/en/latest/
|
6
6
|
Project-URL: Documentation, https://oe-python-template-example.readthedocs.io/en/latest/
|
@@ -48,6 +48,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
48
48
|
Classifier: Programming Language :: Python :: 3.13
|
49
49
|
Classifier: Typing :: Typed
|
50
50
|
Requires-Python: <4.0,>=3.11
|
51
|
+
Requires-Dist: fastapi[all,standard]>=0.115.11
|
51
52
|
Requires-Dist: pydantic>=2.10.6
|
52
53
|
Requires-Dist: python-dotenv>=1.0.1
|
53
54
|
Requires-Dist: typer>=0.15.1
|
@@ -127,7 +128,7 @@ copier copy gh:helmut-hoffer-von-ankershoffen/oe-python-template .
|
|
127
128
|
Step 4: Setup the local environment
|
128
129
|
|
129
130
|
```shell
|
130
|
-
uv run nox -s
|
131
|
+
uv run nox -s setup_dev
|
131
132
|
```
|
132
133
|
|
133
134
|
Step 5: Perform inital commit and push
|
@@ -174,8 +175,8 @@ uvx oe-python-template-example
|
|
174
175
|
The CLI provides extensive help:
|
175
176
|
|
176
177
|
```shell
|
177
|
-
uvx oe-python-template-example --help
|
178
|
-
uvx oe-python-template-example
|
178
|
+
uvx oe-python-template-example --help # all CLI commands
|
179
|
+
uvx oe-python-template-example hello-world --help # help for specific command
|
179
180
|
```
|
180
181
|
|
181
182
|
|
@@ -67,7 +67,7 @@ copier copy gh:helmut-hoffer-von-ankershoffen/oe-python-template .
|
|
67
67
|
Step 4: Setup the local environment
|
68
68
|
|
69
69
|
```shell
|
70
|
-
uv run nox -s
|
70
|
+
uv run nox -s setup_dev
|
71
71
|
```
|
72
72
|
|
73
73
|
Step 5: Perform inital commit and push
|
@@ -114,8 +114,8 @@ uvx oe-python-template-example
|
|
114
114
|
The CLI provides extensive help:
|
115
115
|
|
116
116
|
```shell
|
117
|
-
uvx oe-python-template-example --help
|
118
|
-
uvx oe-python-template-example
|
117
|
+
uvx oe-python-template-example --help # all CLI commands
|
118
|
+
uvx oe-python-template-example hello-world --help # help for specific command
|
119
119
|
```
|
120
120
|
|
121
121
|
|
@@ -0,0 +1 @@
|
|
1
|
+
|
{oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/SERVICE_CONNECTIONS.md
RENAMED
@@ -29,10 +29,10 @@
|
|
29
29
|
|
30
30
|
## Publishing package to Python Package Index (pypi.org)
|
31
31
|
|
32
|
-
1. Execute `uv
|
32
|
+
1. Execute `uv build`. This will generate the build files (wheel and tar.gz) in the `dist` folder
|
33
33
|
2. Sign-Up at https://pypi.org/
|
34
34
|
3. Goto https://pypi.org/manage/account/ and create an API token of scope "Entire account", calling it oe-python-template-example. Copy the value of the token into your clipboard.
|
35
|
-
4. Execute `uv
|
35
|
+
4. Execute `uv publish`, entering __token__ as username and paste the token from your clipboard as password. This will register your package on PyPI and upload the build files
|
36
36
|
5. Goto https://pypi.org/manage/account/ again and delete the previously created token oe-python-template-example of scope "Entire account".
|
37
37
|
6. Now create an new API token, again called oe-python-template-example, but this time of scope "Project: oe-python-template-example". Copy the token into your clipboard.
|
38
38
|
7. Goto https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/settings/secrets/actions/new and delete the previously created token.
|
@@ -60,3 +60,12 @@
|
|
60
60
|
3. Goto https://share.streamlit.io/new and click "Deploy a public app from GitHub"
|
61
61
|
4. Select the oe-python-template-example repo, for "Main file path" select `examples/streamlit.py`, for App URL enter `oe-python-template-example`.streamlit.app. Click "Deploy"
|
62
62
|
5. Goto https://oe-python-template-example.streamlit.app
|
63
|
+
|
64
|
+
## Polishing GitHub repository
|
65
|
+
|
66
|
+
1. Goto https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example
|
67
|
+
2. Click on the cogs icon in the top right corner next to about
|
68
|
+
4. Copy oe-python-template-example.readthedocs.io into the website field
|
69
|
+
3. Copy the description from the pyproject.toml file into the description field
|
70
|
+
5. Copy up to 20 tags from the pyproject.toml file into the topics field
|
71
|
+
6. Goto https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/settings and upload a soclial media image (e.g. logo.png) into the "Social preview" field
|
@@ -0,0 +1 @@
|
|
1
|
+
0.0.8
|
@@ -32,7 +32,7 @@ copier copy gh:helmut-hoffer-von-ankershoffen/oe-python-template .
|
|
32
32
|
Step 4: Setup the local environment
|
33
33
|
|
34
34
|
```shell
|
35
|
-
uv run nox -s
|
35
|
+
uv run nox -s setup_dev
|
36
36
|
```
|
37
37
|
|
38
38
|
Step 5: Perform inital commit and push
|
@@ -79,8 +79,8 @@ uvx oe-python-template-example
|
|
79
79
|
The CLI provides extensive help:
|
80
80
|
|
81
81
|
```shell
|
82
|
-
uvx oe-python-template-example --help
|
83
|
-
uvx oe-python-template-example
|
82
|
+
uvx oe-python-template-example --help # all CLI commands
|
83
|
+
uvx oe-python-template-example hello-world --help # help for specific command
|
84
84
|
```
|
85
85
|
|
86
86
|
|
@@ -0,0 +1,185 @@
|
|
1
|
+
{
|
2
|
+
"openapi": "3.1.0",
|
3
|
+
"info": {
|
4
|
+
"title": "OE Python Template Example",
|
5
|
+
"termsOfService": "https://oe-python-template-example.readthedocs.io/en/latest/",
|
6
|
+
"contact": {
|
7
|
+
"name": "Helmut Hoffer von Ankershoffen",
|
8
|
+
"url": "https://github.com/helmut-hoffer-von-ankershoffen",
|
9
|
+
"email": "helmuthva@gmail.com"
|
10
|
+
},
|
11
|
+
"version": "1.0.0"
|
12
|
+
},
|
13
|
+
"paths": {
|
14
|
+
"/hello-world": {
|
15
|
+
"get": {
|
16
|
+
"tags": [
|
17
|
+
"Basics"
|
18
|
+
],
|
19
|
+
"summary": "Hello World",
|
20
|
+
"description": "Return a hello world message.\n\nReturns:\n HelloWorldResponse: A response containing the hello world message.",
|
21
|
+
"operationId": "hello_world_hello_world_get",
|
22
|
+
"responses": {
|
23
|
+
"200": {
|
24
|
+
"description": "Successful Response",
|
25
|
+
"content": {
|
26
|
+
"application/json": {
|
27
|
+
"schema": {
|
28
|
+
"$ref": "#/components/schemas/HelloWorldResponse"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
},
|
36
|
+
"/echo": {
|
37
|
+
"post": {
|
38
|
+
"tags": [
|
39
|
+
"Basics"
|
40
|
+
],
|
41
|
+
"summary": "Echo",
|
42
|
+
"description": "Echo back the provided text.\n\nArgs:\n request (EchoRequest): The request containing the text to echo back.\n\nReturns:\n EchoResponse: A response containing the echoed text.\n\nRaises:\n 422 Unprocessable Entity: If text is not provided or empty.",
|
43
|
+
"operationId": "echo_echo_post",
|
44
|
+
"requestBody": {
|
45
|
+
"content": {
|
46
|
+
"application/json": {
|
47
|
+
"schema": {
|
48
|
+
"$ref": "#/components/schemas/EchoRequest"
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
"required": true
|
53
|
+
},
|
54
|
+
"responses": {
|
55
|
+
"200": {
|
56
|
+
"description": "Successful Response",
|
57
|
+
"content": {
|
58
|
+
"application/json": {
|
59
|
+
"schema": {
|
60
|
+
"$ref": "#/components/schemas/EchoResponse"
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
},
|
65
|
+
"422": {
|
66
|
+
"description": "Validation Error",
|
67
|
+
"content": {
|
68
|
+
"application/json": {
|
69
|
+
"schema": {
|
70
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
},
|
79
|
+
"components": {
|
80
|
+
"schemas": {
|
81
|
+
"EchoRequest": {
|
82
|
+
"properties": {
|
83
|
+
"text": {
|
84
|
+
"type": "string",
|
85
|
+
"minLength": 1,
|
86
|
+
"title": "Text",
|
87
|
+
"description": "The text to echo back",
|
88
|
+
"examples": [
|
89
|
+
"Hello, world!"
|
90
|
+
]
|
91
|
+
}
|
92
|
+
},
|
93
|
+
"type": "object",
|
94
|
+
"required": [
|
95
|
+
"text"
|
96
|
+
],
|
97
|
+
"title": "EchoRequest",
|
98
|
+
"description": "Request model for echo endpoint."
|
99
|
+
},
|
100
|
+
"EchoResponse": {
|
101
|
+
"properties": {
|
102
|
+
"message": {
|
103
|
+
"type": "string",
|
104
|
+
"minLength": 1,
|
105
|
+
"title": "Message",
|
106
|
+
"description": "The message content",
|
107
|
+
"examples": [
|
108
|
+
"Hello, world!"
|
109
|
+
]
|
110
|
+
}
|
111
|
+
},
|
112
|
+
"type": "object",
|
113
|
+
"required": [
|
114
|
+
"message"
|
115
|
+
],
|
116
|
+
"title": "EchoResponse",
|
117
|
+
"description": "Response model for echo endpoint."
|
118
|
+
},
|
119
|
+
"HTTPValidationError": {
|
120
|
+
"properties": {
|
121
|
+
"detail": {
|
122
|
+
"items": {
|
123
|
+
"$ref": "#/components/schemas/ValidationError"
|
124
|
+
},
|
125
|
+
"type": "array",
|
126
|
+
"title": "Detail"
|
127
|
+
}
|
128
|
+
},
|
129
|
+
"type": "object",
|
130
|
+
"title": "HTTPValidationError"
|
131
|
+
},
|
132
|
+
"HelloWorldResponse": {
|
133
|
+
"properties": {
|
134
|
+
"message": {
|
135
|
+
"type": "string",
|
136
|
+
"title": "Message",
|
137
|
+
"description": "The hello world message",
|
138
|
+
"examples": [
|
139
|
+
"Hello, world!"
|
140
|
+
]
|
141
|
+
}
|
142
|
+
},
|
143
|
+
"type": "object",
|
144
|
+
"required": [
|
145
|
+
"message"
|
146
|
+
],
|
147
|
+
"title": "HelloWorldResponse",
|
148
|
+
"description": "Response model for hello-world endpoint."
|
149
|
+
},
|
150
|
+
"ValidationError": {
|
151
|
+
"properties": {
|
152
|
+
"loc": {
|
153
|
+
"items": {
|
154
|
+
"anyOf": [
|
155
|
+
{
|
156
|
+
"type": "string"
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"type": "integer"
|
160
|
+
}
|
161
|
+
]
|
162
|
+
},
|
163
|
+
"type": "array",
|
164
|
+
"title": "Location"
|
165
|
+
},
|
166
|
+
"msg": {
|
167
|
+
"type": "string",
|
168
|
+
"title": "Message"
|
169
|
+
},
|
170
|
+
"type": {
|
171
|
+
"type": "string",
|
172
|
+
"title": "Error Type"
|
173
|
+
}
|
174
|
+
},
|
175
|
+
"type": "object",
|
176
|
+
"required": [
|
177
|
+
"loc",
|
178
|
+
"msg",
|
179
|
+
"type"
|
180
|
+
],
|
181
|
+
"title": "ValidationError"
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
@@ -0,0 +1,131 @@
|
|
1
|
+
components:
|
2
|
+
schemas:
|
3
|
+
EchoRequest:
|
4
|
+
description: Request model for echo endpoint.
|
5
|
+
properties:
|
6
|
+
text:
|
7
|
+
description: The text to echo back
|
8
|
+
examples:
|
9
|
+
- Hello, world!
|
10
|
+
minLength: 1
|
11
|
+
title: Text
|
12
|
+
type: string
|
13
|
+
required:
|
14
|
+
- text
|
15
|
+
title: EchoRequest
|
16
|
+
type: object
|
17
|
+
EchoResponse:
|
18
|
+
description: Response model for echo endpoint.
|
19
|
+
properties:
|
20
|
+
message:
|
21
|
+
description: The message content
|
22
|
+
examples:
|
23
|
+
- Hello, world!
|
24
|
+
minLength: 1
|
25
|
+
title: Message
|
26
|
+
type: string
|
27
|
+
required:
|
28
|
+
- message
|
29
|
+
title: EchoResponse
|
30
|
+
type: object
|
31
|
+
HTTPValidationError:
|
32
|
+
properties:
|
33
|
+
detail:
|
34
|
+
items:
|
35
|
+
$ref: '#/components/schemas/ValidationError'
|
36
|
+
title: Detail
|
37
|
+
type: array
|
38
|
+
title: HTTPValidationError
|
39
|
+
type: object
|
40
|
+
HelloWorldResponse:
|
41
|
+
description: Response model for hello-world endpoint.
|
42
|
+
properties:
|
43
|
+
message:
|
44
|
+
description: The hello world message
|
45
|
+
examples:
|
46
|
+
- Hello, world!
|
47
|
+
title: Message
|
48
|
+
type: string
|
49
|
+
required:
|
50
|
+
- message
|
51
|
+
title: HelloWorldResponse
|
52
|
+
type: object
|
53
|
+
ValidationError:
|
54
|
+
properties:
|
55
|
+
loc:
|
56
|
+
items:
|
57
|
+
anyOf:
|
58
|
+
- type: string
|
59
|
+
- type: integer
|
60
|
+
title: Location
|
61
|
+
type: array
|
62
|
+
msg:
|
63
|
+
title: Message
|
64
|
+
type: string
|
65
|
+
type:
|
66
|
+
title: Error Type
|
67
|
+
type: string
|
68
|
+
required:
|
69
|
+
- loc
|
70
|
+
- msg
|
71
|
+
- type
|
72
|
+
title: ValidationError
|
73
|
+
type: object
|
74
|
+
info:
|
75
|
+
contact:
|
76
|
+
email: helmuthva@gmail.com
|
77
|
+
name: Helmut Hoffer von Ankershoffen
|
78
|
+
url: https://github.com/helmut-hoffer-von-ankershoffen
|
79
|
+
termsOfService: https://oe-python-template-example.readthedocs.io/en/latest/
|
80
|
+
title: OE Python Template Example
|
81
|
+
version: 1.0.0
|
82
|
+
openapi: 3.1.0
|
83
|
+
paths:
|
84
|
+
/echo:
|
85
|
+
post:
|
86
|
+
description: "Echo back the provided text.\n\nArgs:\n request
|
87
|
+
(EchoRequest):\
|
88
|
+
\ The request containing the text to echo back.\n\nReturns:\n
|
89
|
+
EchoResponse:\
|
90
|
+
\ A response containing the echoed text.\n\nRaises:\n 422
|
91
|
+
Unprocessable\
|
92
|
+
\ Entity: If text is not provided or empty."
|
93
|
+
operationId: echo_echo_post
|
94
|
+
requestBody:
|
95
|
+
content:
|
96
|
+
application/json:
|
97
|
+
schema:
|
98
|
+
$ref: '#/components/schemas/EchoRequest'
|
99
|
+
required: true
|
100
|
+
responses:
|
101
|
+
'200':
|
102
|
+
content:
|
103
|
+
application/json:
|
104
|
+
schema:
|
105
|
+
$ref: '#/components/schemas/EchoResponse'
|
106
|
+
description: Successful Response
|
107
|
+
'422':
|
108
|
+
content:
|
109
|
+
application/json:
|
110
|
+
schema:
|
111
|
+
$ref: '#/components/schemas/HTTPValidationError'
|
112
|
+
description: Validation Error
|
113
|
+
summary: Echo
|
114
|
+
tags:
|
115
|
+
- Basics
|
116
|
+
/hello-world:
|
117
|
+
get:
|
118
|
+
description: "Return a hello world message.\n\nReturns:\n
|
119
|
+
HelloWorldResponse:\
|
120
|
+
\ A response containing the hello world message."
|
121
|
+
operationId: hello_world_hello_world_get
|
122
|
+
responses:
|
123
|
+
'200':
|
124
|
+
content:
|
125
|
+
application/json:
|
126
|
+
schema:
|
127
|
+
$ref: '#/components/schemas/HelloWorldResponse'
|
128
|
+
description: Successful Response
|
129
|
+
summary: Hello World
|
130
|
+
tags:
|
131
|
+
- Basics
|
@@ -20,12 +20,13 @@ extensions = [
|
|
20
20
|
"sphinx_inline_tabs",
|
21
21
|
"sphinx_mdinclude",
|
22
22
|
"sphinxext.opengraph",
|
23
|
+
"swagger_plugin_for_sphinx", # https://github.com/SAP/swagger-plugin-for-sphinx?tab=readme-ov-file
|
23
24
|
]
|
24
25
|
|
25
26
|
project = "oe-python-template-example"
|
26
27
|
author = "Helmut Hoffer von Ankershoffen"
|
27
28
|
copyright = f" (c) 2025-{datetime.now(UTC).year}, {author}" # noqa: A001
|
28
|
-
version = "0.0.
|
29
|
+
version = "0.0.8"
|
29
30
|
release = version
|
30
31
|
github_username = "helmut-hoffer-von-ankershoffen"
|
31
32
|
github_repository = "oe-python-template-example"
|
@@ -9,6 +9,8 @@ import nox
|
|
9
9
|
nox.options.reuse_existing_virtualenvs = True
|
10
10
|
nox.options.default_venv_backend = "uv"
|
11
11
|
|
12
|
+
NOT_SKIP_WITH_ACT = "not skip_with_act"
|
13
|
+
|
12
14
|
|
13
15
|
def _setup_venv(session: nox.Session, all_extras: bool = True) -> None:
|
14
16
|
"""Install dependencies for the given session using uv."""
|
@@ -57,7 +59,13 @@ def docs(session: nox.Session) -> None:
|
|
57
59
|
footer = Path("_readme_footer.md").read_text(encoding="utf-8")
|
58
60
|
readme_content = f"{header}\n\n{main}\n\n{footer}"
|
59
61
|
Path("README.md").write_text(readme_content, encoding="utf-8")
|
62
|
+
# Dump openapi schema to file
|
63
|
+
with Path("docs/source/_static/openapi.yaml").open("w", encoding="utf-8") as f:
|
64
|
+
session.run("oe-python-template-example", "openapi", stdout=f, external=True)
|
65
|
+
with Path("docs/source/_static/openapi.json").open("w", encoding="utf-8") as f:
|
66
|
+
session.run("oe-python-template-example", "openapi", "--output-format=json", stdout=f, external=True)
|
60
67
|
# Build docs
|
68
|
+
session.run("make", "-C", "docs", "clean", external=True)
|
61
69
|
session.run("make", "-C", "docs", "html", external=True)
|
62
70
|
|
63
71
|
|
@@ -98,7 +106,7 @@ def test(session: nox.Session) -> None:
|
|
98
106
|
_setup_venv(session)
|
99
107
|
pytest_args = ["pytest", "--disable-warnings", "--junitxml=junit.xml", "-n", "auto", "--dist", "loadgroup"]
|
100
108
|
if _is_act_environment():
|
101
|
-
pytest_args.extend(["-k",
|
109
|
+
pytest_args.extend(["-k", NOT_SKIP_WITH_ACT])
|
102
110
|
session.run(*pytest_args)
|
103
111
|
|
104
112
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "oe-python-template-example"
|
3
|
-
version = "0.0.
|
3
|
+
version = "0.0.8"
|
4
4
|
description = "🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template)."
|
5
5
|
readme = "README.md"
|
6
6
|
authors = [
|
@@ -59,12 +59,13 @@ classifiers = [
|
|
59
59
|
"Natural Language :: English",
|
60
60
|
]
|
61
61
|
|
62
|
-
requires-python = ">=
|
62
|
+
requires-python = ">=3.11, <4.0"
|
63
63
|
|
64
64
|
dependencies = [
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
65
|
+
"fastapi[standard,all]>=0.115.11",
|
66
|
+
"pydantic>=2.10.6",
|
67
|
+
"python-dotenv>=1.0.1",
|
68
|
+
"typer>=0.15.1",
|
68
69
|
]
|
69
70
|
|
70
71
|
[project.scripts]
|
@@ -83,47 +84,48 @@ build-backend = "hatchling.build"
|
|
83
84
|
|
84
85
|
[project.optional-dependencies]
|
85
86
|
examples = [
|
86
|
-
"streamlit
|
87
|
-
"marimo
|
88
|
-
"jupyter
|
89
|
-
"jinja2
|
87
|
+
"streamlit>=1.43.1",
|
88
|
+
"marimo>=0.11.17",
|
89
|
+
"jupyter>=1.1.1",
|
90
|
+
"jinja2>=3.1.6",
|
90
91
|
]
|
91
92
|
|
92
93
|
[dependency-groups]
|
93
94
|
dev = [
|
94
|
-
"autodoc-pydantic
|
95
|
-
"bump-my-version
|
96
|
-
"cyclonedx-py
|
97
|
-
"detect-secrets
|
98
|
-
"enum-tools
|
99
|
-
"furo
|
100
|
-
"git-cliff
|
101
|
-
"
|
102
|
-
"
|
103
|
-
"
|
104
|
-
"pip-
|
105
|
-
"
|
106
|
-
"
|
107
|
-
"
|
108
|
-
"pytest
|
109
|
-
"pytest-
|
110
|
-
"pytest-
|
111
|
-
"pytest-
|
112
|
-
"pytest-
|
113
|
-
"
|
114
|
-
"
|
115
|
-
"
|
116
|
-
"sphinx
|
117
|
-
"sphinx-
|
118
|
-
"sphinx-
|
119
|
-
"
|
120
|
-
"sphinx-
|
121
|
-
"sphinx-
|
122
|
-
"sphinx-
|
123
|
-
"
|
124
|
-
"
|
125
|
-
"
|
126
|
-
"
|
95
|
+
"autodoc-pydantic>=2.2.0",
|
96
|
+
"bump-my-version>=1.0.2",
|
97
|
+
"cyclonedx-py>=1.0.1",
|
98
|
+
"detect-secrets>=1.5.0",
|
99
|
+
"enum-tools>=0.12.0",
|
100
|
+
"furo>=2024.8.6",
|
101
|
+
"git-cliff>=2.8.0",
|
102
|
+
"matplotlib>=3.10.1",
|
103
|
+
"mypy>=1.5.0",
|
104
|
+
"nox[uv]>=2025.2.9",
|
105
|
+
"pip-audit>=2.8.0",
|
106
|
+
"pip-licenses>=5.0.0",
|
107
|
+
"pre-commit>=4.1.0",
|
108
|
+
"pyright>=1.1.396",
|
109
|
+
"pytest>=8.3.5",
|
110
|
+
"pytest-asyncio>=0.25.3",
|
111
|
+
"pytest-cov>=6.0.0",
|
112
|
+
"pytest-docker>=3.2.0",
|
113
|
+
"pytest-env>=1.1.5",
|
114
|
+
"pytest-regressions>=2.7.0",
|
115
|
+
"pytest-xdist[psutil]>=3.6.1",
|
116
|
+
"ruff>=0.9.10",
|
117
|
+
"sphinx>=8.2.3",
|
118
|
+
"sphinx-autobuild>=2024.10.3",
|
119
|
+
"sphinx-copybutton>=0.5.2",
|
120
|
+
"sphinx-inline-tabs>=2023.4.21",
|
121
|
+
"sphinx-mdinclude>=0.6.2",
|
122
|
+
"sphinx-pydantic>=0.1.1",
|
123
|
+
"sphinx-rtd-theme>=3.0.2",
|
124
|
+
"sphinx-toolbox>=3.9.0",
|
125
|
+
"sphinxext.opengraph>=0.9.1",
|
126
|
+
"swagger-plugin-for-sphinx>=5.1.0",
|
127
|
+
"tomli>=2.1.0",
|
128
|
+
"types-pyyaml>=6.0.12.20241230",
|
127
129
|
]
|
128
130
|
|
129
131
|
[tool.ruff]
|
@@ -242,7 +244,7 @@ source = ["src/"]
|
|
242
244
|
|
243
245
|
|
244
246
|
[tool.bumpversion]
|
245
|
-
current_version = "0.0.
|
247
|
+
current_version = "0.0.8"
|
246
248
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
247
249
|
serialize = ["{major}.{minor}.{patch}"]
|
248
250
|
search = "{current_version}"
|
{oe_python_template_example-0.0.7 → oe_python_template_example-0.0.8}/sonar-project.properties
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
sonar.projectKey=helmut-hoffer-von-ankershoffen_oe-python-template-example
|
2
2
|
sonar.organization=helmut-hoffer-von-ankershoffen
|
3
|
-
sonar.projectVersion=0.0.
|
3
|
+
sonar.projectVersion=0.0.8
|
4
4
|
sonar.projectDescription=🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
|
5
5
|
sonar.links.homepage=https://oe-python-template-example.readthedocs.io/en/latest/
|
6
6
|
sonar.links.scm=https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example
|