datatailr 0.1.23__tar.gz → 0.1.25__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.23/src/datatailr.egg-info → datatailr-0.1.25}/PKG-INFO +1 -1
- {datatailr-0.1.23 → datatailr-0.1.25}/pyproject.toml +1 -1
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/blob.py +6 -2
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/scheduler/base.py +13 -6
- {datatailr-0.1.23 → datatailr-0.1.25/src/datatailr.egg-info}/PKG-INFO +1 -1
- {datatailr-0.1.23 → datatailr-0.1.25}/src/sbin/datatailr_run.py +9 -13
- {datatailr-0.1.23 → datatailr-0.1.25}/LICENSE +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/README.md +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/setup.cfg +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/setup.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/__init__.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/acl.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/build/__init__.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/build/image.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/dt_json.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/errors.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/excel.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/group.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/logging.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/scheduler/__init__.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/scheduler/arguments_cache.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/scheduler/batch.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/scheduler/batch_decorator.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/scheduler/constants.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/scheduler/schedule.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/scheduler/utils.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/user.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/utils.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/version.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr/wrapper.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr.egg-info/SOURCES.txt +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr.egg-info/dependency_links.txt +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr.egg-info/entry_points.txt +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr.egg-info/requires.txt +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/datatailr.egg-info/top_level.txt +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/sbin/datatailr_run_app.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/sbin/datatailr_run_batch.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/sbin/datatailr_run_excel.py +0 -0
- {datatailr-0.1.23 → datatailr-0.1.25}/src/sbin/datatailr_run_service.py +0 -0
|
@@ -98,6 +98,10 @@ class Blob:
|
|
|
98
98
|
# Since direct reading and writting of blobs is not implemented yet, we are using a temporary file.
|
|
99
99
|
# This is a workaround to allow writing the blob content directly to the blob storage.
|
|
100
100
|
with tempfile.NamedTemporaryFile(delete=True) as temp_file:
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
if isinstance(blob, bytes):
|
|
102
|
+
with open(temp_file.name, "wb") as f:
|
|
103
|
+
f.write(blob)
|
|
104
|
+
else:
|
|
105
|
+
with open(temp_file.name, "w") as f:
|
|
106
|
+
f.write(blob)
|
|
103
107
|
self.put_file(name, temp_file.name)
|
|
@@ -96,13 +96,20 @@ class EntryPoint:
|
|
|
96
96
|
# Find the absolute path to the repository and then the relative path to the module.
|
|
97
97
|
# This will be used in the creation of the code 'bundle' when building the image.
|
|
98
98
|
module_spec = importlib.util.find_spec(func.__module__)
|
|
99
|
-
if
|
|
100
|
-
|
|
99
|
+
if not module_spec:
|
|
100
|
+
raise RepoValidationError(f"Cannot find spec for {self.module_name}")
|
|
101
|
+
# Resolve the filesystem directory of the top package for module_name
|
|
102
|
+
if module_spec.submodule_search_locations:
|
|
103
|
+
# It's a package; get its directory
|
|
104
|
+
package_root = os.path.abspath(
|
|
105
|
+
next(iter(module_spec.submodule_search_locations))
|
|
106
|
+
)
|
|
107
|
+
elif module_spec.origin:
|
|
108
|
+
# It's a module; use its containing directory
|
|
109
|
+
package_root = os.path.abspath(os.path.dirname(module_spec.origin))
|
|
101
110
|
else:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
for _ in range(len(module_parts) - 1):
|
|
105
|
-
package_root = os.path.dirname(package_root)
|
|
111
|
+
raise RepoValidationError(f"Cannot resolve path for {self.module_name}")
|
|
112
|
+
|
|
106
113
|
path_to_repo = run_shell_command(
|
|
107
114
|
f"cd {package_root} && git rev-parse --show-toplevel"
|
|
108
115
|
)[0]
|
|
@@ -99,8 +99,11 @@ def main():
|
|
|
99
99
|
user, _ = create_user_and_group()
|
|
100
100
|
job_type = get_env_var("DATATAILR_JOB_TYPE")
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
env = {
|
|
103
|
+
"DATATAILR_JOB_TYPE": job_type,
|
|
104
|
+
"DATATAILR_JOB_NAME": get_env_var("DATATAILR_JOB_NAME"),
|
|
105
|
+
"DATATAILR_JOB_ID": get_env_var("DATATAILR_JOB_ID"),
|
|
106
|
+
}
|
|
104
107
|
|
|
105
108
|
if job_type == "batch":
|
|
106
109
|
run_id = get_env_var("DATATAILR_BATCH_RUN_ID")
|
|
@@ -109,37 +112,30 @@ def main():
|
|
|
109
112
|
env = {
|
|
110
113
|
"DATATAILR_BATCH_RUN_ID": run_id,
|
|
111
114
|
"DATATAILR_BATCH_ID": batch_id,
|
|
112
|
-
"DATATAILR_JOB_ID": job_id,
|
|
113
115
|
"DATATAILR_BATCH_ENTRYPOINT": entrypoint,
|
|
114
|
-
}
|
|
116
|
+
} | env
|
|
115
117
|
run_command_as_user("datatailr_run_batch", user, env)
|
|
116
118
|
elif job_type == "service":
|
|
117
119
|
port = get_env_var("DATATAILR_SERVICE_PORT")
|
|
118
120
|
entrypoint = get_env_var("DATATAILR_ENTRYPOINT")
|
|
119
121
|
env = {
|
|
120
|
-
"DATATAILR_JOB_NAME": job_name,
|
|
121
|
-
"DATATAILR_JOB_ID": job_id,
|
|
122
122
|
"DATATAILR_ENTRYPOINT": entrypoint,
|
|
123
123
|
"DATATAILR_SERVICE_PORT": port,
|
|
124
|
-
}
|
|
124
|
+
} | env
|
|
125
125
|
run_command_as_user("datatailr_run_service", user, env)
|
|
126
126
|
elif job_type == "app":
|
|
127
127
|
entrypoint = get_env_var("DATATAILR_ENTRYPOINT")
|
|
128
128
|
env = {
|
|
129
|
-
"DATATAILR_JOB_NAME": job_name,
|
|
130
|
-
"DATATAILR_JOB_ID": job_id,
|
|
131
129
|
"DATATAILR_ENTRYPOINT": entrypoint,
|
|
132
|
-
}
|
|
130
|
+
} | env
|
|
133
131
|
run_command_as_user("datatailr_run_app", user, env)
|
|
134
132
|
elif job_type == "excel":
|
|
135
133
|
host = get_env_var("DATATAILR_HOST")
|
|
136
134
|
entrypoint = get_env_var("DATATAILR_ENTRYPOINT")
|
|
137
135
|
env = {
|
|
138
|
-
"DATATAILR_JOB_NAME": job_name,
|
|
139
|
-
"DATATAILR_JOB_ID": job_id,
|
|
140
136
|
"DATATAILR_ENTRYPOINT": entrypoint,
|
|
141
137
|
"DATATAILR_HOST": host,
|
|
142
|
-
}
|
|
138
|
+
} | env
|
|
143
139
|
run_command_as_user("datatailr_run_excel", user, env)
|
|
144
140
|
elif job_type == "IDE":
|
|
145
141
|
pass
|
|
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
|
|
File without changes
|