datatailr 0.1.22__tar.gz → 0.1.23__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.
Potentially problematic release.
This version of datatailr might be problematic. Click here for more details.
- {datatailr-0.1.22/src/datatailr.egg-info → datatailr-0.1.23}/PKG-INFO +1 -1
- {datatailr-0.1.22 → datatailr-0.1.23}/pyproject.toml +1 -1
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/scheduler/arguments_cache.py +0 -10
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/scheduler/base.py +1 -1
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/user.py +3 -1
- {datatailr-0.1.22 → datatailr-0.1.23/src/datatailr.egg-info}/PKG-INFO +1 -1
- {datatailr-0.1.22 → datatailr-0.1.23}/src/sbin/datatailr_run.py +5 -1
- {datatailr-0.1.22 → datatailr-0.1.23}/LICENSE +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/README.md +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/setup.cfg +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/setup.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/__init__.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/acl.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/blob.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/build/__init__.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/build/image.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/dt_json.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/errors.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/excel.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/group.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/logging.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/scheduler/__init__.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/scheduler/batch.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/scheduler/batch_decorator.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/scheduler/constants.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/scheduler/schedule.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/scheduler/utils.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/utils.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/version.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr/wrapper.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr.egg-info/SOURCES.txt +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr.egg-info/dependency_links.txt +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr.egg-info/entry_points.txt +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr.egg-info/requires.txt +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/datatailr.egg-info/top_level.txt +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/sbin/datatailr_run_app.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/sbin/datatailr_run_batch.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/sbin/datatailr_run_excel.py +0 -0
- {datatailr-0.1.22 → datatailr-0.1.23}/src/sbin/datatailr_run_service.py +0 -0
|
@@ -28,11 +28,9 @@ from typing import Any, Dict, Optional
|
|
|
28
28
|
|
|
29
29
|
from datatailr import is_dt_installed, Blob
|
|
30
30
|
from datatailr.errors import DatatailrError
|
|
31
|
-
from datatailr.logging import DatatailrLogger
|
|
32
31
|
|
|
33
32
|
|
|
34
33
|
__BLOB_STORAGE__ = Blob()
|
|
35
|
-
logger = DatatailrLogger(__name__).get_logger()
|
|
36
34
|
|
|
37
35
|
|
|
38
36
|
class CacheNotFoundError(DatatailrError):
|
|
@@ -81,9 +79,6 @@ class ArgumentsCache:
|
|
|
81
79
|
:param job_name: Name of the job.
|
|
82
80
|
:return: Dictionary of arguments.
|
|
83
81
|
"""
|
|
84
|
-
logger.info(
|
|
85
|
-
f"Retrieving arguments for {batch_id=}, {job=}, {batch_run_id=}, {self.use_persistent_cache=}"
|
|
86
|
-
)
|
|
87
82
|
path = f"/tmp/datatailr/batch/arguments/{batch_id}.pkl"
|
|
88
83
|
if self.use_persistent_cache and isinstance(job, str):
|
|
89
84
|
try:
|
|
@@ -121,9 +116,6 @@ class ArgumentsCache:
|
|
|
121
116
|
:param result: Result of the batch job.
|
|
122
117
|
"""
|
|
123
118
|
path = f"/tmp/datatailr/batch/results/{batch_run_id}_{job}.pkl"
|
|
124
|
-
logger.info(
|
|
125
|
-
f"Adding result for {batch_run_id=}, {job=}, {result=}, {self.use_persistent_cache=}"
|
|
126
|
-
)
|
|
127
119
|
if self.use_persistent_cache and isinstance(job, str):
|
|
128
120
|
self._add_to_persistent_cache(path, result)
|
|
129
121
|
else:
|
|
@@ -160,7 +152,6 @@ class ArgumentsCache:
|
|
|
160
152
|
|
|
161
153
|
"""
|
|
162
154
|
path = path.replace("/tmp/", "")
|
|
163
|
-
logger.info(f"Adding arguments to persistent cache for {path=}")
|
|
164
155
|
__BLOB_STORAGE__.put_blob(path, json.dumps(blob))
|
|
165
156
|
|
|
166
157
|
def _get_from_persistent_cache(self, path: str) -> Any:
|
|
@@ -170,6 +161,5 @@ class ArgumentsCache:
|
|
|
170
161
|
:param path: Path in the Blob storage where the blob is stored.
|
|
171
162
|
"""
|
|
172
163
|
path = path.replace("/tmp/", "")
|
|
173
|
-
logger.info(f"Retrieving arguments from persistent cache for {path=}")
|
|
174
164
|
data = __BLOB_STORAGE__.get_blob(path)
|
|
175
165
|
return json.loads(data)
|
|
@@ -101,7 +101,7 @@ class EntryPoint:
|
|
|
101
101
|
else:
|
|
102
102
|
package_root = "."
|
|
103
103
|
module_parts = self.module_name.split(".")
|
|
104
|
-
for _ in module_parts:
|
|
104
|
+
for _ in range(len(module_parts) - 1):
|
|
105
105
|
package_root = os.path.dirname(package_root)
|
|
106
106
|
path_to_repo = run_shell_command(
|
|
107
107
|
f"cd {package_root} && git rev-parse --show-toplevel"
|
|
@@ -177,6 +177,7 @@ class User:
|
|
|
177
177
|
email=email,
|
|
178
178
|
primary_group=primary_group,
|
|
179
179
|
system=is_system_user,
|
|
180
|
+
json_enrichened=True,
|
|
180
181
|
)
|
|
181
182
|
else:
|
|
182
183
|
new_user = __client__.add(
|
|
@@ -187,9 +188,10 @@ class User:
|
|
|
187
188
|
password=password,
|
|
188
189
|
primary_group=primary_group,
|
|
189
190
|
system=is_system_user,
|
|
191
|
+
json_enrichened=True,
|
|
190
192
|
)
|
|
191
193
|
|
|
192
|
-
return new_user
|
|
194
|
+
return User(new_user["name"]) if new_user else None
|
|
193
195
|
|
|
194
196
|
@staticmethod
|
|
195
197
|
def exists(name: str) -> bool:
|
|
@@ -36,10 +36,14 @@ import os
|
|
|
36
36
|
import sys
|
|
37
37
|
from typing import Tuple
|
|
38
38
|
from datatailr.logging import DatatailrLogger
|
|
39
|
-
|
|
39
|
+
from datatailr.utils import is_dt_installed
|
|
40
40
|
|
|
41
41
|
logger = DatatailrLogger(os.path.abspath(__file__)).get_logger()
|
|
42
42
|
|
|
43
|
+
if not is_dt_installed():
|
|
44
|
+
logger.error("Datatailr is not installed.")
|
|
45
|
+
sys.exit(1)
|
|
46
|
+
|
|
43
47
|
|
|
44
48
|
def get_env_var(name: str, default: str | None = None) -> str:
|
|
45
49
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|