fractal-server 2.9.0a5__py3-none-any.whl → 2.9.0a6__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/models/v2/task_group.py +9 -2
- fractal_server/app/routes/api/v1/project.py +7 -19
- fractal_server/app/routes/api/v2/submit.py +4 -20
- fractal_server/app/runner/executors/slurm/ssh/executor.py +5 -1
- fractal_server/migrations/versions/{3082479ac4ea_taskgroup_activity_and_venv_info_to_.py → d256a7379ab8_taskgroup_activity_and_venv_info_to_.py} +9 -5
- {fractal_server-2.9.0a5.dist-info → fractal_server-2.9.0a6.dist-info}/METADATA +1 -1
- {fractal_server-2.9.0a5.dist-info → fractal_server-2.9.0a6.dist-info}/RECORD +11 -11
- {fractal_server-2.9.0a5.dist-info → fractal_server-2.9.0a6.dist-info}/LICENSE +0 -0
- {fractal_server-2.9.0a5.dist-info → fractal_server-2.9.0a6.dist-info}/WHEEL +0 -0
- {fractal_server-2.9.0a5.dist-info → fractal_server-2.9.0a6.dist-info}/entry_points.txt +0 -0
fractal_server/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__VERSION__ = "2.9.
|
1
|
+
__VERSION__ = "2.9.0a6"
|
@@ -1,4 +1,5 @@
|
|
1
1
|
from datetime import datetime
|
2
|
+
from datetime import timezone
|
2
3
|
from typing import Optional
|
3
4
|
|
4
5
|
from sqlalchemy import Column
|
@@ -48,9 +49,15 @@ class TaskGroupV2(SQLModel, table=True):
|
|
48
49
|
default_factory=get_timestamp,
|
49
50
|
sa_column=Column(DateTime(timezone=True), nullable=False),
|
50
51
|
)
|
51
|
-
timestamp_last_used:
|
52
|
+
timestamp_last_used: datetime = Field(
|
52
53
|
default_factory=get_timestamp,
|
53
|
-
sa_column=Column(
|
54
|
+
sa_column=Column(
|
55
|
+
DateTime(timezone=True),
|
56
|
+
nullable=False,
|
57
|
+
server_default=(
|
58
|
+
datetime(2024, 11, 20, tzinfo=timezone.utc).isoformat()
|
59
|
+
),
|
60
|
+
),
|
54
61
|
)
|
55
62
|
|
56
63
|
@property
|
@@ -1,5 +1,5 @@
|
|
1
|
+
import json
|
1
2
|
import os
|
2
|
-
from datetime import datetime
|
3
3
|
from datetime import timedelta
|
4
4
|
from datetime import timezone
|
5
5
|
from typing import Optional
|
@@ -50,10 +50,6 @@ router = APIRouter()
|
|
50
50
|
logger = set_logger(__name__)
|
51
51
|
|
52
52
|
|
53
|
-
def _encode_as_utc(dt: datetime):
|
54
|
-
return dt.replace(tzinfo=timezone.utc).isoformat()
|
55
|
-
|
56
|
-
|
57
53
|
@router.get("/", response_model=list[ProjectReadV1])
|
58
54
|
async def get_list_project(
|
59
55
|
user: UserOAuth = Depends(current_active_user),
|
@@ -393,33 +389,25 @@ async def apply_workflow(
|
|
393
389
|
workflow_id=workflow_id,
|
394
390
|
user_email=user.email,
|
395
391
|
input_dataset_dump=dict(
|
396
|
-
**
|
397
|
-
exclude={"resource_list", "history"
|
392
|
+
**json.loads(
|
393
|
+
input_dataset.json(exclude={"resource_list", "history"})
|
398
394
|
),
|
399
|
-
timestamp_created=_encode_as_utc(input_dataset.timestamp_created),
|
400
395
|
resource_list=[
|
401
396
|
resource.model_dump()
|
402
397
|
for resource in input_dataset.resource_list
|
403
398
|
],
|
404
399
|
),
|
405
400
|
output_dataset_dump=dict(
|
406
|
-
**
|
407
|
-
exclude={"resource_list", "history"
|
401
|
+
**json.loads(
|
402
|
+
output_dataset.json(exclude={"resource_list", "history"})
|
408
403
|
),
|
409
|
-
timestamp_created=_encode_as_utc(output_dataset.timestamp_created),
|
410
404
|
resource_list=[
|
411
405
|
resource.model_dump()
|
412
406
|
for resource in output_dataset.resource_list
|
413
407
|
],
|
414
408
|
),
|
415
|
-
workflow_dump=
|
416
|
-
|
417
|
-
timestamp_created=_encode_as_utc(workflow.timestamp_created),
|
418
|
-
),
|
419
|
-
project_dump=dict(
|
420
|
-
**project.model_dump(exclude={"user_list", "timestamp_created"}),
|
421
|
-
timestamp_created=_encode_as_utc(project.timestamp_created),
|
422
|
-
),
|
409
|
+
workflow_dump=json.loads(workflow.json(exclude={"task_list"})),
|
410
|
+
project_dump=json.loads(project.json(exclude={"user_list"})),
|
423
411
|
**apply_workflow.dict(),
|
424
412
|
)
|
425
413
|
|
@@ -1,6 +1,5 @@
|
|
1
|
+
import json
|
1
2
|
import os
|
2
|
-
from datetime import datetime
|
3
|
-
from datetime import timezone
|
4
3
|
from pathlib import Path
|
5
4
|
from typing import Optional
|
6
5
|
|
@@ -37,10 +36,6 @@ from fractal_server.app.routes.api.v2._aux_functions_tasks import (
|
|
37
36
|
from fractal_server.app.routes.auth import current_active_verified_user
|
38
37
|
|
39
38
|
|
40
|
-
def _encode_as_utc(dt: datetime):
|
41
|
-
return dt.replace(tzinfo=timezone.utc).isoformat()
|
42
|
-
|
43
|
-
|
44
39
|
router = APIRouter()
|
45
40
|
logger = set_logger(__name__)
|
46
41
|
|
@@ -164,20 +159,9 @@ async def apply_workflow(
|
|
164
159
|
dataset_id=dataset_id,
|
165
160
|
workflow_id=workflow_id,
|
166
161
|
user_email=user.email,
|
167
|
-
dataset_dump=
|
168
|
-
|
169
|
-
|
170
|
-
),
|
171
|
-
timestamp_created=_encode_as_utc(dataset.timestamp_created),
|
172
|
-
),
|
173
|
-
workflow_dump=dict(
|
174
|
-
**workflow.model_dump(exclude={"task_list", "timestamp_created"}),
|
175
|
-
timestamp_created=_encode_as_utc(workflow.timestamp_created),
|
176
|
-
),
|
177
|
-
project_dump=dict(
|
178
|
-
**project.model_dump(exclude={"user_list", "timestamp_created"}),
|
179
|
-
timestamp_created=_encode_as_utc(project.timestamp_created),
|
180
|
-
),
|
162
|
+
dataset_dump=json.loads(dataset.json(exclude={"images", "history"})),
|
163
|
+
workflow_dump=json.loads(workflow.json(exclude={"task_list"})),
|
164
|
+
project_dump=json.loads(project.json(exclude={"user_list"})),
|
181
165
|
**job_create.dict(),
|
182
166
|
)
|
183
167
|
|
@@ -1500,7 +1500,11 @@ class FractalSlurmSSHExecutor(SlurmExecutor):
|
|
1500
1500
|
logger.info("[FractalSlurmSSHExecutor.ssh_handshake] START")
|
1501
1501
|
cmd = f"{self.python_remote} -m fractal_server.app.runner.versions"
|
1502
1502
|
stdout = self.fractal_ssh.run_command(cmd=cmd)
|
1503
|
-
|
1503
|
+
try:
|
1504
|
+
remote_versions = json.loads(stdout.strip("\n"))
|
1505
|
+
except json.decoder.JSONDecodeError as e:
|
1506
|
+
logger.error("Fractal server versions not available")
|
1507
|
+
raise e
|
1504
1508
|
|
1505
1509
|
# Check compatibility with local versions
|
1506
1510
|
local_versions = get_versions()
|
@@ -1,16 +1,17 @@
|
|
1
1
|
"""TaskGroup Activity and venv-info to TaskGroup
|
2
2
|
|
3
|
-
Revision ID:
|
3
|
+
Revision ID: d256a7379ab8
|
4
4
|
Revises: 19eca0dd47a9
|
5
|
-
Create Date: 2024-11-
|
5
|
+
Create Date: 2024-11-20 15:01:52.659832
|
6
6
|
|
7
7
|
"""
|
8
8
|
import sqlalchemy as sa
|
9
9
|
import sqlmodel
|
10
10
|
from alembic import op
|
11
|
+
from sqlalchemy.dialects import postgresql
|
11
12
|
|
12
13
|
# revision identifiers, used by Alembic.
|
13
|
-
revision = "
|
14
|
+
revision = "d256a7379ab8"
|
14
15
|
down_revision = "19eca0dd47a9"
|
15
16
|
branch_labels = None
|
16
17
|
depends_on = None
|
@@ -71,6 +72,7 @@ def upgrade() -> None:
|
|
71
72
|
sa.Column(
|
72
73
|
"timestamp_last_used",
|
73
74
|
sa.DateTime(timezone=True),
|
75
|
+
server_default="2024-11-20T00:00:00+00:00",
|
74
76
|
nullable=False,
|
75
77
|
)
|
76
78
|
)
|
@@ -91,12 +93,14 @@ def downgrade() -> None:
|
|
91
93
|
sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
|
92
94
|
sa.Column(
|
93
95
|
"data",
|
94
|
-
|
96
|
+
postgresql.JSON(astext_type=sa.Text()),
|
97
|
+
autoincrement=False,
|
95
98
|
nullable=True,
|
96
99
|
),
|
97
100
|
sa.Column(
|
98
101
|
"timestamp",
|
99
|
-
|
102
|
+
postgresql.TIMESTAMP(timezone=True),
|
103
|
+
autoincrement=False,
|
100
104
|
nullable=True,
|
101
105
|
),
|
102
106
|
sa.Column(
|
@@ -1,4 +1,4 @@
|
|
1
|
-
fractal_server/__init__.py,sha256
|
1
|
+
fractal_server/__init__.py,sha256=-8jlnit4pXakV2y6U5NGfb9QrAa7CEUtY-AdJIdpxvU,24
|
2
2
|
fractal_server/__main__.py,sha256=dEkCfzLLQrIlxsGC-HBfoR-RBMWnJDgNrxYTyzmE9c0,6146
|
3
3
|
fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
|
4
4
|
fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -20,7 +20,7 @@ fractal_server/app/models/v2/dataset.py,sha256=-7sxHEw4IIAvF_uSan7tA3o8hvoakBkQ0
|
|
20
20
|
fractal_server/app/models/v2/job.py,sha256=ypJmN-qspkKBGhBG7Mt-HypSQqcQ2EmB4Bzzb2-y550,1535
|
21
21
|
fractal_server/app/models/v2/project.py,sha256=rAHoh5KfYwIaW7rTX0_O0jvWmxEvfo1BafvmcXuSSRk,786
|
22
22
|
fractal_server/app/models/v2/task.py,sha256=jebD28Pz8tGcsWCItxj6uKjcD8BMMnnU8dqYhvhEB6c,1520
|
23
|
-
fractal_server/app/models/v2/task_group.py,sha256=
|
23
|
+
fractal_server/app/models/v2/task_group.py,sha256=Sd-fb7EN18eOxrS-RT4ekczLWp-tQcbX5C4LrcmjoIM,3443
|
24
24
|
fractal_server/app/models/v2/workflow.py,sha256=YBgFGCziUgU0aJ5EM3Svu9W2c46AewZO9VBlFCHiSps,1069
|
25
25
|
fractal_server/app/models/v2/workflowtask.py,sha256=iDuJYk8kp4PNqGmbKRtGI7y-QsbjkNd_gDsbMzL4i-g,1274
|
26
26
|
fractal_server/app/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -37,7 +37,7 @@ fractal_server/app/routes/api/v1/__init__.py,sha256=Y2HQdG197J0a7DyQEE2jn53IfxD0
|
|
37
37
|
fractal_server/app/routes/api/v1/_aux_functions.py,sha256=P9Q48thGH95w0h5cacYoibxqgiiLW4oqZ8rNJ2LIISY,13219
|
38
38
|
fractal_server/app/routes/api/v1/dataset.py,sha256=KVfKdp-bT8eB14kCjTSmpji4a2IPIHxGID8L10h3Wac,17282
|
39
39
|
fractal_server/app/routes/api/v1/job.py,sha256=0jGxvu0xNQnWuov2qnoo9yE7Oat37XbcVn4Ute-UsiE,5370
|
40
|
-
fractal_server/app/routes/api/v1/project.py,sha256=
|
40
|
+
fractal_server/app/routes/api/v1/project.py,sha256=k-GBDSUyQvt2L1CgOckcn86GcmqRWa_MZ_fzy9ORwqI,15419
|
41
41
|
fractal_server/app/routes/api/v1/task.py,sha256=eW89nMCjpD4G6tHXDo2qGBKqWaPirjH6M3hpdJQhfa0,6528
|
42
42
|
fractal_server/app/routes/api/v1/task_collection.py,sha256=5EMh3yhS1Z4x25kp5Iaxalrf7RgJh-XD1nBjrFvgwsg,9072
|
43
43
|
fractal_server/app/routes/api/v1/workflow.py,sha256=2T93DuEnSshaDCue-JPmjuvGCtbk6lt9pFMuPt783t8,11217
|
@@ -51,7 +51,7 @@ fractal_server/app/routes/api/v2/images.py,sha256=JR1rR6qEs81nacjriOXAOBQjAbCXF4
|
|
51
51
|
fractal_server/app/routes/api/v2/job.py,sha256=Bga2Kz1OjvDIdxZObWaaXVhNIhC_5JKhKRjEH2_ayEE,5157
|
52
52
|
fractal_server/app/routes/api/v2/project.py,sha256=eWYFJ7F2ZYQcpi-_n-rhPF-Q4gJhzYBsVGYFhHZZXAE,6653
|
53
53
|
fractal_server/app/routes/api/v2/status.py,sha256=6N9DSZ4iFqbZImorWfEAPoyoFUgEruo4Hweqo0x0xXU,6435
|
54
|
-
fractal_server/app/routes/api/v2/submit.py,sha256=
|
54
|
+
fractal_server/app/routes/api/v2/submit.py,sha256=bTL1upaRIpOQNGfSsvNRwh-4LxROTvnzrC9QC9UQI10,8129
|
55
55
|
fractal_server/app/routes/api/v2/task.py,sha256=K0ik33t7vL8BAK5S7fqyJDNdRK4stGqb_73bSa8tvPE,7159
|
56
56
|
fractal_server/app/routes/api/v2/task_collection.py,sha256=TIr1IPO15TX6CZIQ_LPc0zFtTltuleDISAdMVaVQxfw,9633
|
57
57
|
fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=cctW61-C2QYF2KXluS15lLhZJS_kt30Ca6UGLFO32z0,6207
|
@@ -87,7 +87,7 @@ fractal_server/app/runner/executors/slurm/remote.py,sha256=wLziIsGdSMiO-jIXM8x77
|
|
87
87
|
fractal_server/app/runner/executors/slurm/ssh/__init__.py,sha256=Cjn1rYvljddi96tAwS-qqGkNfOcfPzjChdaEZEObCcM,65
|
88
88
|
fractal_server/app/runner/executors/slurm/ssh/_executor_wait_thread.py,sha256=bKo5Ja0IGxJWpPWyh9dN0AG-PwzTDZzD5LyaEHB3YU4,3742
|
89
89
|
fractal_server/app/runner/executors/slurm/ssh/_slurm_job.py,sha256=rwlqZzoGo4SAb4nSlFjsQJdaCgfM1J6YGcjb8yYxlqc,4506
|
90
|
-
fractal_server/app/runner/executors/slurm/ssh/executor.py,sha256=
|
90
|
+
fractal_server/app/runner/executors/slurm/ssh/executor.py,sha256=rVKAMVV7zb0x5T8R7NQlyeJZUOWDs7FRQuXEwCJbeNo,57899
|
91
91
|
fractal_server/app/runner/executors/slurm/sudo/__init__.py,sha256=Cjn1rYvljddi96tAwS-qqGkNfOcfPzjChdaEZEObCcM,65
|
92
92
|
fractal_server/app/runner/executors/slurm/sudo/_check_jobs_status.py,sha256=wAgwpVcr6JIslKHOuS0FhRa_6T1KCManyRJqA-fifzw,1909
|
93
93
|
fractal_server/app/runner/executors/slurm/sudo/_executor_wait_thread.py,sha256=z5LlhaiqAb8pHsF1WwdzXN39C5anQmwjo1rSQgtRAYE,4422
|
@@ -178,7 +178,6 @@ fractal_server/migrations/script.py.mako,sha256=oMXw9LC3zRbinWWPPDgeZ4z9FJrV2zhR
|
|
178
178
|
fractal_server/migrations/versions/034a469ec2eb_task_groups.py,sha256=vrPhC8hfFu1c4HmLHNZyCuqEfecFD8-bWc49bXMNes0,6199
|
179
179
|
fractal_server/migrations/versions/091b01f51f88_add_usergroup_and_linkusergroup_table.py,sha256=-BSS9AFTPcu3gYC-sYbawSy4MWQQx8TfMb5BW5EBKmQ,1450
|
180
180
|
fractal_server/migrations/versions/19eca0dd47a9_user_settings_project_dir.py,sha256=Q1Gj1cJ0UrdLBJ5AXfFK9QpxTtmcv-4Z3NEGDnxOme4,961
|
181
|
-
fractal_server/migrations/versions/3082479ac4ea_taskgroup_activity_and_venv_info_to_.py,sha256=CPGP6ceJOab_2MzxSlxrH7hGxRoXw4d7BTcASL57pMc,3654
|
182
181
|
fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py,sha256=-wHe-fOffmYeAm0JXVl_lxZ7hhDkaEVqxgxpHkb_uL8,954
|
183
182
|
fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py,sha256=Mob8McGYAcmgvrseyyYOa54E6Gsgr-4SiGdC-r9O4_A,1157
|
184
183
|
fractal_server/migrations/versions/501961cfcd85_remove_link_between_v1_and_v2_tasks_.py,sha256=5ROUgcoZOdjf8kMt6cxuvPhzHmV6xaCxvZEbhUEyZM4,3271
|
@@ -195,6 +194,7 @@ fractal_server/migrations/versions/99ea79d9e5d2_add_dataset_history.py,sha256=0i
|
|
195
194
|
fractal_server/migrations/versions/9c5ae74c9b98_add_user_settings_table.py,sha256=syONdZNf4-OnAcWIsbzXpYwpXPsXZ4SsmjwVvmVG0PU,2256
|
196
195
|
fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.py,sha256=4l1AHGUsa0ONoJVZlr3fTXw_xbbQ8O7wlD92Az2aRfM,1849
|
197
196
|
fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py,sha256=ekDUML7ILpmdoqEclKbEUdyLi4uw9HSG_sTjG2hp_JE,867
|
197
|
+
fractal_server/migrations/versions/d256a7379ab8_taskgroup_activity_and_venv_info_to_.py,sha256=HN3_Pk8G81SzdYjg4K1RZAyjKSlsZGvcYE2nWOUbwxQ,3861
|
198
198
|
fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py,sha256=6cHEZFuTXiQg9yu32Y3RH1XAl71av141WQ6UMbiITIg,949
|
199
199
|
fractal_server/migrations/versions/da2cb2ac4255_user_group_viewer_paths.py,sha256=yGWSA2HIHUybcVy66xBITk08opV2DFYSCIIrulaUZhI,901
|
200
200
|
fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py,sha256=lOggSvzGWqQvnxxFuSM6W50Ui49R918A-uBuiZJ0pNM,963
|
@@ -238,8 +238,8 @@ fractal_server/tasks/v2/utils_templates.py,sha256=C5WLuY3uGG2s53OEL-__H35-fmSlgu
|
|
238
238
|
fractal_server/urls.py,sha256=5o_qq7PzKKbwq12NHSQZDmDitn5RAOeQ4xufu-2v9Zk,448
|
239
239
|
fractal_server/utils.py,sha256=utvmBx8K9I8hRWFquxna2pBaOqe0JifDL_NVPmihEJI,3525
|
240
240
|
fractal_server/zip_tools.py,sha256=GjDgo_sf6V_DDg6wWeBlZu5zypIxycn_l257p_YVKGc,4876
|
241
|
-
fractal_server-2.9.
|
242
|
-
fractal_server-2.9.
|
243
|
-
fractal_server-2.9.
|
244
|
-
fractal_server-2.9.
|
245
|
-
fractal_server-2.9.
|
241
|
+
fractal_server-2.9.0a6.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
242
|
+
fractal_server-2.9.0a6.dist-info/METADATA,sha256=omzzbgGU1_NXRisynk37b4eRZsY6PQEcAIblR7YjIHk,4585
|
243
|
+
fractal_server-2.9.0a6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
244
|
+
fractal_server-2.9.0a6.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
245
|
+
fractal_server-2.9.0a6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|