datatailr 0.1.56__tar.gz → 0.1.58__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.56/src/datatailr.egg-info → datatailr-0.1.58}/PKG-INFO +1 -1
- {datatailr-0.1.56 → datatailr-0.1.58}/pyproject.toml +1 -1
- datatailr-0.1.56/src/datatailr/excel.py → datatailr-0.1.58/src/datatailr/excel/__init__.py +15 -2
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/scheduler/batch.py +2 -0
- {datatailr-0.1.56 → datatailr-0.1.58/src/datatailr.egg-info}/PKG-INFO +1 -1
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr.egg-info/SOURCES.txt +1 -1
- {datatailr-0.1.56 → datatailr-0.1.58}/src/sbin/datatailr_run.py +11 -12
- {datatailr-0.1.56 → datatailr-0.1.58}/LICENSE +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/README.md +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/setup.cfg +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/setup.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/__init__.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/acl.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/blob.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/build/__init__.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/build/image.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/dt_json.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/errors.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/group.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/logging.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/scheduler/__init__.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/scheduler/arguments_cache.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/scheduler/base.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/scheduler/batch_decorator.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/scheduler/constants.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/scheduler/schedule.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/scheduler/utils.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/user.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/utils.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/version.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr/wrapper.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr.egg-info/dependency_links.txt +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr.egg-info/entry_points.txt +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr.egg-info/requires.txt +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/datatailr.egg-info/top_level.txt +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/sbin/datatailr_run_app.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/sbin/datatailr_run_batch.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/sbin/datatailr_run_excel.py +0 -0
- {datatailr-0.1.56 → datatailr-0.1.58}/src/sbin/datatailr_run_service.py +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
# type: ignore
|
|
2
|
+
|
|
1
3
|
try:
|
|
2
|
-
from dt.excel import Addin
|
|
3
|
-
from dt.excel import Queue
|
|
4
|
+
from dt.excel import Addin
|
|
5
|
+
from dt.excel import Queue
|
|
4
6
|
except ImportError:
|
|
5
7
|
|
|
6
8
|
class DummyAddin:
|
|
@@ -17,4 +19,15 @@ except ImportError:
|
|
|
17
19
|
def run(self):
|
|
18
20
|
pass
|
|
19
21
|
|
|
22
|
+
class DummyQueue:
|
|
23
|
+
def __init__(self) -> None:
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
def push(self, value) -> None:
|
|
27
|
+
pass
|
|
28
|
+
|
|
20
29
|
Addin = DummyAddin
|
|
30
|
+
Queue = DummyQueue
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
__all__ = ["Addin", "Queue"]
|
|
@@ -317,6 +317,7 @@ class Batch(Job):
|
|
|
317
317
|
run_as: Optional[Union[str, User]] = None,
|
|
318
318
|
resources: Resources = Resources(memory="100m", cpu=1),
|
|
319
319
|
acl: Optional[ACL] = None,
|
|
320
|
+
python_version: str = "3.12",
|
|
320
321
|
local_run: bool = False,
|
|
321
322
|
python_requirements: str = "",
|
|
322
323
|
build_script_pre: str = "",
|
|
@@ -330,6 +331,7 @@ class Batch(Job):
|
|
|
330
331
|
run_as=run_as,
|
|
331
332
|
resources=resources,
|
|
332
333
|
acl=acl,
|
|
334
|
+
python_version=python_version,
|
|
333
335
|
python_requirements=python_requirements,
|
|
334
336
|
build_script_pre=build_script_pre,
|
|
335
337
|
build_script_post=build_script_post,
|
|
@@ -7,7 +7,6 @@ src/datatailr/acl.py
|
|
|
7
7
|
src/datatailr/blob.py
|
|
8
8
|
src/datatailr/dt_json.py
|
|
9
9
|
src/datatailr/errors.py
|
|
10
|
-
src/datatailr/excel.py
|
|
11
10
|
src/datatailr/group.py
|
|
12
11
|
src/datatailr/logging.py
|
|
13
12
|
src/datatailr/user.py
|
|
@@ -22,6 +21,7 @@ src/datatailr.egg-info/requires.txt
|
|
|
22
21
|
src/datatailr.egg-info/top_level.txt
|
|
23
22
|
src/datatailr/build/__init__.py
|
|
24
23
|
src/datatailr/build/image.py
|
|
24
|
+
src/datatailr/excel/__init__.py
|
|
25
25
|
src/datatailr/scheduler/__init__.py
|
|
26
26
|
src/datatailr/scheduler/arguments_cache.py
|
|
27
27
|
src/datatailr/scheduler/base.py
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
# DATATAILR_BATCH_RUN_ID - the unique identifier for the batch run.
|
|
31
31
|
# DATATAILR_BATCH_ID - the unique identifier for the batch.
|
|
32
32
|
# DATATAILR_JOB_ID - the unique identifier for the job.
|
|
33
|
+
# Important:
|
|
34
|
+
# Python environment is installed and managed by uv and all installed scripts (datatailr_run, datatailr_run_excel, jupyter etc.) should be invoked with `uv run`.
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
import subprocess
|
|
@@ -86,19 +88,13 @@ def run_command_as_user(command: str | list, user: str, env_vars: dict):
|
|
|
86
88
|
"""
|
|
87
89
|
Run a command as a specific user with the given environment variables.
|
|
88
90
|
"""
|
|
89
|
-
if os.path.isfile("/etc/python-site-location"):
|
|
90
|
-
with open("/etc/python-site-location") as f:
|
|
91
|
-
python_site = f.read().rstrip()
|
|
92
|
-
else:
|
|
93
|
-
python_site = ""
|
|
94
|
-
|
|
95
91
|
python_libdir = sysconfig.get_config_var("LIBDIR")
|
|
96
92
|
|
|
97
93
|
if isinstance(command, list):
|
|
98
94
|
command = " ".join(command)
|
|
99
95
|
env_vars = {
|
|
100
96
|
"PATH": get_env_var("PATH", ""),
|
|
101
|
-
"PYTHONPATH": get_env_var("PYTHONPATH", "")
|
|
97
|
+
"PYTHONPATH": get_env_var("PYTHONPATH", ""),
|
|
102
98
|
"LD_LIBRARY_PATH": get_env_var("LD_LIBRARY_PATH", "") + ":" + python_libdir,
|
|
103
99
|
} | env_vars
|
|
104
100
|
|
|
@@ -136,7 +132,7 @@ def main():
|
|
|
136
132
|
"DATATAILR_BATCH_ID": batch_id,
|
|
137
133
|
"DATATAILR_BATCH_ENTRYPOINT": entrypoint,
|
|
138
134
|
} | env
|
|
139
|
-
run_command_as_user("datatailr_run_batch", user, env)
|
|
135
|
+
run_command_as_user("uv run datatailr_run_batch", user, env)
|
|
140
136
|
elif job_type == "service":
|
|
141
137
|
port = get_env_var("DATATAILR_SERVICE_PORT", 8080)
|
|
142
138
|
entrypoint = get_env_var("DATATAILR_ENTRYPOINT")
|
|
@@ -144,13 +140,13 @@ def main():
|
|
|
144
140
|
"DATATAILR_ENTRYPOINT": entrypoint,
|
|
145
141
|
"DATATAILR_SERVICE_PORT": port,
|
|
146
142
|
} | env
|
|
147
|
-
run_command_as_user("datatailr_run_service", user, env)
|
|
143
|
+
run_command_as_user("uv run datatailr_run_service", user, env)
|
|
148
144
|
elif job_type == "app":
|
|
149
145
|
entrypoint = get_env_var("DATATAILR_ENTRYPOINT")
|
|
150
146
|
env = {
|
|
151
147
|
"DATATAILR_ENTRYPOINT": entrypoint,
|
|
152
148
|
} | env
|
|
153
|
-
run_command_as_user("datatailr_run_app", user, env)
|
|
149
|
+
run_command_as_user("uv run datatailr_run_app", user, env)
|
|
154
150
|
elif job_type == "excel":
|
|
155
151
|
host = get_env_var("DATATAILR_HOST", "")
|
|
156
152
|
local = get_env_var("DATATAILR_LOCAL", "")
|
|
@@ -161,7 +157,7 @@ def main():
|
|
|
161
157
|
"DATATAILR_HOST": host,
|
|
162
158
|
"DATATAILR_LOCAL": local,
|
|
163
159
|
} | env
|
|
164
|
-
run_command_as_user("datatailr_run_excel", user, env)
|
|
160
|
+
run_command_as_user("uv run datatailr_run_excel", user, env)
|
|
165
161
|
elif job_type == "ide":
|
|
166
162
|
command = [
|
|
167
163
|
"code-server",
|
|
@@ -172,7 +168,10 @@ def main():
|
|
|
172
168
|
run_command_as_user(command, user, env)
|
|
173
169
|
elif job_type == "jupyter":
|
|
174
170
|
command = [
|
|
175
|
-
"
|
|
171
|
+
"uv",
|
|
172
|
+
"run",
|
|
173
|
+
"jupyter",
|
|
174
|
+
"lab",
|
|
176
175
|
"--ip='*'",
|
|
177
176
|
"--port=8080",
|
|
178
177
|
"--no-browser",
|
|
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
|