oe-python-template-example 0.1.19__tar.gz → 0.2.1__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 (95) hide show
  1. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.copier-answers.yml +3 -1
  2. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.github/workflows/docker-image-build-publish.yml +19 -0
  3. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/CHANGELOG.md +7 -0
  4. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/CODE_STYLE.md +2 -5
  5. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/PKG-INFO +1 -1
  6. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/SERVICE_CONNECTIONS.md +6 -0
  7. oe_python_template_example-0.2.1/VERSION +1 -0
  8. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/conf.py +1 -1
  9. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/n +1 -1
  10. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/noxfile.py +1 -1
  11. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/pyproject.toml +2 -2
  12. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/sonar-project.properties +2 -2
  13. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/src/oe_python_template_example/api.py +16 -12
  14. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/tests/api_test.py +20 -14
  15. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/uv.lock +1 -1
  16. oe_python_template_example-0.1.19/VERSION +0 -1
  17. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.act-env-public +0 -0
  18. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.devcontainer/Dockerfile +0 -0
  19. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.devcontainer/devcontainer.json +0 -0
  20. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.devcontainer/onCreateCommand +0 -0
  21. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.devcontainer/postAttachCommand +0 -0
  22. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.devcontainer/postCreateCommand +0 -0
  23. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.env.example +0 -0
  24. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.github/copilot-instructions.md +0 -0
  25. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.github/dependabot.yml +0 -0
  26. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.github/workflows/codeql.yml +0 -0
  27. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.github/workflows/package-build-publish-release.yml +0 -0
  28. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.github/workflows/test-and-report.yml +0 -0
  29. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.gitignore +0 -0
  30. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.pre-commit-config.yaml +0 -0
  31. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.python-version +0 -0
  32. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.readthedocs.yml +0 -0
  33. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.secrets.baseline +0 -0
  34. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.vscode/extensions.json +0 -0
  35. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/.vscode/settings.json +0 -0
  36. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/CODEOWNERS +0 -0
  37. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/CONTRIBUTING.md +0 -0
  38. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/Dockerfile +0 -0
  39. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/LICENSE +0 -0
  40. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/README.md +0 -0
  41. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/RELEASE_NOTES.md +0 -0
  42. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/SECURITY.md +0 -0
  43. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/bin/git-cliff +0 -0
  44. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/codecov.yml +0 -0
  45. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/compose.yaml +0 -0
  46. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/Makefile +0 -0
  47. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/make.bat +0 -0
  48. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/partials/README_footer.md +0 -0
  49. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/partials/README_header.md +0 -0
  50. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/partials/README_main.md +0 -0
  51. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/_static/.keep +0 -0
  52. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/_static/openapi.json +0 -0
  53. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/_static/openapi.yaml +0 -0
  54. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/_static/openapi_v1.json +0 -0
  55. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/_static/openapi_v1.yaml +0 -0
  56. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/_static/openapi_v2.json +0 -0
  57. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/_static/openapi_v2.yaml +0 -0
  58. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/api_v1.rst +0 -0
  59. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/api_v2.rst +0 -0
  60. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/code-style.rst +0 -0
  61. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/contributing.rst +0 -0
  62. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/index.rst +0 -0
  63. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/main.rst +0 -0
  64. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/reference.rst +0 -0
  65. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/release-notes.rst +0 -0
  66. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/docs/source/security.rst +0 -0
  67. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/examples/__init__.py +0 -0
  68. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/examples/notebook.ipynb +0 -0
  69. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/examples/notebook.py +0 -0
  70. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/examples/script.py +0 -0
  71. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/examples/streamlit.py +0 -0
  72. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/CHANGELOG.md +0 -0
  73. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/LICENSE-APACHE +0 -0
  74. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/LICENSE-MIT +0 -0
  75. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/README.md +0 -0
  76. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/completions/_git-cliff +0 -0
  77. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/completions/_git-cliff.ps1 +0 -0
  78. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/completions/git-cliff.bash +0 -0
  79. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/completions/git-cliff.elv +0 -0
  80. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/completions/git-cliff.fish +0 -0
  81. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/git-cliff-completions +0 -0
  82. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/git-cliff-mangen +0 -0
  83. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0/man/git-cliff.1 +0 -0
  84. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/git-cliff-2.7.0-x86_64-unknown-linux-gnu.tar.gz +0 -0
  85. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/github-action-run +0 -0
  86. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/logo.png +0 -0
  87. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/renovate.json +0 -0
  88. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/reports/.keep +0 -0
  89. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/src/oe_python_template_example/__init__.py +0 -0
  90. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/src/oe_python_template_example/cli.py +0 -0
  91. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/src/oe_python_template_example/constants.py +0 -0
  92. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/src/oe_python_template_example/service.py +0 -0
  93. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/tests/__init__.py +0 -0
  94. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/tests/cli_test.py +0 -0
  95. {oe_python_template_example-0.1.19 → oe_python_template_example-0.2.1}/tests/fixtures/.keep +0 -0
@@ -1,8 +1,9 @@
1
- _commit: v0.5.14
1
+ _commit: v0.6.12
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,5 +1,12 @@
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..v0.2.0) - 2025-03-16
4
+
5
+ ### ⛰️ Features
6
+
7
+ - Code-style for humans and agents - ([c03b6d5](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/commit/c03b6d5c12b4bc47bf206236a8363937177da040))
8
+
9
+
3
10
  ## [0.1.15](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/compare/v0.1.14..v0.1.15) - 2025-03-15
4
11
 
5
12
  ### ⚙️ Miscellaneous Tasks
@@ -1,12 +1,9 @@
1
1
  # Code Style
2
2
 
3
- Author: Helmut Hoffer von Ankershoffen (@helmut-hoffer-von-ankershoffen )
4
- Status: Draft
5
- Created: 2025-03-16
6
- Updated: 2025-03-16
3
+ Author: Helmut Hoffer von Ankershoffen (@helmut-hoffer-von-ankershoffen ) - Status: Draft - Created: 2025-03-16 - Updated: 2025-03-16
7
4
 
8
5
  This document describes the code style used in
9
- [oe-python-templat](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template)
6
+ [oe-python-template](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template)
10
7
  and derivatives. It defines strict requirements to be followed by all
11
8
  contributors - humans and agents - to ensure consistency and readability across
12
9
  the codebase.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template-example
3
- Version: 0.1.19
3
+ Version: 0.2.1
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.1
@@ -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.1.19"
32
+ version = "0.2.1"
33
33
  release = version
34
34
  github_username = "helmut-hoffer-von-ankershoffen"
35
35
  github_repository = "oe-python-template-example"
@@ -24,4 +24,4 @@ echo "Usage: ./n <session_name> [additional_args]"
24
24
  shift # Remove the first argument, remaining args will be passed through
25
25
 
26
26
  # Execute the command, forwarding all output
27
- exec uv run nox -s "$session" "$@"
27
+ exec uv run nox -s "$session" -- "$@"
@@ -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.1.19"
3
+ version = "0.2.1"
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.1.19"
245
+ current_version = "0.2.1"
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.1.19
3
+ sonar.projectVersion=0.2.1
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/**
@@ -21,6 +21,10 @@ from oe_python_template_example import Service
21
21
  HELLO_WORLD_EXAMPLE = "Hello, world!"
22
22
  UVICORN_HOST = os.environ.get("UVICORN_HOST", "127.0.0.1")
23
23
  UVICORN_PORT = os.environ.get("UVICORN_PORT", "8000")
24
+ CONTACT_NAME = "Helmut Hoffer von Ankershoffen"
25
+ CONTACT_EMAIL = "helmuthva@gmail.com"
26
+ CONTACT_URL = "https://github.com/helmut-hoffer-von-ankershoffen"
27
+ TERMS_OF_SERVICE_URL = "https://oe-python-template-example.readthedocs.io/en/latest/"
24
28
 
25
29
 
26
30
  def get_service() -> Generator[Service, None, None]:
@@ -41,11 +45,11 @@ api = FastAPI(
41
45
  root_path="/api",
42
46
  title="OE Python Template Example",
43
47
  contact={
44
- "name": "Helmut Hoffer von Ankershoffen",
45
- "email": "helmuthva@gmail.com",
46
- "url": "https://github.com/helmut-hoffer-von-ankershoffen",
48
+ "name": CONTACT_NAME,
49
+ "email": CONTACT_EMAIL,
50
+ "url": CONTACT_URL,
47
51
  },
48
- terms_of_service="https://oe-python-template-example.readthedocs.io/en/latest/",
52
+ terms_of_service=TERMS_OF_SERVICE_URL,
49
53
  openapi_tags=[
50
54
  {
51
55
  "name": "v1",
@@ -70,22 +74,22 @@ api_v1 = FastAPI(
70
74
  version="1.0.0",
71
75
  title="OE Python Template Example",
72
76
  contact={
73
- "name": "Helmut Hoffer von Ankershoffen",
74
- "email": "helmuthva@gmail.com",
75
- "url": "https://github.com/helmut-hoffer-von-ankershoffen",
77
+ "name": CONTACT_NAME,
78
+ "email": CONTACT_EMAIL,
79
+ "url": CONTACT_URL,
76
80
  },
77
- terms_of_service="https://oe-python-template-example.readthedocs.io/en/latest/",
81
+ terms_of_service=TERMS_OF_SERVICE_URL,
78
82
  )
79
83
 
80
84
  api_v2 = FastAPI(
81
85
  version="2.0.0",
82
86
  title="OE Python Template Example",
83
87
  contact={
84
- "name": "Helmut Hoffer von Ankershoffen",
85
- "email": "helmuthva@gmail.com",
86
- "url": "https://github.com/helmut-hoffer-von-ankershoffen",
88
+ "name": CONTACT_NAME,
89
+ "email": CONTACT_EMAIL,
90
+ "url": CONTACT_URL,
87
91
  },
88
- terms_of_service="https://oe-python-template-example.readthedocs.io/en/latest/",
92
+ terms_of_service=TERMS_OF_SERVICE_URL,
89
93
  )
90
94
 
91
95
 
@@ -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.1.19"
2078
+ version = "0.2.1"
2079
2079
  source = { editable = "." }
2080
2080
  dependencies = [
2081
2081
  { name = "fastapi", extra = ["all", "standard"] },
@@ -1 +0,0 @@
1
- 0.1.19