oe-python-template 0.12.14__tar.gz → 0.12.16__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-0.12.14 → oe_python_template-0.12.16}/PKG-INFO +1 -2
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/pyproject.toml +8 -11
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/boot.py +18 -0
- oe_python_template-0.12.16/src/oe_python_template/vendored/bottle.py +4563 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/.gitignore +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/LICENSE +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/README.md +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/__init__.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/api.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/cli.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/constants.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/hello/__init__.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/hello/_api.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/hello/_cli.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/hello/_constants.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/hello/_gui.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/hello/_models.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/hello/_service.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/hello/_settings.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/system/__init__.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/system/_api.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/system/_cli.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/system/_gui.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/system/_service.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/system/_settings.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/__init__.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_api.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_cli.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_console.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_constants.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_di.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_gui.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_health.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_log.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_logfire.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_notebook.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_process.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_sentry.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_service.py +0 -0
- {oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/_settings.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: oe-python-template
|
3
|
-
Version: 0.12.
|
3
|
+
Version: 0.12.16
|
4
4
|
Summary: 🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling.
|
5
5
|
Project-URL: Homepage, https://oe-python-template.readthedocs.io/en/latest/
|
6
6
|
Project-URL: Documentation, https://oe-python-template.readthedocs.io/en/latest/
|
@@ -48,7 +48,6 @@ 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: bottle
|
52
51
|
Requires-Dist: fastapi[all,standard]>=0.115.12
|
53
52
|
Requires-Dist: logfire[system-metrics]>=3.13.1
|
54
53
|
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.53b0
|
@@ -1,9 +1,11 @@
|
|
1
1
|
[project]
|
2
2
|
name = "oe-python-template"
|
3
|
-
version = "0.12.
|
3
|
+
version = "0.12.16"
|
4
4
|
description = "🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling."
|
5
5
|
readme = "README.md"
|
6
|
-
authors = [
|
6
|
+
authors = [
|
7
|
+
{ name = "Helmut Hoffer von Ankershoffen", email = "helmuthva@gmail.com" },
|
8
|
+
]
|
7
9
|
license = { file = "LICENSE" }
|
8
10
|
|
9
11
|
keywords = [
|
@@ -61,7 +63,6 @@ requires-python = ">=3.11, <4.0"
|
|
61
63
|
|
62
64
|
dependencies = [
|
63
65
|
# From Template
|
64
|
-
"bottle",
|
65
66
|
"fastapi[standard,all]>=0.115.12",
|
66
67
|
"logfire[system-metrics]>=3.13.1",
|
67
68
|
"opentelemetry-instrumentation-fastapi>=0.53b0",
|
@@ -88,9 +89,7 @@ examples = [
|
|
88
89
|
"jupyter>=1.1.1",
|
89
90
|
"jinja2>=3.1.6",
|
90
91
|
]
|
91
|
-
gui = [
|
92
|
-
"nicegui[native,matplotlib]>=2.15.0",
|
93
|
-
]
|
92
|
+
gui = ["nicegui[native,matplotlib]>=2.15.0"]
|
94
93
|
|
95
94
|
[dependency-groups]
|
96
95
|
dev = [
|
@@ -161,15 +160,12 @@ override-dependencies = [ # https://github.com/astral-sh/uv/issues/4422
|
|
161
160
|
"rfc3987; sys_platform == 'never'", # GPLv3
|
162
161
|
]
|
163
162
|
|
164
|
-
[tool.uv.sources]
|
165
|
-
bottle = { git = "https://github.com/helmut-hoffer-von-ankershoffen/bottle" }
|
166
|
-
|
167
163
|
[tool.ruff]
|
168
164
|
target-version = "py311"
|
169
165
|
preview = true
|
170
166
|
fix = true
|
171
167
|
line-length = 120
|
172
|
-
extend-exclude = [".fixme", "notebook.py", "template/*.py"]
|
168
|
+
extend-exclude = [".fixme", "notebook.py", "template/*.py", "bottle.py"]
|
173
169
|
|
174
170
|
[tool.ruff.lint]
|
175
171
|
select = ["ALL"]
|
@@ -232,6 +228,7 @@ docstring-code-format = true
|
|
232
228
|
convention = "google"
|
233
229
|
|
234
230
|
[tool.mypy] # https://mypy.readthedocs.io/en/latest/config_file.html
|
231
|
+
exclude = ["bottle.py"]
|
235
232
|
junit_xml = "reports/mypy_junit.xml"
|
236
233
|
plugins = "pydantic.mypy"
|
237
234
|
strict = true
|
@@ -283,7 +280,7 @@ source = ["src/"]
|
|
283
280
|
|
284
281
|
|
285
282
|
[tool.bumpversion]
|
286
|
-
current_version = "0.12.
|
283
|
+
current_version = "0.12.16"
|
287
284
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
288
285
|
serialize = ["{major}.{minor}.{patch}"]
|
289
286
|
search = "{current_version}"
|
{oe_python_template-0.12.14 → oe_python_template-0.12.16}/src/oe_python_template/utils/boot.py
RENAMED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
import os
|
4
4
|
import sys
|
5
|
+
from pathlib import Path
|
5
6
|
|
6
7
|
from ._log import logging_initialize
|
7
8
|
from ._logfire import logfire_initialize
|
@@ -22,6 +23,7 @@ def boot(modules_to_instrument: list[str]) -> None:
|
|
22
23
|
if _boot_called:
|
23
24
|
return
|
24
25
|
_boot_called = True
|
26
|
+
_import_from_vendored()
|
25
27
|
sentry_initialize()
|
26
28
|
log_to_logfire = logfire_initialize(modules_to_instrument)
|
27
29
|
logging_initialize(log_to_logfire)
|
@@ -65,6 +67,22 @@ def _parse_env_args() -> None:
|
|
65
67
|
del sys.argv[index]
|
66
68
|
|
67
69
|
|
70
|
+
def _import_from_vendored() -> None:
|
71
|
+
"""Add vendored/ to sys.path enabling to override broken (transitive) dependencies.
|
72
|
+
|
73
|
+
Raises:
|
74
|
+
FileNotFoundError: If the vendored/ directory cannot be found.
|
75
|
+
"""
|
76
|
+
# Get the directory of this file
|
77
|
+
current_dir = Path(__file__).parent.parent.absolute()
|
78
|
+
vendored_dir = current_dir / "vendored"
|
79
|
+
if not vendored_dir.is_dir():
|
80
|
+
message = f"vendored/ directory not found at {vendored_dir!s}"
|
81
|
+
raise FileNotFoundError(message)
|
82
|
+
if vendored_dir not in sys.path:
|
83
|
+
sys.path.insert(0, str(vendored_dir))
|
84
|
+
|
85
|
+
|
68
86
|
def _amend_library_path() -> None:
|
69
87
|
"""Patch environment variables before any other imports."""
|
70
88
|
if "DYLD_FALLBACK_LIBRARY_PATH" not in os.environ:
|