oe-python-template-example 0.2.0__tar.gz → 0.2.2__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.
Files changed (97) hide show
  1. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.copier-answers.yml +3 -1
  2. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.github/workflows/docker-image-build-publish.yml +19 -0
  3. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/CHANGELOG.md +1 -1
  4. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/PKG-INFO +1 -1
  5. oe_python_template_example-0.2.2/RELEASE_NOTES.md +1 -0
  6. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/SERVICE_CONNECTIONS.md +6 -0
  7. oe_python_template_example-0.2.2/VERSION +1 -0
  8. oe_python_template_example-0.2.2/docs/source/_static/openapi_v1.yaml +34 -0
  9. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/_static/openapi_v2.yaml +16 -32
  10. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/conf.py +1 -1
  11. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/noxfile.py +1 -1
  12. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/pyproject.toml +2 -2
  13. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/sonar-project.properties +2 -2
  14. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/src/oe_python_template_example/api.py +20 -15
  15. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/tests/api_test.py +20 -14
  16. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/uv.lock +1 -1
  17. oe_python_template_example-0.2.0/RELEASE_NOTES.md +0 -8
  18. oe_python_template_example-0.2.0/VERSION +0 -1
  19. oe_python_template_example-0.2.0/docs/source/_static/openapi_v1.yaml +0 -204
  20. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.act-env-public +0 -0
  21. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.devcontainer/Dockerfile +0 -0
  22. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.devcontainer/devcontainer.json +0 -0
  23. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.devcontainer/onCreateCommand +0 -0
  24. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.devcontainer/postAttachCommand +0 -0
  25. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.devcontainer/postCreateCommand +0 -0
  26. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.env.example +0 -0
  27. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.github/copilot-instructions.md +0 -0
  28. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.github/dependabot.yml +0 -0
  29. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.github/workflows/codeql.yml +0 -0
  30. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.github/workflows/package-build-publish-release.yml +0 -0
  31. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.github/workflows/test-and-report.yml +0 -0
  32. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.gitignore +0 -0
  33. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.pre-commit-config.yaml +0 -0
  34. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.python-version +0 -0
  35. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.readthedocs.yml +0 -0
  36. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.secrets.baseline +0 -0
  37. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.vscode/extensions.json +0 -0
  38. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/.vscode/settings.json +0 -0
  39. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/CODEOWNERS +0 -0
  40. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/CODE_STYLE.md +0 -0
  41. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/CONTRIBUTING.md +0 -0
  42. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/Dockerfile +0 -0
  43. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/LICENSE +0 -0
  44. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/README.md +0 -0
  45. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/SECURITY.md +0 -0
  46. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/bin/git-cliff +0 -0
  47. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/codecov.yml +0 -0
  48. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/compose.yaml +0 -0
  49. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/Makefile +0 -0
  50. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/make.bat +0 -0
  51. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/partials/README_footer.md +0 -0
  52. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/partials/README_header.md +0 -0
  53. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/partials/README_main.md +0 -0
  54. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/_static/.keep +0 -0
  55. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/_static/openapi.json +0 -0
  56. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/_static/openapi.yaml +0 -0
  57. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/_static/openapi_v1.json +0 -0
  58. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/_static/openapi_v2.json +0 -0
  59. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/api_v1.rst +0 -0
  60. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/api_v2.rst +0 -0
  61. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/code-style.rst +0 -0
  62. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/contributing.rst +0 -0
  63. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/index.rst +0 -0
  64. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/main.rst +0 -0
  65. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/reference.rst +0 -0
  66. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/release-notes.rst +0 -0
  67. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/docs/source/security.rst +0 -0
  68. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/examples/__init__.py +0 -0
  69. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/examples/notebook.ipynb +0 -0
  70. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/examples/notebook.py +0 -0
  71. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/examples/script.py +0 -0
  72. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/examples/streamlit.py +0 -0
  73. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/CHANGELOG.md +0 -0
  74. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/LICENSE-APACHE +0 -0
  75. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/LICENSE-MIT +0 -0
  76. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/README.md +0 -0
  77. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/completions/_git-cliff +0 -0
  78. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/completions/_git-cliff.ps1 +0 -0
  79. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/completions/git-cliff.bash +0 -0
  80. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/completions/git-cliff.elv +0 -0
  81. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/completions/git-cliff.fish +0 -0
  82. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/git-cliff-completions +0 -0
  83. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/git-cliff-mangen +0 -0
  84. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0/man/git-cliff.1 +0 -0
  85. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/git-cliff-2.7.0-x86_64-unknown-linux-gnu.tar.gz +0 -0
  86. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/github-action-run +0 -0
  87. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/logo.png +0 -0
  88. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/n +0 -0
  89. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/renovate.json +0 -0
  90. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/reports/.keep +0 -0
  91. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/src/oe_python_template_example/__init__.py +0 -0
  92. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/src/oe_python_template_example/cli.py +0 -0
  93. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/src/oe_python_template_example/constants.py +0 -0
  94. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/src/oe_python_template_example/service.py +0 -0
  95. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/tests/__init__.py +0 -0
  96. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/tests/cli_test.py +0 -0
  97. {oe_python_template_example-0.2.0 → oe_python_template_example-0.2.2}/tests/fixtures/.keep +0 -0
@@ -1,8 +1,9 @@
1
- _commit: v0.6.0
1
+ _commit: v0.6.14
2
2
  _src_path: gh:helmut-hoffer-von-ankershoffen/oe-python-template
3
3
  author_email: helmuthva@gmail.com
4
4
  author_github_username: helmut-hoffer-von-ankershoffen
5
5
  author_name: Helmut Hoffer von Ankershoffen
6
+ docker_io_enabled: true
6
7
  docker_io_image_name: oe-python-template-example
7
8
  docker_io_owner: helmuthva
8
9
  github_repository_name: oe-python-template-example
@@ -16,6 +17,7 @@ project_description: Example project scaffolded and kept up to date with OE Pyth
16
17
  project_icon: 🧠
17
18
  project_name: OE Python Template Example
18
19
  pypi_distribution_name: oe-python-template-example
20
+ readthedocs_domain: readthedocs.org
19
21
  readthedocs_project_key: oe-python-template-example
20
22
  sonarqube_key: helmut-hoffer-von-ankershoffen_oe-python-template-example
21
23
  streamlit_project_key: oe-python-template-example
@@ -5,6 +5,7 @@ on:
5
5
  tags:
6
6
  - "v*.*.*"
7
7
 
8
+
8
9
  env:
9
10
  REGISTRY: docker.io
10
11
  IMAGE_NAME: helmuthva/oe-python-template-example
@@ -28,25 +29,38 @@ jobs:
28
29
  - name: Set up Docker Buildx
29
30
  uses: docker/setup-buildx-action@v3
30
31
 
32
+
33
+
31
34
  - name: Log in to Docker Hub
32
35
  uses: docker/login-action@v3
33
36
  with:
37
+
34
38
  username: ${{ secrets.DOCKER_USERNAME }}
35
39
  password: ${{ secrets.DOCKER_PASSWORD }}
36
40
 
41
+
42
+
37
43
  - name: Log in to GitHub container registry
38
44
  uses: docker/login-action@v3
39
45
  with:
40
46
  registry: ghcr.io
47
+
41
48
  username: ${{ github.actor }}
42
49
  password: ${{ secrets.GITHUB_TOKEN }}
50
+
51
+
43
52
  - name: Extract metadata (tags, labels) for Docker
44
53
  id: meta
45
54
  uses: docker/metadata-action@v5
46
55
  with:
56
+
57
+
47
58
  images: |
48
59
  ${{ env.IMAGE_NAME }}
49
60
  ghcr.io/${{ github.repository }}
61
+
62
+
63
+
50
64
  tags: |
51
65
  # set latest tag for releases
52
66
  type=raw,value=latest
@@ -55,6 +69,8 @@ jobs:
55
69
  type=semver,pattern={{major}}.{{minor}}
56
70
  type=semver,pattern={{major}}
57
71
 
72
+
73
+
58
74
  - name: Build and push Docker image
59
75
  id: push
60
76
  uses: docker/build-push-action@v6
@@ -66,6 +82,9 @@ jobs:
66
82
  tags: ${{ steps.meta.outputs.tags }}
67
83
  labels: ${{ steps.meta.outputs.labels }}
68
84
 
85
+
86
+
87
+
69
88
  - name: Generate artifact attestation
70
89
  uses: actions/attest-build-provenance@v2
71
90
  with:
@@ -1,6 +1,6 @@
1
1
  [🧠 OE Python Template Example](https://oe-python-template-example.readthedocs.io/en/latest/)
2
2
 
3
- ## [0.2.0](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/compare/v0.1.19..0.2.0) - 2025-03-16
3
+ ## [0.2.0](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/compare/v0.1.19..v0.2.0) - 2025-03-16
4
4
 
5
5
  ### ⛰️ Features
6
6
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template-example
3
- Version: 0.2.0
3
+ Version: 0.2.2
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/
@@ -27,6 +27,12 @@
27
27
  4. On https://app.readthedocs.org/projects/oe-python-template-example/ wait for the build of the documentation to finish
28
28
  5. Goto https://oe-python-template-example.readthedocs.io/en/latest/
29
29
 
30
+ ## Automatic dependency updates via Rennovate (https://github.com/apps/renovate)
31
+
32
+ 1. Goto https://github.com/apps/renovate and click the "Configure" button
33
+ 2. Select the owner of your project's repository and configure "Repository access"
34
+ 3. Rennovate creates a [Dependency Dashboard](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/issues) as an issue in your repository
35
+
30
36
  ## Publishing package to Python Package Index (pypi.org)
31
37
 
32
38
  1. Execute `uv build`. This will generate the build files (wheel and tar.gz) in the `dist` folder
@@ -0,0 +1 @@
1
+ 0.2.2
@@ -0,0 +1,34 @@
1
+ Traceback (most recent call last):
2
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/bin/oe-python-template-example", line 4, in <module>
3
+ 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 13, in <module>
5
+ from oe_python_template_example.api import api_v1, api_v2
6
+ File "/Users/helmut/Code/oe-python-template-example/src/oe_python_template_example/api.py", line 16, in <module>
7
+ from fastapi import Depends, FastAPI, Response, status
8
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/fastapi/__init__.py", line 7, in <module>
9
+ from .applications import FastAPI as FastAPI
10
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/fastapi/applications.py", line 16, in <module>
11
+ from fastapi import routing
12
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/fastapi/routing.py", line 34, in <module>
13
+ from fastapi.dependencies.models import Dependant
14
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/fastapi/dependencies/models.py", line 5, in <module>
15
+ from fastapi.security.base import SecurityBase
16
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/fastapi/security/__init__.py", line 1, in <module>
17
+ from .api_key import APIKeyCookie as APIKeyCookie
18
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/fastapi/security/api_key.py", line 6, in <module>
19
+ from starlette.requests import Request
20
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/starlette/requests.py", line 12, in <module>
21
+ from starlette.formparsers import FormParser, MultiPartException, MultiPartParser
22
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/starlette/formparsers.py", line 17, in <module>
23
+ import python_multipart as multipart
24
+ File "/Users/helmut/Code/oe-python-template-example/.nox/docs-3-13/lib/python3.13/site-packages/python_multipart/__init__.py", line 7, in <module>
25
+ from .multipart import (
26
+ ...<7 lines>...
27
+ )
28
+ File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
29
+ File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
30
+ File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
31
+ File "<frozen importlib._bootstrap_external>", line 1022, in exec_module
32
+ File "<frozen importlib._bootstrap_external>", line 1155, in get_code
33
+ File "<frozen importlib._bootstrap_external>", line 784, in _compile_bytecode
34
+ KeyboardInterrupt
@@ -104,12 +104,9 @@ openapi: 3.1.0
104
104
  paths:
105
105
  /echo:
106
106
  post:
107
- description: "Echo back the provided utterance.\n\nArgs:\n request
108
- (Utterance):\
109
- \ The request containing the utterance to echo back.\n\nReturns:\n
110
- EchoResponse:\
111
- \ A response containing the echoed utterance.\n\nRaises:\n 422
112
- Unprocessable\
107
+ description: "Echo back the provided utterance.\n\nArgs:\n request (Utterance):\
108
+ \ The request containing the utterance to echo back.\n\nReturns:\n EchoResponse:\
109
+ \ A response containing the echoed utterance.\n\nRaises:\n 422 Unprocessable\
113
110
  \ Entity: If utterance is not provided or empty."
114
111
  operationId: echo_v2_echo_post
115
112
  requestBody:
@@ -136,18 +133,12 @@ Unprocessable\
136
133
  - Basics
137
134
  /health:
138
135
  get:
139
- description: "Check the health of the service.\n\nThis endpoint returns
140
- the\
141
- \ health status of the service.\nThe health status can be either UP or
142
- DOWN.\n\
143
- If the service is healthy, the status will be UP.\nIf the service is
144
- unhealthy,\
145
- \ the status will be DOWN and a reason will be provided.\nThe response
146
- will\
147
- \ have a 200 OK status code if the service is healthy,\nand a 500
148
- Internal\
149
- \ Server Error status code if the service is unhealthy.\n\nReturns:\n
150
- Health:\
136
+ description: "Check the health of the service.\n\nThis endpoint returns the\
137
+ \ health status of the service.\nThe health status can be either UP or DOWN.\n\
138
+ If the service is healthy, the status will be UP.\nIf the service is unhealthy,\
139
+ \ the status will be DOWN and a reason will be provided.\nThe response will\
140
+ \ have a 200 OK status code if the service is healthy,\nand a 500 Internal\
141
+ \ Server Error status code if the service is unhealthy.\n\nReturns:\n Health:\
151
142
  \ The health status of the service."
152
143
  operationId: health_health_get
153
144
  responses:
@@ -162,18 +153,12 @@ Health:\
162
153
  - Observability
163
154
  /healthz:
164
155
  get:
165
- description: "Check the health of the service.\n\nThis endpoint returns
166
- the\
167
- \ health status of the service.\nThe health status can be either UP or
168
- DOWN.\n\
169
- If the service is healthy, the status will be UP.\nIf the service is
170
- unhealthy,\
171
- \ the status will be DOWN and a reason will be provided.\nThe response
172
- will\
173
- \ have a 200 OK status code if the service is healthy,\nand a 500
174
- Internal\
175
- \ Server Error status code if the service is unhealthy.\n\nReturns:\n
176
- Health:\
156
+ description: "Check the health of the service.\n\nThis endpoint returns the\
157
+ \ health status of the service.\nThe health status can be either UP or DOWN.\n\
158
+ If the service is healthy, the status will be UP.\nIf the service is unhealthy,\
159
+ \ the status will be DOWN and a reason will be provided.\nThe response will\
160
+ \ have a 200 OK status code if the service is healthy,\nand a 500 Internal\
161
+ \ Server Error status code if the service is unhealthy.\n\nReturns:\n Health:\
177
162
  \ The health status of the service."
178
163
  operationId: health_healthz_get
179
164
  responses:
@@ -188,8 +173,7 @@ Health:\
188
173
  - Observability
189
174
  /hello-world:
190
175
  get:
191
- description: "Return a hello world message.\n\nReturns:\n
192
- HelloWorldResponse:\
176
+ description: "Return a hello world message.\n\nReturns:\n HelloWorldResponse:\
193
177
  \ A response containing the hello world message."
194
178
  operationId: hello_world_hello_world_get
195
179
  responses:
@@ -29,7 +29,7 @@ extensions = [
29
29
  project = "oe-python-template-example"
30
30
  author = "Helmut Hoffer von Ankershoffen"
31
31
  copyright = f" (c) 2025-{datetime.now(UTC).year}, {author}" # noqa: A001
32
- version = "0.2.0"
32
+ version = "0.2.2"
33
33
  release = version
34
34
  github_username = "helmut-hoffer-von-ankershoffen"
35
35
  github_repository = "oe-python-template-example"
@@ -191,7 +191,7 @@ def bump(session: nox.Session) -> None:
191
191
  version_part = session.posargs[0] if session.posargs else "patch"
192
192
 
193
193
  # Check if the version_part is a specific version (e.g., 1.2.3)
194
- if re.match(r"^[0-9]+\.[0-9]+\.[0-9]+$", version_part):
194
+ if re.match(r"^\d+\.\d+\.\d+$", version_part):
195
195
  session.run("bump-my-version", "bump", "--new-version", version_part, external=True)
196
196
  else:
197
197
  session.run("bump-my-version", "bump", version_part, external=True)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "oe-python-template-example"
3
- version = "0.2.0"
3
+ version = "0.2.2"
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 = [
@@ -242,7 +242,7 @@ source = ["src/"]
242
242
 
243
243
 
244
244
  [tool.bumpversion]
245
- current_version = "0.2.0"
245
+ current_version = "0.2.2"
246
246
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
247
247
  serialize = ["{major}.{minor}.{patch}"]
248
248
  search = "{current_version}"
@@ -1,12 +1,12 @@
1
1
  sonar.projectKey=helmut-hoffer-von-ankershoffen_oe-python-template-example
2
2
  sonar.organization=helmut-hoffer-von-ankershoffen
3
- sonar.projectVersion=0.2.0
3
+ sonar.projectVersion=0.2.2
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
7
7
  sonar.links.ci=https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/actions
8
8
  sonar.links.issues=https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/issues
9
- sonar.python.coverage.reportPaths=coverage.xml
9
+ sonar.python.coverage.reportPaths=reports/coverage.xml
10
10
  sonar.python.version=3.11, 3.12, 3.13
11
11
  sonar.coverage.exclusions=noxfile.py, tests/**, examples/**, docs/**
12
12
  sonar.exclusions=examples/**, docs/**
@@ -18,9 +18,14 @@ from pydantic import BaseModel, Field
18
18
 
19
19
  from oe_python_template_example import Service
20
20
 
21
+ TITLE = "OE Python Template Example"
21
22
  HELLO_WORLD_EXAMPLE = "Hello, world!"
22
23
  UVICORN_HOST = os.environ.get("UVICORN_HOST", "127.0.0.1")
23
24
  UVICORN_PORT = os.environ.get("UVICORN_PORT", "8000")
25
+ CONTACT_NAME = "Helmut Hoffer von Ankershoffen"
26
+ CONTACT_EMAIL = "helmuthva@gmail.com"
27
+ CONTACT_URL = "https://github.com/helmut-hoffer-von-ankershoffen"
28
+ TERMS_OF_SERVICE_URL = "https://oe-python-template-example.readthedocs.io/en/latest/"
24
29
 
25
30
 
26
31
  def get_service() -> Generator[Service, None, None]:
@@ -39,13 +44,13 @@ def get_service() -> Generator[Service, None, None]:
39
44
 
40
45
  api = FastAPI(
41
46
  root_path="/api",
42
- title="OE Python Template Example",
47
+ title=TITLE,
43
48
  contact={
44
- "name": "Helmut Hoffer von Ankershoffen",
45
- "email": "helmuthva@gmail.com",
46
- "url": "https://github.com/helmut-hoffer-von-ankershoffen",
49
+ "name": CONTACT_NAME,
50
+ "email": CONTACT_EMAIL,
51
+ "url": CONTACT_URL,
47
52
  },
48
- terms_of_service="https://oe-python-template-example.readthedocs.io/en/latest/",
53
+ terms_of_service=TERMS_OF_SERVICE_URL,
49
54
  openapi_tags=[
50
55
  {
51
56
  "name": "v1",
@@ -68,24 +73,24 @@ api = FastAPI(
68
73
 
69
74
  api_v1 = FastAPI(
70
75
  version="1.0.0",
71
- title="OE Python Template Example",
76
+ title=TITLE,
72
77
  contact={
73
- "name": "Helmut Hoffer von Ankershoffen",
74
- "email": "helmuthva@gmail.com",
75
- "url": "https://github.com/helmut-hoffer-von-ankershoffen",
78
+ "name": CONTACT_NAME,
79
+ "email": CONTACT_EMAIL,
80
+ "url": CONTACT_URL,
76
81
  },
77
- terms_of_service="https://oe-python-template-example.readthedocs.io/en/latest/",
82
+ terms_of_service=TERMS_OF_SERVICE_URL,
78
83
  )
79
84
 
80
85
  api_v2 = FastAPI(
81
86
  version="2.0.0",
82
- title="OE Python Template Example",
87
+ title=TITLE,
83
88
  contact={
84
- "name": "Helmut Hoffer von Ankershoffen",
85
- "email": "helmuthva@gmail.com",
86
- "url": "https://github.com/helmut-hoffer-von-ankershoffen",
89
+ "name": CONTACT_NAME,
90
+ "email": CONTACT_EMAIL,
91
+ "url": CONTACT_URL,
87
92
  },
88
- terms_of_service="https://oe-python-template-example.readthedocs.io/en/latest/",
93
+ terms_of_service=TERMS_OF_SERVICE_URL,
89
94
  )
90
95
 
91
96
 
@@ -19,6 +19,12 @@ HEALTH_PATH_V2 = "/api/v2/health"
19
19
  HEALTHZ_PATH_V1 = "/api/v1/healthz"
20
20
  HEALTHZ_PATH_V2 = "/api/v2/healthz"
21
21
 
22
+ HELLO_WORLD = "Hello, world!"
23
+
24
+ SERVICE_UP = "UP"
25
+ SERVICE_DOWN = "DOWN"
26
+ SERVICE_IS_UNHEALTHY = "Service is unhealthy"
27
+
22
28
 
23
29
  @pytest.fixture
24
30
  def client() -> TestClient:
@@ -37,11 +43,11 @@ def test_hello_world_endpoint(client: TestClient) -> None:
37
43
  """Test that the hello-world endpoint returns the expected message."""
38
44
  response = client.get(HELLO_WORLD_PATH_V1)
39
45
  assert response.status_code == 200
40
- assert response.json()["message"].startswith("Hello, world!")
46
+ assert response.json()["message"].startswith(HELLO_WORLD)
41
47
 
42
48
  response = client.get(HELLO_WORLD_PATH_V2)
43
49
  assert response.status_code == 200
44
- assert response.json()["message"].startswith("Hello, world!")
50
+ assert response.json()["message"].startswith(HELLO_WORLD)
45
51
 
46
52
 
47
53
  def test_echo_endpoint_valid_input(client: TestClient) -> None:
@@ -79,22 +85,22 @@ def test_health_endpoint(client: TestClient) -> None:
79
85
  """Test that the health endpoint returns UP status."""
80
86
  response = client.get(HEALTH_PATH_V1)
81
87
  assert response.status_code == 200
82
- assert response.json()["status"] == "UP"
88
+ assert response.json()["status"] == SERVICE_UP
83
89
  assert response.json()["reason"] is None
84
90
 
85
91
  response = client.get(HEALTH_PATH_V2)
86
92
  assert response.status_code == 200
87
- assert response.json()["status"] == "UP"
93
+ assert response.json()["status"] == SERVICE_UP
88
94
  assert response.json()["reason"] is None
89
95
 
90
96
  response = client.get(HEALTHZ_PATH_V1)
91
97
  assert response.status_code == 200
92
- assert response.json()["status"] == "UP"
98
+ assert response.json()["status"] == SERVICE_UP
93
99
  assert response.json()["reason"] is None
94
100
 
95
101
  response = client.get(HEALTHZ_PATH_V2)
96
102
  assert response.status_code == 200
97
- assert response.json()["status"] == "UP"
103
+ assert response.json()["status"] == SERVICE_UP
98
104
  assert response.json()["reason"] is None
99
105
 
100
106
 
@@ -107,20 +113,20 @@ def test_health_endpoint_down(mock_service, client: TestClient) -> None:
107
113
 
108
114
  response = client.get(HEALTH_PATH_V1)
109
115
  assert response.status_code == 500
110
- assert response.json()["status"] == "DOWN"
111
- assert response.json()["reason"] == "Service is unhealthy"
116
+ assert response.json()["status"] == SERVICE_DOWN
117
+ assert response.json()["reason"] == SERVICE_IS_UNHEALTHY
112
118
 
113
119
  response = client.get(HEALTH_PATH_V2)
114
120
  assert response.status_code == 500
115
- assert response.json()["status"] == "DOWN"
116
- assert response.json()["reason"] == "Service is unhealthy"
121
+ assert response.json()["status"] == SERVICE_DOWN
122
+ assert response.json()["reason"] == SERVICE_IS_UNHEALTHY
117
123
 
118
124
  response = client.get(HEALTHZ_PATH_V1)
119
125
  assert response.status_code == 500
120
- assert response.json()["status"] == "DOWN"
121
- assert response.json()["reason"] == "Service is unhealthy"
126
+ assert response.json()["status"] == SERVICE_DOWN
127
+ assert response.json()["reason"] == SERVICE_IS_UNHEALTHY
122
128
 
123
129
  response = client.get(HEALTHZ_PATH_V2)
124
130
  assert response.status_code == 500
125
- assert response.json()["status"] == "DOWN"
126
- assert response.json()["reason"] == "Service is unhealthy"
131
+ assert response.json()["status"] == SERVICE_DOWN
132
+ assert response.json()["reason"] == SERVICE_IS_UNHEALTHY
@@ -2075,7 +2075,7 @@ wheels = [
2075
2075
 
2076
2076
  [[package]]
2077
2077
  name = "oe-python-template-example"
2078
- version = "0.2.0"
2078
+ version = "0.2.2"
2079
2079
  source = { editable = "." }
2080
2080
  dependencies = [
2081
2081
  { name = "fastapi", extra = ["all", "standard"] },
@@ -1,8 +0,0 @@
1
- ## [0.2.0](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/compare/v0.1.19..v0.2.0) - 2025-03-16
2
-
3
- ### ⛰️ Features
4
-
5
- - Code-style for humans and agents - ([c03b6d5](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/commit/c03b6d5c12b4bc47bf206236a8363937177da040))
6
-
7
-
8
-
@@ -1 +0,0 @@
1
- 0.2.0
@@ -1,204 +0,0 @@
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
- Health:
41
- description: Health status model.
42
- properties:
43
- reason:
44
- anyOf:
45
- - type: string
46
- - type: 'null'
47
- title: Reason
48
- status:
49
- $ref: '#/components/schemas/_HealthStatus'
50
- required:
51
- - status
52
- title: Health
53
- type: object
54
- HelloWorldResponse:
55
- description: Response model for hello-world endpoint.
56
- properties:
57
- message:
58
- description: The hello world message
59
- examples:
60
- - Hello, world!
61
- title: Message
62
- type: string
63
- required:
64
- - message
65
- title: HelloWorldResponse
66
- type: object
67
- ValidationError:
68
- properties:
69
- loc:
70
- items:
71
- anyOf:
72
- - type: string
73
- - type: integer
74
- title: Location
75
- type: array
76
- msg:
77
- title: Message
78
- type: string
79
- type:
80
- title: Error Type
81
- type: string
82
- required:
83
- - loc
84
- - msg
85
- - type
86
- title: ValidationError
87
- type: object
88
- _HealthStatus:
89
- description: Health status enumeration.
90
- enum:
91
- - UP
92
- - DOWN
93
- title: _HealthStatus
94
- type: string
95
- info:
96
- contact:
97
- email: helmuthva@gmail.com
98
- name: Helmut Hoffer von Ankershoffen
99
- url: https://github.com/helmut-hoffer-von-ankershoffen
100
- termsOfService: https://oe-python-template-example.readthedocs.io/en/latest/
101
- title: OE Python Template Example
102
- version: 1.0.0
103
- openapi: 3.1.0
104
- paths:
105
- /echo:
106
- post:
107
- description: "Echo back the provided text.\n\nArgs:\n request
108
- (EchoRequest):\
109
- \ The request containing the text to echo back.\n\nReturns:\n
110
- EchoResponse:\
111
- \ A response containing the echoed text.\n\nRaises:\n 422
112
- Unprocessable\
113
- \ Entity: If text is not provided or empty."
114
- operationId: echo_echo_post
115
- requestBody:
116
- content:
117
- application/json:
118
- schema:
119
- $ref: '#/components/schemas/EchoRequest'
120
- required: true
121
- responses:
122
- '200':
123
- content:
124
- application/json:
125
- schema:
126
- $ref: '#/components/schemas/EchoResponse'
127
- description: Successful Response
128
- '422':
129
- content:
130
- application/json:
131
- schema:
132
- $ref: '#/components/schemas/HTTPValidationError'
133
- description: Validation Error
134
- summary: Echo
135
- tags:
136
- - Basics
137
- /health:
138
- get:
139
- description: "Check the health of the service.\n\nThis endpoint returns
140
- the\
141
- \ health status of the service.\nThe health status can be either UP or
142
- DOWN.\n\
143
- If the service is healthy, the status will be UP.\nIf the service is
144
- unhealthy,\
145
- \ the status will be DOWN and a reason will be provided.\nThe response
146
- will\
147
- \ have a 200 OK status code if the service is healthy,\nand a 500
148
- Internal\
149
- \ Server Error status code if the service is unhealthy.\n\nReturns:\n
150
- Health:\
151
- \ The health status of the service."
152
- operationId: health_health_get
153
- responses:
154
- '200':
155
- content:
156
- application/json:
157
- schema:
158
- $ref: '#/components/schemas/Health'
159
- description: Successful Response
160
- summary: Health
161
- tags:
162
- - Observability
163
- /healthz:
164
- get:
165
- description: "Check the health of the service.\n\nThis endpoint returns
166
- the\
167
- \ health status of the service.\nThe health status can be either UP or
168
- DOWN.\n\
169
- If the service is healthy, the status will be UP.\nIf the service is
170
- unhealthy,\
171
- \ the status will be DOWN and a reason will be provided.\nThe response
172
- will\
173
- \ have a 200 OK status code if the service is healthy,\nand a 500
174
- Internal\
175
- \ Server Error status code if the service is unhealthy.\n\nReturns:\n
176
- Health:\
177
- \ The health status of the service."
178
- operationId: health_healthz_get
179
- responses:
180
- '200':
181
- content:
182
- application/json:
183
- schema:
184
- $ref: '#/components/schemas/Health'
185
- description: Successful Response
186
- summary: Health
187
- tags:
188
- - Observability
189
- /hello-world:
190
- get:
191
- description: "Return a hello world message.\n\nReturns:\n
192
- HelloWorldResponse:\
193
- \ A response containing the hello world message."
194
- operationId: hello_world_hello_world_get
195
- responses:
196
- '200':
197
- content:
198
- application/json:
199
- schema:
200
- $ref: '#/components/schemas/HelloWorldResponse'
201
- description: Successful Response
202
- summary: Hello World
203
- tags:
204
- - Basics