fractal-server 2.3.1a0__py3-none-any.whl → 2.3.2__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.
- fractal_server/__init__.py +1 -1
- fractal_server/app/routes/admin/v1.py +1 -3
- fractal_server/app/routes/admin/v2.py +1 -3
- fractal_server/app/routes/api/v1/job.py +1 -3
- fractal_server/app/routes/api/v2/job.py +1 -3
- fractal_server/app/routes/aux/_job.py +7 -5
- {fractal_server-2.3.1a0.dist-info → fractal_server-2.3.2.dist-info}/METADATA +1 -1
- {fractal_server-2.3.1a0.dist-info → fractal_server-2.3.2.dist-info}/RECORD +11 -11
- {fractal_server-2.3.1a0.dist-info → fractal_server-2.3.2.dist-info}/LICENSE +0 -0
- {fractal_server-2.3.1a0.dist-info → fractal_server-2.3.2.dist-info}/WHEEL +0 -0
- {fractal_server-2.3.1a0.dist-info → fractal_server-2.3.2.dist-info}/entry_points.txt +0 -0
fractal_server/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__VERSION__ = "2.3.
|
1
|
+
__VERSION__ = "2.3.2"
|
@@ -387,9 +387,7 @@ async def download_job_logs(
|
|
387
387
|
# Create and return byte stream for zipped log folder
|
388
388
|
PREFIX_ZIP = Path(job.working_dir).name
|
389
389
|
zip_filename = f"{PREFIX_ZIP}_archive.zip"
|
390
|
-
byte_stream = _zip_folder_to_byte_stream(
|
391
|
-
folder=job.working_dir, zip_filename=zip_filename
|
392
|
-
)
|
390
|
+
byte_stream = _zip_folder_to_byte_stream(folder=job.working_dir)
|
393
391
|
return StreamingResponse(
|
394
392
|
iter([byte_stream.getvalue()]),
|
395
393
|
media_type="application/x-zip-compressed",
|
@@ -274,9 +274,7 @@ async def download_job_logs(
|
|
274
274
|
# Create and return byte stream for zipped log folder
|
275
275
|
PREFIX_ZIP = Path(job.working_dir).name
|
276
276
|
zip_filename = f"{PREFIX_ZIP}_archive.zip"
|
277
|
-
byte_stream = _zip_folder_to_byte_stream(
|
278
|
-
folder=job.working_dir, zip_filename=zip_filename
|
279
|
-
)
|
277
|
+
byte_stream = _zip_folder_to_byte_stream(folder=job.working_dir)
|
280
278
|
return StreamingResponse(
|
281
279
|
iter([byte_stream.getvalue()]),
|
282
280
|
media_type="application/x-zip-compressed",
|
@@ -128,9 +128,7 @@ async def download_job_logs(
|
|
128
128
|
# Create and return byte stream for zipped log folder
|
129
129
|
PREFIX_ZIP = Path(job.working_dir).name
|
130
130
|
zip_filename = f"{PREFIX_ZIP}_archive.zip"
|
131
|
-
byte_stream = _zip_folder_to_byte_stream(
|
132
|
-
folder=job.working_dir, zip_filename=zip_filename
|
133
|
-
)
|
131
|
+
byte_stream = _zip_folder_to_byte_stream(folder=job.working_dir)
|
134
132
|
return StreamingResponse(
|
135
133
|
iter([byte_stream.getvalue()]),
|
136
134
|
media_type="application/x-zip-compressed",
|
@@ -131,9 +131,7 @@ async def download_job_logs(
|
|
131
131
|
# Create and return byte stream for zipped log folder
|
132
132
|
PREFIX_ZIP = Path(job.working_dir).name
|
133
133
|
zip_filename = f"{PREFIX_ZIP}_archive.zip"
|
134
|
-
byte_stream = _zip_folder_to_byte_stream(
|
135
|
-
folder=job.working_dir, zip_filename=zip_filename
|
136
|
-
)
|
134
|
+
byte_stream = _zip_folder_to_byte_stream(folder=job.working_dir)
|
137
135
|
return StreamingResponse(
|
138
136
|
iter([byte_stream.getvalue()]),
|
139
137
|
media_type="application/x-zip-compressed",
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import os
|
1
2
|
from io import BytesIO
|
2
3
|
from pathlib import Path
|
3
4
|
from typing import Union
|
@@ -25,19 +26,20 @@ def _write_shutdown_file(*, job: Union[ApplyWorkflow, JobV2]):
|
|
25
26
|
f.write(f"Trigger executor shutdown for {job.id=}.")
|
26
27
|
|
27
28
|
|
28
|
-
def _zip_folder_to_byte_stream(*, folder: str
|
29
|
+
def _zip_folder_to_byte_stream(*, folder: str) -> BytesIO:
|
29
30
|
"""
|
30
31
|
Get byte stream with the zipped log folder of a job.
|
31
32
|
|
32
33
|
Args:
|
33
34
|
folder: the folder to zip
|
34
|
-
zip_filename: name of the zipped archive
|
35
35
|
"""
|
36
|
-
working_dir_path = Path(folder)
|
37
36
|
|
38
37
|
byte_stream = BytesIO()
|
39
38
|
with ZipFile(byte_stream, mode="w", compression=ZIP_DEFLATED) as zipfile:
|
40
|
-
for
|
41
|
-
|
39
|
+
for root, dirs, files in os.walk(folder):
|
40
|
+
for file in files:
|
41
|
+
file_path = os.path.join(root, file)
|
42
|
+
archive_path = os.path.relpath(file_path, folder)
|
43
|
+
zipfile.write(file_path, archive_path)
|
42
44
|
|
43
45
|
return byte_stream
|
@@ -1,4 +1,4 @@
|
|
1
|
-
fractal_server/__init__.py,sha256=
|
1
|
+
fractal_server/__init__.py,sha256=rXqFcllf2dozijOCAlnZWvgsFpCEMVhBtm66tw0cp-A,22
|
2
2
|
fractal_server/__main__.py,sha256=CocbzZooX1UtGqPi55GcHGNxnrJXFg5tUU5b3wyFCyo,4958
|
3
3
|
fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
|
4
4
|
fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -23,13 +23,13 @@ fractal_server/app/models/v2/workflow.py,sha256=YBgFGCziUgU0aJ5EM3Svu9W2c46AewZO
|
|
23
23
|
fractal_server/app/models/v2/workflowtask.py,sha256=3jEkObsSnlI05Pur_dSsXYdJxRqPL60Z7tK5-EJLOks,1532
|
24
24
|
fractal_server/app/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
25
|
fractal_server/app/routes/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
|
-
fractal_server/app/routes/admin/v1.py,sha256=
|
27
|
-
fractal_server/app/routes/admin/v2.py,sha256=
|
26
|
+
fractal_server/app/routes/admin/v1.py,sha256=ShmsUFtfyRqP84QScqmRDVrJFpbR4p-8baLxAkI3n1U,13926
|
27
|
+
fractal_server/app/routes/admin/v2.py,sha256=JuG1qqVeQIgVJgPyqrB1053il22mGPGpKBiJi6zVsqQ,13687
|
28
28
|
fractal_server/app/routes/api/__init__.py,sha256=EVyZrEq3I_1643QGTPCC5lgCp4xH_auYbrFfogTm4pc,315
|
29
29
|
fractal_server/app/routes/api/v1/__init__.py,sha256=Y2HQdG197J0a7DyQEE2jn53IfxD0EHGhzK1I2JZuEck,958
|
30
30
|
fractal_server/app/routes/api/v1/_aux_functions.py,sha256=CeaVrNVYs_lEbiJbu4uaTeeiajljeXfdq1iLkt5RoRo,12636
|
31
31
|
fractal_server/app/routes/api/v1/dataset.py,sha256=HRE-8vPmVkeXf7WFYkI19mDtbY-iJZeJ7PmMiV0LMgY,16923
|
32
|
-
fractal_server/app/routes/api/v1/job.py,sha256=
|
32
|
+
fractal_server/app/routes/api/v1/job.py,sha256=217fGh7U37esib1JG8INpLhE0W88t9X0fFwCNVt2r_M,5313
|
33
33
|
fractal_server/app/routes/api/v1/project.py,sha256=MxbJUc9H14ZZ8mmMbX3LXGTVR3sHdD26YSw4TKI7WtU,16108
|
34
34
|
fractal_server/app/routes/api/v1/task.py,sha256=udbKnenzc-Q10elYCVB9JmOPWATraa9tZi0AaByvWo0,6129
|
35
35
|
fractal_server/app/routes/api/v1/task_collection.py,sha256=82XBsJHlPiDPCbpLa-16ojKDpj2LYj9_jFSZt0t58bQ,8911
|
@@ -39,7 +39,7 @@ fractal_server/app/routes/api/v2/__init__.py,sha256=JrPWfKIJy9btRCP-zw2nZwLpSdBx
|
|
39
39
|
fractal_server/app/routes/api/v2/_aux_functions.py,sha256=tYJr5EPaA0CVGp-Y4jottFJUVToWvjcSY6PJqN_d--s,14938
|
40
40
|
fractal_server/app/routes/api/v2/dataset.py,sha256=_HjKNP9XsMGoqyubGdF2ZyeW7vXC3VdK_0_TaUxgIF0,8248
|
41
41
|
fractal_server/app/routes/api/v2/images.py,sha256=4r_HblPWyuKSZSJZfn8mbDaLv1ncwZU0gWdKneZcNG4,7894
|
42
|
-
fractal_server/app/routes/api/v2/job.py,sha256=
|
42
|
+
fractal_server/app/routes/api/v2/job.py,sha256=RkIj7ANK-nkxUvcG9K2r4dFdPnvGomx7jdB6U9bqOVQ,5202
|
43
43
|
fractal_server/app/routes/api/v2/project.py,sha256=U4TxD-J4TtQuu1D4BOhL1kTse5fCiNc3BwGH7bnlo38,6592
|
44
44
|
fractal_server/app/routes/api/v2/status.py,sha256=osLexiMOSqmYcEV-41tlrwt9ofyFbtRm5HmPS5BU0t4,6394
|
45
45
|
fractal_server/app/routes/api/v2/submit.py,sha256=Oqggq3GeBrUsE535tmw-JsRZEWa7jziU34fKdlj4QUE,8734
|
@@ -51,7 +51,7 @@ fractal_server/app/routes/api/v2/workflow.py,sha256=2GlcYNjpvCdjwC_Kn7y0UP16B3pO
|
|
51
51
|
fractal_server/app/routes/api/v2/workflowtask.py,sha256=l4eTD5IIun5cOdYzsxh3ajmnOISaSccYA_mVf15Cjtw,8802
|
52
52
|
fractal_server/app/routes/auth.py,sha256=Xv80iqdyfY3lyicYs2Y8B6zEDEnyUu_H6_6psYtv3R4,4885
|
53
53
|
fractal_server/app/routes/aux/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
54
|
-
fractal_server/app/routes/aux/_job.py,sha256=
|
54
|
+
fractal_server/app/routes/aux/_job.py,sha256=HUItNm0SZFAYsyL1rXSjBre1-rXSe6x51qH9KAQWS1w,1361
|
55
55
|
fractal_server/app/routes/aux/_runner.py,sha256=FdCVla5DxGAZ__aB7Z8dEJzD_RIeh5tftjrPyqkr8N8,895
|
56
56
|
fractal_server/app/runner/.gitignore,sha256=ytzN_oyHWXrGU7iFAtoHSTUbM6Rn6kG0Zkddg0xZk6s,16
|
57
57
|
fractal_server/app/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -192,8 +192,8 @@ fractal_server/tasks/v2/templates/_5_pip_show.sh,sha256=3onbKZ0PJkkYronP4_tdMBoA
|
|
192
192
|
fractal_server/tasks/v2/utils.py,sha256=JOyCacb6MNvrwfLNTyLwcz8y79J29YuJeJ2MK5kqXRM,1657
|
193
193
|
fractal_server/urls.py,sha256=5o_qq7PzKKbwq12NHSQZDmDitn5RAOeQ4xufu-2v9Zk,448
|
194
194
|
fractal_server/utils.py,sha256=b7WwFdcFZ8unyT65mloFToYuEDXpQoHRcmRNqrhd_dQ,2115
|
195
|
-
fractal_server-2.3.
|
196
|
-
fractal_server-2.3.
|
197
|
-
fractal_server-2.3.
|
198
|
-
fractal_server-2.3.
|
199
|
-
fractal_server-2.3.
|
195
|
+
fractal_server-2.3.2.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
196
|
+
fractal_server-2.3.2.dist-info/METADATA,sha256=UMmVY5UM3tc8mAtvtT1dncFUsRJgvSOXY3wSYVGTrjw,4425
|
197
|
+
fractal_server-2.3.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
198
|
+
fractal_server-2.3.2.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
199
|
+
fractal_server-2.3.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|