cloe-nessy 0.3.11.2b0__py3-none-any.whl → 0.3.11.3b0__py3-none-any.whl
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.
- cloe_nessy/models/table.py +3 -29
- cloe_nessy/models/volume.py +0 -27
- {cloe_nessy-0.3.11.2b0.dist-info → cloe_nessy-0.3.11.3b0.dist-info}/METADATA +1 -1
- {cloe_nessy-0.3.11.2b0.dist-info → cloe_nessy-0.3.11.3b0.dist-info}/RECORD +6 -6
- {cloe_nessy-0.3.11.2b0.dist-info → cloe_nessy-0.3.11.3b0.dist-info}/WHEEL +0 -0
- {cloe_nessy-0.3.11.2b0.dist-info → cloe_nessy-0.3.11.3b0.dist-info}/top_level.txt +0 -0
cloe_nessy/models/table.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# type: ignore
|
|
2
1
|
from pathlib import Path
|
|
3
2
|
from typing import Any, Self
|
|
4
3
|
|
|
@@ -17,7 +16,9 @@ try:
|
|
|
17
16
|
from importlib.resources import files # type: ignore[attr-defined]
|
|
18
17
|
except ImportError:
|
|
19
18
|
try:
|
|
20
|
-
from importlib_resources import files # type: ignore[import-untyped]
|
|
19
|
+
from importlib_resources import files as importlib_resources_files # type: ignore[import-untyped]
|
|
20
|
+
|
|
21
|
+
files = importlib_resources_files
|
|
21
22
|
except ImportError:
|
|
22
23
|
files = None # type: ignore[assignment]
|
|
23
24
|
|
|
@@ -281,33 +282,6 @@ class Table(TemplateLoaderMixin, ReadInstancesMixin, LoggerMixin):
|
|
|
281
282
|
except TemplateNotFound:
|
|
282
283
|
pass # Try next approach
|
|
283
284
|
|
|
284
|
-
# Approach 3: Try relative to module location
|
|
285
|
-
if template is None:
|
|
286
|
-
try:
|
|
287
|
-
import cloe_nessy.models
|
|
288
|
-
|
|
289
|
-
module_path = Path(cloe_nessy.models.__file__).parent
|
|
290
|
-
templates = module_path / "templates"
|
|
291
|
-
template = self.get_template(templates, template_name)
|
|
292
|
-
except (TemplateNotFound, AttributeError):
|
|
293
|
-
pass # Try next approach
|
|
294
|
-
|
|
295
|
-
# Approach 4: Last resort - search in package data
|
|
296
|
-
if template is None:
|
|
297
|
-
try:
|
|
298
|
-
import pkg_resources
|
|
299
|
-
|
|
300
|
-
template_content = pkg_resources.resource_string(
|
|
301
|
-
"cloe_nessy.models", f"templates/{template_name}"
|
|
302
|
-
).decode("utf-8")
|
|
303
|
-
|
|
304
|
-
from jinja2 import BaseLoader, Environment
|
|
305
|
-
|
|
306
|
-
env = Environment(loader=BaseLoader(), keep_trailing_newline=True)
|
|
307
|
-
template = env.from_string(template_content)
|
|
308
|
-
except (ImportError, FileNotFoundError):
|
|
309
|
-
pass # All approaches failed
|
|
310
|
-
|
|
311
285
|
if template is None:
|
|
312
286
|
self._console_logger.error(f"Template [ {template_name} ] not found in any location.")
|
|
313
287
|
raise TemplateNotFound(template_name)
|
cloe_nessy/models/volume.py
CHANGED
|
@@ -99,33 +99,6 @@ class Volume(TemplateLoaderMixin, LoggerMixin, BaseModel):
|
|
|
99
99
|
except TemplateNotFound:
|
|
100
100
|
pass # Try next approach
|
|
101
101
|
|
|
102
|
-
# Approach 3: Try relative to module location
|
|
103
|
-
if template is None:
|
|
104
|
-
try:
|
|
105
|
-
import cloe_nessy.models
|
|
106
|
-
|
|
107
|
-
module_path = Path(cloe_nessy.models.__file__).parent
|
|
108
|
-
templates = module_path / "templates"
|
|
109
|
-
template = self.get_template(templates, template_name)
|
|
110
|
-
except (TemplateNotFound, AttributeError):
|
|
111
|
-
pass # Try next approach
|
|
112
|
-
|
|
113
|
-
# Approach 4: Last resort - search in package data
|
|
114
|
-
if template is None:
|
|
115
|
-
try:
|
|
116
|
-
import pkg_resources
|
|
117
|
-
|
|
118
|
-
template_content = pkg_resources.resource_string(
|
|
119
|
-
"cloe_nessy.models", f"templates/{template_name}"
|
|
120
|
-
).decode("utf-8")
|
|
121
|
-
|
|
122
|
-
from jinja2 import BaseLoader, Environment
|
|
123
|
-
|
|
124
|
-
env = Environment(loader=BaseLoader(), keep_trailing_newline=True)
|
|
125
|
-
template = env.from_string(template_content)
|
|
126
|
-
except (ImportError, FileNotFoundError):
|
|
127
|
-
pass # All approaches failed
|
|
128
|
-
|
|
129
102
|
if template is None:
|
|
130
103
|
self._console_logger.error(f"Template [ {template_name} ] not found in any location.")
|
|
131
104
|
raise TemplateNotFound(template_name)
|
|
@@ -42,9 +42,9 @@ cloe_nessy/models/column.py,sha256=53fBwRnino72XKACsHZpN9QfCBqqSXyKLHZlM0huumg,1
|
|
|
42
42
|
cloe_nessy/models/constraint.py,sha256=hsFlhn4n928z81O3dl3v5bMetewPWzMjkJK3_4kASSM,178
|
|
43
43
|
cloe_nessy/models/foreign_key.py,sha256=DwRVHs9sShqqPV-NL7ow_3AmPPWX0Od26yZn_I565pU,1001
|
|
44
44
|
cloe_nessy/models/schema.py,sha256=yUrjjEhAH5zbCymE67Az_jPnVB8hGO-_UNfqzeZCD_Y,3376
|
|
45
|
-
cloe_nessy/models/table.py,sha256=
|
|
45
|
+
cloe_nessy/models/table.py,sha256=7CurAjwwzVw-6SQRrEcXtHx8xAvHCoOqIXHlfd_8eVk,13262
|
|
46
46
|
cloe_nessy/models/types.py,sha256=XRbuJGdTNa6aXyE3IAzs_J9gVjbfkzMDLfGl-k6jI_4,223
|
|
47
|
-
cloe_nessy/models/volume.py,sha256=
|
|
47
|
+
cloe_nessy/models/volume.py,sha256=z149VCKIVNkkMv6biOLd_iPdkJnAfWdsLFBhMyCjdCI,3625
|
|
48
48
|
cloe_nessy/models/adapter/__init__.py,sha256=m36W_mqwB3dCYnCIt0fLOSHS4E1VU8FRGoaum4Gf95o,90
|
|
49
49
|
cloe_nessy/models/adapter/unity_catalog_adapter.py,sha256=a-14Ys-AevVYQd0xeJU1syLxjT5Wzo4uog1hFSEs76M,12651
|
|
50
50
|
cloe_nessy/models/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -94,7 +94,7 @@ cloe_nessy/settings/__init__.py,sha256=ZbkneO3WaKOxon7qHFHnou7EnBOSnBFyKMDZblIEv
|
|
|
94
94
|
cloe_nessy/settings/settings.py,sha256=I4n129lrujriW-d8q4as2Kb4_kI932ModfZ5Ow_UpVM,3653
|
|
95
95
|
cloe_nessy/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
96
|
cloe_nessy/utils/file_and_directory_handler.py,sha256=r2EVt9xG81p6ScaJCwETC5an6pMT6WseB0jMOR-JlpU,602
|
|
97
|
-
cloe_nessy-0.3.11.
|
|
98
|
-
cloe_nessy-0.3.11.
|
|
99
|
-
cloe_nessy-0.3.11.
|
|
100
|
-
cloe_nessy-0.3.11.
|
|
97
|
+
cloe_nessy-0.3.11.3b0.dist-info/METADATA,sha256=3N7RXNYozN7GedcvTq6i1HHidBtmPat8x0q-bBUFbY4,3166
|
|
98
|
+
cloe_nessy-0.3.11.3b0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
99
|
+
cloe_nessy-0.3.11.3b0.dist-info/top_level.txt,sha256=Z7izn8HmQpg2wBUb-0jzaKlYKMU7Ypzuc9__9vPtW_I,11
|
|
100
|
+
cloe_nessy-0.3.11.3b0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|