fractal-server 2.17.0a4__py3-none-any.whl → 2.17.0a5__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/__main__.py +22 -26
- fractal_server/app/models/security.py +19 -21
- fractal_server/app/models/user_settings.py +1 -0
- fractal_server/app/models/v2/task_group.py +1 -0
- fractal_server/app/routes/admin/v2/accounting.py +3 -3
- fractal_server/app/routes/admin/v2/impersonate.py +2 -2
- fractal_server/app/routes/admin/v2/job.py +6 -6
- fractal_server/app/routes/admin/v2/profile.py +4 -4
- fractal_server/app/routes/admin/v2/project.py +2 -2
- fractal_server/app/routes/admin/v2/resource.py +8 -8
- fractal_server/app/routes/admin/v2/task.py +2 -2
- fractal_server/app/routes/admin/v2/task_group.py +5 -5
- fractal_server/app/routes/admin/v2/task_group_lifecycle.py +4 -4
- fractal_server/app/routes/api/__init__.py +5 -5
- fractal_server/app/routes/api/v2/dataset.py +10 -19
- fractal_server/app/routes/api/v2/history.py +8 -8
- fractal_server/app/routes/api/v2/images.py +5 -5
- fractal_server/app/routes/api/v2/job.py +8 -8
- fractal_server/app/routes/api/v2/pre_submission_checks.py +3 -3
- fractal_server/app/routes/api/v2/project.py +6 -6
- fractal_server/app/routes/api/v2/status_legacy.py +2 -2
- fractal_server/app/routes/api/v2/submit.py +24 -26
- fractal_server/app/routes/api/v2/task.py +6 -7
- fractal_server/app/routes/api/v2/task_collection.py +4 -3
- fractal_server/app/routes/api/v2/task_collection_custom.py +4 -3
- fractal_server/app/routes/api/v2/task_collection_pixi.py +2 -2
- fractal_server/app/routes/api/v2/task_group.py +6 -6
- fractal_server/app/routes/api/v2/task_group_lifecycle.py +4 -4
- fractal_server/app/routes/api/v2/task_version_update.py +3 -3
- fractal_server/app/routes/api/v2/workflow.py +9 -9
- fractal_server/app/routes/api/v2/workflow_import.py +2 -2
- fractal_server/app/routes/api/v2/workflowtask.py +5 -5
- fractal_server/app/routes/auth/__init__.py +34 -5
- fractal_server/app/routes/auth/current_user.py +22 -67
- fractal_server/app/routes/auth/group.py +8 -35
- fractal_server/app/routes/auth/register.py +2 -2
- fractal_server/app/routes/auth/users.py +5 -46
- fractal_server/app/schemas/__init__.py +0 -1
- fractal_server/app/schemas/user.py +23 -0
- fractal_server/app/schemas/v2/task_group.py +1 -0
- fractal_server/app/security/__init__.py +134 -46
- fractal_server/app/security/signup_email.py +52 -34
- fractal_server/config/__init__.py +1 -0
- fractal_server/config/_email.py +10 -47
- fractal_server/config/_main.py +14 -3
- fractal_server/migrations/versions/f65ee53991e3_user_settings_related.py +67 -0
- fractal_server/runner/executors/slurm_common/base_slurm_runner.py +1 -1
- fractal_server/runner/executors/slurm_common/slurm_config.py +5 -8
- fractal_server/runner/executors/slurm_ssh/runner.py +1 -1
- fractal_server/runner/executors/slurm_sudo/runner.py +1 -1
- fractal_server/runner/v2/_slurm_ssh.py +2 -1
- fractal_server/runner/v2/_slurm_sudo.py +1 -1
- fractal_server/runner/v2/submit_workflow.py +12 -12
- {fractal_server-2.17.0a4.dist-info → fractal_server-2.17.0a5.dist-info}/METADATA +1 -2
- {fractal_server-2.17.0a4.dist-info → fractal_server-2.17.0a5.dist-info}/RECORD +59 -61
- fractal_server/app/routes/aux/validate_user_settings.py +0 -76
- fractal_server/app/schemas/user_settings.py +0 -63
- fractal_server/app/user_settings.py +0 -32
- {fractal_server-2.17.0a4.dist-info → fractal_server-2.17.0a5.dist-info}/WHEEL +0 -0
- {fractal_server-2.17.0a4.dist-info → fractal_server-2.17.0a5.dist-info}/entry_points.txt +0 -0
- {fractal_server-2.17.0a4.dist-info → fractal_server-2.17.0a5.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""user-settings-related
|
|
2
|
+
|
|
3
|
+
Revision ID: f65ee53991e3
|
|
4
|
+
Revises: 90f6508c6379
|
|
5
|
+
Create Date: 2025-10-22 15:16:42.217910
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
import sqlalchemy as sa
|
|
9
|
+
from alembic import op
|
|
10
|
+
from sqlalchemy.dialects import postgresql
|
|
11
|
+
|
|
12
|
+
# revision identifiers, used by Alembic.
|
|
13
|
+
revision = "f65ee53991e3"
|
|
14
|
+
down_revision = "90f6508c6379"
|
|
15
|
+
branch_labels = None
|
|
16
|
+
depends_on = None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def upgrade() -> None:
|
|
20
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
21
|
+
with op.batch_alter_table("user_oauth", schema=None) as batch_op:
|
|
22
|
+
batch_op.add_column(
|
|
23
|
+
sa.Column(
|
|
24
|
+
"project_dir",
|
|
25
|
+
sa.String(),
|
|
26
|
+
server_default="/PLACEHOLDER",
|
|
27
|
+
nullable=False,
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
batch_op.add_column(
|
|
31
|
+
sa.Column(
|
|
32
|
+
"slurm_accounts",
|
|
33
|
+
postgresql.ARRAY(sa.String()),
|
|
34
|
+
server_default="{}",
|
|
35
|
+
nullable=True,
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
batch_op.drop_constraint(
|
|
39
|
+
batch_op.f("fk_user_oauth_user_settings_id_user_settings"),
|
|
40
|
+
type_="foreignkey",
|
|
41
|
+
)
|
|
42
|
+
batch_op.drop_column("user_settings_id")
|
|
43
|
+
|
|
44
|
+
# ### end Alembic commands ###
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def downgrade() -> None:
|
|
48
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
|
49
|
+
with op.batch_alter_table("user_oauth", schema=None) as batch_op:
|
|
50
|
+
batch_op.add_column(
|
|
51
|
+
sa.Column(
|
|
52
|
+
"user_settings_id",
|
|
53
|
+
sa.INTEGER(),
|
|
54
|
+
autoincrement=False,
|
|
55
|
+
nullable=True,
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
batch_op.create_foreign_key(
|
|
59
|
+
batch_op.f("fk_user_oauth_user_settings_id_user_settings"),
|
|
60
|
+
"user_settings",
|
|
61
|
+
["user_settings_id"],
|
|
62
|
+
["id"],
|
|
63
|
+
)
|
|
64
|
+
batch_op.drop_column("slurm_accounts")
|
|
65
|
+
batch_op.drop_column("project_dir")
|
|
66
|
+
|
|
67
|
+
# ### end Alembic commands ###
|
|
@@ -87,7 +87,7 @@ class BaseSlurmRunner(BaseRunner):
|
|
|
87
87
|
python_worker_interpreter: str,
|
|
88
88
|
poll_interval: int,
|
|
89
89
|
common_script_lines: list[str] | None = None,
|
|
90
|
-
user_cache_dir: str
|
|
90
|
+
user_cache_dir: str,
|
|
91
91
|
slurm_account: str | None = None,
|
|
92
92
|
):
|
|
93
93
|
self.slurm_runner_type = slurm_runner_type
|
|
@@ -136,7 +136,7 @@ class SlurmConfig(BaseModel):
|
|
|
136
136
|
|
|
137
137
|
def to_sbatch_preamble(
|
|
138
138
|
self,
|
|
139
|
-
remote_export_dir: str
|
|
139
|
+
remote_export_dir: str,
|
|
140
140
|
) -> list[str]:
|
|
141
141
|
"""
|
|
142
142
|
Compile `SlurmConfig` object into the preamble of a SLURM submission
|
|
@@ -189,13 +189,10 @@ class SlurmConfig(BaseModel):
|
|
|
189
189
|
for line in self._sorted_extra_lines():
|
|
190
190
|
lines.append(line)
|
|
191
191
|
|
|
192
|
-
if self.user_local_exports
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
for key, value in self.user_local_exports.items():
|
|
197
|
-
tmp_value = str(Path(remote_export_dir) / value)
|
|
198
|
-
lines.append(f"export {key}={tmp_value}")
|
|
192
|
+
if self.user_local_exports:
|
|
193
|
+
for key, value in self.user_local_exports.items():
|
|
194
|
+
tmp_value = str(Path(remote_export_dir) / value)
|
|
195
|
+
lines.append(f"export {key}={tmp_value}")
|
|
199
196
|
|
|
200
197
|
"""
|
|
201
198
|
FIXME export SRUN_CPUS_PER_TASK
|
|
@@ -50,7 +50,7 @@ def process_workflow(
|
|
|
50
50
|
fractal_ssh: FractalSSH | None = None,
|
|
51
51
|
slurm_account: str | None = None,
|
|
52
52
|
worker_init: str | None = None,
|
|
53
|
-
user_cache_dir: str
|
|
53
|
+
user_cache_dir: str,
|
|
54
54
|
) -> None:
|
|
55
55
|
"""
|
|
56
56
|
Run a workflow through a `slurm_ssh` backend.
|
|
@@ -105,6 +105,7 @@ def process_workflow(
|
|
|
105
105
|
resource=resource,
|
|
106
106
|
profile=profile,
|
|
107
107
|
common_script_lines=worker_init,
|
|
108
|
+
user_cache_dir=user_cache_dir,
|
|
108
109
|
) as runner:
|
|
109
110
|
execute_tasks_v2(
|
|
110
111
|
wf_task_list=workflow.task_list[
|
|
@@ -52,6 +52,7 @@ class ProcessWorkflowType(Protocol):
|
|
|
52
52
|
user_id: int,
|
|
53
53
|
resource: Resource,
|
|
54
54
|
profile: Profile,
|
|
55
|
+
user_cache_dir: str,
|
|
55
56
|
) -> None:
|
|
56
57
|
...
|
|
57
58
|
|
|
@@ -84,10 +85,10 @@ def submit_workflow(
|
|
|
84
85
|
dataset_id: int,
|
|
85
86
|
job_id: int,
|
|
86
87
|
user_id: int,
|
|
87
|
-
|
|
88
|
-
user_cache_dir: str | None = None, # FIXME: review this
|
|
88
|
+
user_cache_dir: str,
|
|
89
89
|
resource: Resource,
|
|
90
90
|
profile: Profile,
|
|
91
|
+
worker_init: str | None = None,
|
|
91
92
|
fractal_ssh: FractalSSH | None = None,
|
|
92
93
|
) -> None:
|
|
93
94
|
"""
|
|
@@ -110,8 +111,10 @@ def submit_workflow(
|
|
|
110
111
|
Custom executor parameters that get parsed before the execution of
|
|
111
112
|
each task.
|
|
112
113
|
user_cache_dir:
|
|
113
|
-
Cache directory (namely a path where the user can write)
|
|
114
|
-
|
|
114
|
+
Cache directory (namely a path where the user can write). For
|
|
115
|
+
`slurm_sudo` backend, this is both a base directory for
|
|
116
|
+
`job.working_dir_user`. For `slurm_sudo` and `slurm_ssh` backends,
|
|
117
|
+
this is used for `user_local_exports`.
|
|
115
118
|
resource:
|
|
116
119
|
Computational resource to be used for this job (e.g. a SLURM
|
|
117
120
|
cluster).
|
|
@@ -224,22 +227,18 @@ def submit_workflow(
|
|
|
224
227
|
job_working_dir = job.working_dir
|
|
225
228
|
|
|
226
229
|
try:
|
|
230
|
+
process_workflow: ProcessWorkflowType
|
|
227
231
|
match resource.type:
|
|
228
232
|
case ResourceType.LOCAL:
|
|
229
|
-
process_workflow
|
|
233
|
+
process_workflow = local_process_workflow
|
|
230
234
|
backend_specific_kwargs = {}
|
|
231
235
|
case ResourceType.SLURM_SUDO:
|
|
232
|
-
process_workflow
|
|
233
|
-
slurm_sudo_process_workflow
|
|
234
|
-
)
|
|
236
|
+
process_workflow = slurm_sudo_process_workflow
|
|
235
237
|
backend_specific_kwargs = dict(
|
|
236
238
|
slurm_account=job.slurm_account,
|
|
237
|
-
user_cache_dir=user_cache_dir,
|
|
238
239
|
)
|
|
239
240
|
case ResourceType.SLURM_SSH:
|
|
240
|
-
process_workflow
|
|
241
|
-
slurm_ssh_process_workflow
|
|
242
|
-
)
|
|
241
|
+
process_workflow = slurm_ssh_process_workflow
|
|
243
242
|
backend_specific_kwargs = dict(
|
|
244
243
|
fractal_ssh=fractal_ssh,
|
|
245
244
|
slurm_account=job.slurm_account,
|
|
@@ -260,6 +259,7 @@ def submit_workflow(
|
|
|
260
259
|
job_type_filters=job.type_filters,
|
|
261
260
|
resource=resource,
|
|
262
261
|
profile=profile,
|
|
262
|
+
user_cache_dir=user_cache_dir,
|
|
263
263
|
**backend_specific_kwargs,
|
|
264
264
|
)
|
|
265
265
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fractal-server
|
|
3
|
-
Version: 2.17.
|
|
3
|
+
Version: 2.17.0a5
|
|
4
4
|
Summary: Backend component of the Fractal analytics platform
|
|
5
5
|
License-Expression: BSD-3-Clause
|
|
6
6
|
License-File: LICENSE
|
|
@@ -12,7 +12,6 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
14
|
Requires-Dist: alembic (>=1.13.1,<2.0.0)
|
|
15
|
-
Requires-Dist: cryptography (>=46.0.0,<47.0.0)
|
|
16
15
|
Requires-Dist: fabric (>=3.2.2,<3.3.0)
|
|
17
16
|
Requires-Dist: fastapi (>=0.118.0,<0.119.0)
|
|
18
17
|
Requires-Dist: fastapi-users[oauth] (>=14,<15)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
fractal_server/__init__.py,sha256=
|
|
2
|
-
fractal_server/__main__.py,sha256=
|
|
1
|
+
fractal_server/__init__.py,sha256=twgXmjGJdfHSKap7ALSL1NPDHaBCT4z5bFl9BlhdIyk,25
|
|
2
|
+
fractal_server/__main__.py,sha256=68FlTuST3zbzVofFI8JSYsSBrBQ07Bv3Mu3PsZX9Fw0,11423
|
|
3
3
|
fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
|
|
4
4
|
fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
fractal_server/app/db/__init__.py,sha256=sttX0mHVV0ESI1SJ1kcxUKiuEwqeP-BWsst0o_9Yo44,2810
|
|
6
6
|
fractal_server/app/models/__init__.py,sha256=xJWiGAwpXmCpnFMC4c_HTqoUCzMOXrakoGLUH_uMvdA,415
|
|
7
7
|
fractal_server/app/models/linkusergroup.py,sha256=3KkkE4QIUAlTrBAZs_tVy0pGvAxUAq6yOEjflct_z2M,678
|
|
8
8
|
fractal_server/app/models/linkuserproject.py,sha256=hvaxh3Lkiy2uUCwB8gvn8RorCpvxSSdzWdCS_U1GL7g,315
|
|
9
|
-
fractal_server/app/models/security.py,sha256=
|
|
10
|
-
fractal_server/app/models/user_settings.py,sha256=
|
|
9
|
+
fractal_server/app/models/security.py,sha256=snHmvnjYnq37qcXlUfieTUDz9bf-djOMeXMixP5EW3g,3736
|
|
10
|
+
fractal_server/app/models/user_settings.py,sha256=6Cc4r6ZVcASwlcPtnKZfKe2OidzOafQlmzWYZNTpRYU,1126
|
|
11
11
|
fractal_server/app/models/v2/__init__.py,sha256=A668GF4z_UPar6kAOwC-o_qUo3CIRJ3SmBGYTs3Xc7k,923
|
|
12
12
|
fractal_server/app/models/v2/accounting.py,sha256=i-2TsjqyuclxFQ21C-TeDoss7ZBTRuXdzIJfVr2UxwE,1081
|
|
13
13
|
fractal_server/app/models/v2/dataset.py,sha256=P_zy4dPQAqrCALQ6737VkAFk1SvcgYjnslGUZhPI8sc,1226
|
|
@@ -17,23 +17,23 @@ fractal_server/app/models/v2/profile.py,sha256=dH5xftMYThd6xqw86a--2MPCysxGTLTsy
|
|
|
17
17
|
fractal_server/app/models/v2/project.py,sha256=b6QZaMutwTfT1e_1mDDuwccgKVs4pcB0SMSYTtvfMrg,866
|
|
18
18
|
fractal_server/app/models/v2/resource.py,sha256=RPQqOp1auoiXdPf27QazSXvzuUz9iPN1qfh7cRwxF64,3536
|
|
19
19
|
fractal_server/app/models/v2/task.py,sha256=iBIQB8POQE5MyKvLZhw7jZWlBhbrThzCDzRTcgiAczQ,1493
|
|
20
|
-
fractal_server/app/models/v2/task_group.py,sha256=
|
|
20
|
+
fractal_server/app/models/v2/task_group.py,sha256=sOlBhOkDyIJN19yD358TsQtDJOVSeGhHffrxgB3KkkQ,4753
|
|
21
21
|
fractal_server/app/models/v2/workflow.py,sha256=gBjDXO-RytVT81aAlesImBhmVHrwNUrmsF_UsGa1qLM,1057
|
|
22
22
|
fractal_server/app/models/v2/workflowtask.py,sha256=qkTc-hcFLpJUVsEUbnDq2BJL0qg9jagy2doZeusF1ek,1266
|
|
23
23
|
fractal_server/app/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
fractal_server/app/routes/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
fractal_server/app/routes/admin/v2/__init__.py,sha256=SzLurEzKBRWHcIFh2mpac2wrGAWJwv9WW-Ry2DiNkZY,1161
|
|
26
26
|
fractal_server/app/routes/admin/v2/_aux_functions.py,sha256=fqA5sUCFuD2iVANQt2WUUfVOEVz5egQA7inzUKYGCw0,1684
|
|
27
|
-
fractal_server/app/routes/admin/v2/accounting.py,sha256
|
|
28
|
-
fractal_server/app/routes/admin/v2/impersonate.py,sha256=
|
|
29
|
-
fractal_server/app/routes/admin/v2/job.py,sha256=
|
|
30
|
-
fractal_server/app/routes/admin/v2/profile.py,sha256=
|
|
31
|
-
fractal_server/app/routes/admin/v2/project.py,sha256=
|
|
32
|
-
fractal_server/app/routes/admin/v2/resource.py,sha256=
|
|
33
|
-
fractal_server/app/routes/admin/v2/task.py,sha256=
|
|
34
|
-
fractal_server/app/routes/admin/v2/task_group.py,sha256=
|
|
35
|
-
fractal_server/app/routes/admin/v2/task_group_lifecycle.py,sha256=
|
|
36
|
-
fractal_server/app/routes/api/__init__.py,sha256=
|
|
27
|
+
fractal_server/app/routes/admin/v2/accounting.py,sha256=DjgMqzdrL8hYMn19cZj2pkwtLKl3QfBwxd473kH4KaI,3584
|
|
28
|
+
fractal_server/app/routes/admin/v2/impersonate.py,sha256=ictDjuvBr3iLv3YtwkVRMNQRq5qtPAeAXbbC7STSsEg,1125
|
|
29
|
+
fractal_server/app/routes/admin/v2/job.py,sha256=sFgMbOtUCIJ-ri6YD3ZWP7XETZZDQsLqPfT1kaH9RHQ,8577
|
|
30
|
+
fractal_server/app/routes/admin/v2/profile.py,sha256=h9R4bwZQXBg0FAm2lj-DQ3vKQSFDtvjRARFpxfI3WR4,2733
|
|
31
|
+
fractal_server/app/routes/admin/v2/project.py,sha256=rRq7ZDngr_29skASnte1xfycZCjK-WPdeTf7siBXiCU,1182
|
|
32
|
+
fractal_server/app/routes/admin/v2/resource.py,sha256=uel-MN3f9TkkIJ7flEC4yPH7q2qGQxoaxPB0LxfZzYs,7796
|
|
33
|
+
fractal_server/app/routes/admin/v2/task.py,sha256=B_RfL320acBKFkOa34S0sWI44VCFBE_jg_jGHZASKO8,4303
|
|
34
|
+
fractal_server/app/routes/admin/v2/task_group.py,sha256=sxASS5948inqcP2IU3C2tcLB5egXfxef0TPlVcRtP-U,6028
|
|
35
|
+
fractal_server/app/routes/admin/v2/task_group_lifecycle.py,sha256=W7LjIBAheyjrn0fEz0SsWINqcZK5HMB5GRGMjPrc6a4,9994
|
|
36
|
+
fractal_server/app/routes/api/__init__.py,sha256=wJE77LxZ51p1N9AIX-kd4VdUDEk0RYbCy-T_pn2V73I,1408
|
|
37
37
|
fractal_server/app/routes/api/v2/__init__.py,sha256=D3sRRsqkmZO6kBxUjg40q0aRDsnuXI4sOOfn0xF9JsM,2820
|
|
38
38
|
fractal_server/app/routes/api/v2/_aux_functions.py,sha256=8xnXYPjzo1yZfcg18b5ZY5tu9OQ1e55fOnX1IEmDSHk,15019
|
|
39
39
|
fractal_server/app/routes/api/v2/_aux_functions_history.py,sha256=PXsqMQ3sfkABqAMI7v1_VAzUEDF_-kvaZyyhEicqsCw,4431
|
|
@@ -41,43 +41,41 @@ fractal_server/app/routes/api/v2/_aux_functions_task_lifecycle.py,sha256=5gNt35r
|
|
|
41
41
|
fractal_server/app/routes/api/v2/_aux_functions_task_version_update.py,sha256=PKjV7r8YsPRXoNiVSnOK4KBYVV3l_Yb_ZPrqAkMkXrQ,1182
|
|
42
42
|
fractal_server/app/routes/api/v2/_aux_functions_tasks.py,sha256=eAXGnC7yEYGn1g2VDfSGvApN2mw79r4fW7ykRlDY2CY,12468
|
|
43
43
|
fractal_server/app/routes/api/v2/_aux_task_group_disambiguation.py,sha256=8x1_q9FyCzItnPmdSdLQuwUTy4B9xCsXscp97_lJcpM,4635
|
|
44
|
-
fractal_server/app/routes/api/v2/dataset.py,sha256=
|
|
45
|
-
fractal_server/app/routes/api/v2/history.py,sha256=
|
|
46
|
-
fractal_server/app/routes/api/v2/images.py,sha256=
|
|
47
|
-
fractal_server/app/routes/api/v2/job.py,sha256=
|
|
48
|
-
fractal_server/app/routes/api/v2/pre_submission_checks.py,sha256=
|
|
49
|
-
fractal_server/app/routes/api/v2/project.py,sha256=
|
|
50
|
-
fractal_server/app/routes/api/v2/status_legacy.py,sha256=
|
|
51
|
-
fractal_server/app/routes/api/v2/submit.py,sha256=
|
|
52
|
-
fractal_server/app/routes/api/v2/task.py,sha256=
|
|
53
|
-
fractal_server/app/routes/api/v2/task_collection.py,sha256=
|
|
54
|
-
fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=
|
|
55
|
-
fractal_server/app/routes/api/v2/task_collection_pixi.py,sha256=
|
|
56
|
-
fractal_server/app/routes/api/v2/task_group.py,sha256=
|
|
57
|
-
fractal_server/app/routes/api/v2/task_group_lifecycle.py,sha256=
|
|
58
|
-
fractal_server/app/routes/api/v2/task_version_update.py,sha256=
|
|
59
|
-
fractal_server/app/routes/api/v2/workflow.py,sha256=
|
|
60
|
-
fractal_server/app/routes/api/v2/workflow_import.py,sha256=
|
|
61
|
-
fractal_server/app/routes/api/v2/workflowtask.py,sha256
|
|
62
|
-
fractal_server/app/routes/auth/__init__.py,sha256=
|
|
44
|
+
fractal_server/app/routes/api/v2/dataset.py,sha256=HhRrReo_isFJFMaUhQfxEQkLj0_lXNfGblzwpLG81VU,8623
|
|
45
|
+
fractal_server/app/routes/api/v2/history.py,sha256=T-7GDLZ_x4cp9PMEozJoEFt4cGFYPDqv9-akYmN2JSU,17150
|
|
46
|
+
fractal_server/app/routes/api/v2/images.py,sha256=_R-F1qrsFv3PPukrwXSa-5swNS4kNghY0DTrxjLC_7E,7897
|
|
47
|
+
fractal_server/app/routes/api/v2/job.py,sha256=fyIYGcplsxzx91FxYWlImp1ATPk5IC8bfIcJkuZOhws,6526
|
|
48
|
+
fractal_server/app/routes/api/v2/pre_submission_checks.py,sha256=DEnlFj6PMNMy9DrnH6_pMW9evdKl6iTlAb0zlzBR1Qs,4953
|
|
49
|
+
fractal_server/app/routes/api/v2/project.py,sha256=eQcQs0ElMpUN0OTcgG7DXk70t9Dn8Fdd6oHeQ0WbgJI,4782
|
|
50
|
+
fractal_server/app/routes/api/v2/status_legacy.py,sha256=vZA4AYMehXbNFgekl4j6p8idETC3IylQQL64CmFCr98,6330
|
|
51
|
+
fractal_server/app/routes/api/v2/submit.py,sha256=jPPvJNeLBcPVl0BsLnOZn_KtxoQvdBnAVnzFVihUJIc,9364
|
|
52
|
+
fractal_server/app/routes/api/v2/task.py,sha256=KDIBrQpIbbVrffOBtxah-gXiOnN-EG84ujXeGPOqKhg,7160
|
|
53
|
+
fractal_server/app/routes/api/v2/task_collection.py,sha256=A0mfajyJVVrWNuI7YaPih7juSWOnks78NnJDwnGfvdo,12281
|
|
54
|
+
fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=9SqiMPuED5LEGKo3Tiq5KfXFqmjaZPg9KWL-Yn5jdLo,7010
|
|
55
|
+
fractal_server/app/routes/api/v2/task_collection_pixi.py,sha256=QHqdnaddTW-DZKrnzLKwCPP5j3UiqxOtFO04aZeexdk,7244
|
|
56
|
+
fractal_server/app/routes/api/v2/task_group.py,sha256=_M_munannm0wMmLdOwo-qATqrl0Vu_TsrpLb-2554fs,8104
|
|
57
|
+
fractal_server/app/routes/api/v2/task_group_lifecycle.py,sha256=ZSn8Ibjwkp89v87OPBquULPc9xsdpBfRvV1PiQdiicw,10593
|
|
58
|
+
fractal_server/app/routes/api/v2/task_version_update.py,sha256=JO5xggiRqay4zNlbjlRa26ygMEue2klSFPyLrXS215k,8254
|
|
59
|
+
fractal_server/app/routes/api/v2/workflow.py,sha256=szb6t9OWOjr0CwboF0fJUyO5jUPj_HRpf5N0CDuHkqc,10755
|
|
60
|
+
fractal_server/app/routes/api/v2/workflow_import.py,sha256=iFy8jPuMMt1DpIcs5iJc5Gzcq-wbMtnk05NdU1y5nkQ,9095
|
|
61
|
+
fractal_server/app/routes/api/v2/workflowtask.py,sha256=-V7WjTfYb2L7i3_dQ0Am_ydqepdqs-j3BY67_5iZPfU,7960
|
|
62
|
+
fractal_server/app/routes/auth/__init__.py,sha256=Y-RQMwY5V25ZVgyYYoFIXvEDQgm6PGTDgxH755oa_NM,2358
|
|
63
63
|
fractal_server/app/routes/auth/_aux_auth.py,sha256=fyGxBVb6yrVrsE7-2tTyiJ7orb9Jzkg36m_q-rP7Zs8,4868
|
|
64
|
-
fractal_server/app/routes/auth/current_user.py,sha256=
|
|
65
|
-
fractal_server/app/routes/auth/group.py,sha256=
|
|
64
|
+
fractal_server/app/routes/auth/current_user.py,sha256=A8GJpWV90FnheuhhYsAGjiuQn8IAoOVNAR0e53JHwPU,5611
|
|
65
|
+
fractal_server/app/routes/auth/group.py,sha256=wZnqzIOZHpoUW2Yp6dkAMRqIiM_otVdG4fZuBYmLocA,6919
|
|
66
66
|
fractal_server/app/routes/auth/login.py,sha256=tSu6OBLOieoBtMZB4JkBAdEgH2Y8KqPGSbwy7NIypIo,566
|
|
67
67
|
fractal_server/app/routes/auth/oauth.py,sha256=iI2vEdvDlEE5BrFz5Krq96VUk39HDuE0NzqW9fS3dDE,2261
|
|
68
|
-
fractal_server/app/routes/auth/register.py,sha256=
|
|
68
|
+
fractal_server/app/routes/auth/register.py,sha256=Ola-lNdYYEOK8Wh0Q-TFKwIJ25e6UswlUojJ8QGBCfc,581
|
|
69
69
|
fractal_server/app/routes/auth/router.py,sha256=-E87A8h2UvcLucy5xjzKiWbXHVKcqxUmmZGeV_utEzA,598
|
|
70
|
-
fractal_server/app/routes/auth/users.py,sha256=
|
|
70
|
+
fractal_server/app/routes/auth/users.py,sha256=L94-1A62FFfASflURggYsVDOxtWNRU-gK6eSx8ZckyA,6921
|
|
71
71
|
fractal_server/app/routes/aux/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
72
|
fractal_server/app/routes/aux/_job.py,sha256=nqqdcW5B7fL_PbvHf57_TcifjUfcMgl04tKNvG2sV1U,628
|
|
73
73
|
fractal_server/app/routes/aux/_runner.py,sha256=SDzI7glEfkW_XecWFuRQitbSWSvAPegI-J5c7i5d0_w,957
|
|
74
74
|
fractal_server/app/routes/aux/validate_user_profile.py,sha256=fGqJDdAFkbQoEIjqZ5F9-SDY_4os63R2EUMqODC7eBg,1969
|
|
75
|
-
fractal_server/app/routes/aux/validate_user_settings.py,sha256=C_V5QhnBppyr-YYoni_yVrooU5bKfSTrwM-ea2m5pqU,2405
|
|
76
75
|
fractal_server/app/routes/pagination.py,sha256=IGy8Ll5lYr6ENYE18h3huH5s0GMX1DCs5VdCi6j1cdk,1174
|
|
77
|
-
fractal_server/app/schemas/__init__.py,sha256=
|
|
78
|
-
fractal_server/app/schemas/user.py,sha256=
|
|
76
|
+
fractal_server/app/schemas/__init__.py,sha256=VIWJCaqokte3OljDLX00o-EC2d12rFoPb5HOLKQI94Y,86
|
|
77
|
+
fractal_server/app/schemas/user.py,sha256=nXsE4yEt8xiMlr2IhLoul0M0x2vYWaXIJBG_-NmRj6w,2919
|
|
79
78
|
fractal_server/app/schemas/user_group.py,sha256=x3-kqbo0q2wTP7QI0iZ7PU_9Dr957UYrFMKqS7BXLhE,1425
|
|
80
|
-
fractal_server/app/schemas/user_settings.py,sha256=x-MS4Hq0RWkE3in6Su454Yk_cmbfY1lnIzjM82jij5U,1692
|
|
81
79
|
fractal_server/app/schemas/v2/__init__.py,sha256=ShdbfHQe_MNMQzyjaEl7NGj30h2u8mUD9-UX3hsS3sA,3669
|
|
82
80
|
fractal_server/app/schemas/v2/accounting.py,sha256=C_ekrYQwhi7PtrxxB07oVAG2y1NLigXjYwyp4E38fao,396
|
|
83
81
|
fractal_server/app/schemas/v2/dataset.py,sha256=NKCjBwGBC7mPiSlXktZAcleJsvlLY6KfNKw7Wx4Zfqk,1728
|
|
@@ -91,17 +89,16 @@ fractal_server/app/schemas/v2/resource.py,sha256=4iXzZJeHVLcXYY08-okoJM_4gqpzhG4
|
|
|
91
89
|
fractal_server/app/schemas/v2/status_legacy.py,sha256=eQT1zGxbkzSwd0EqclsOdZ60n1x6J3DB1CZ3m4LYyxc,955
|
|
92
90
|
fractal_server/app/schemas/v2/task.py,sha256=IJv8loB4kx9FBkaIHoiMsswQyq02FxvyAnHK1u074fU,4364
|
|
93
91
|
fractal_server/app/schemas/v2/task_collection.py,sha256=BzHQXq2_zLZTbigWauOR5Zi-mlsqCIF2NEF_z12Nqxg,4480
|
|
94
|
-
fractal_server/app/schemas/v2/task_group.py,sha256=
|
|
92
|
+
fractal_server/app/schemas/v2/task_group.py,sha256=anC7YPiOEcLmxN2JyARLMMHp6l7NfvsCpx3sMcnug4o,3436
|
|
95
93
|
fractal_server/app/schemas/v2/workflow.py,sha256=L-dW6SzCH_VNoH6ENip44lTgGGqVYHHBk_3PtM-Ooy8,1772
|
|
96
94
|
fractal_server/app/schemas/v2/workflowtask.py,sha256=6eweAMyziwaoMT-7R1fVJYunIeZKzT0-7fAVgPO_FEc,3639
|
|
97
|
-
fractal_server/app/security/__init__.py,sha256=
|
|
98
|
-
fractal_server/app/security/signup_email.py,sha256=
|
|
95
|
+
fractal_server/app/security/__init__.py,sha256=gtfJkwdXTm_F38sFgb5LH3AcdvKs42fOUJa8jo8Cmbw,17484
|
|
96
|
+
fractal_server/app/security/signup_email.py,sha256=kphjq6TAygvPpYpg95QJWefyqmzdVrGz7fyRMctUJWE,1982
|
|
99
97
|
fractal_server/app/shutdown.py,sha256=ViSNJyXWU_iWPSDOOMGNh_iQdUFrdPh_jvf8vVKLpAo,1950
|
|
100
|
-
fractal_server/
|
|
101
|
-
fractal_server/config/__init__.py,sha256=WvcoE3qiY1qnkumv3qspcemCFw5iFG5NkSFR78vN4ks,562
|
|
98
|
+
fractal_server/config/__init__.py,sha256=EDk6ylmCXc8FoCYWTQ1bC-27yZ7iYHWxbhcjjMbQX2A,611
|
|
102
99
|
fractal_server/config/_database.py,sha256=YOBi3xuJno5wLGw1hKsjLm-bftaxVWiBNIQWVTMX3Ag,1661
|
|
103
|
-
fractal_server/config/_email.py,sha256=
|
|
104
|
-
fractal_server/config/_main.py,sha256=
|
|
100
|
+
fractal_server/config/_email.py,sha256=j1QmZCyspNbD1xxkypc9Kv299tU3vTO1AqDFJ8-LZzQ,4201
|
|
101
|
+
fractal_server/config/_main.py,sha256=Xtcz2q2HuHYdk7DaD6uBG1KtQeBiQhKz6CANvevg1AA,3877
|
|
105
102
|
fractal_server/config/_oauth.py,sha256=OYWqJnL0yn8ymagKb4fK-2zNqXVBbumRWwZrr9TFUms,1926
|
|
106
103
|
fractal_server/config/_settings_config.py,sha256=tsyXQOnn9QKCFJD6hRo_dJXlQQyl70DbqgHMJoZ1xnY,144
|
|
107
104
|
fractal_server/data_migrations/2_14_10.py,sha256=jzMg2c1zNO8C_Nho_9_EZJD6kR1-gkFNpNrMR5Hr8hM,1598
|
|
@@ -161,6 +158,7 @@ fractal_server/migrations/versions/e81103413827_add_job_type_filters.py,sha256=t
|
|
|
161
158
|
fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py,sha256=jilQW3QIqYQ4Q6hCnUiG7UtNMpA41ujqrB3tPFiPM1Q,1221
|
|
162
159
|
fractal_server/migrations/versions/f37aceb45062_make_historyunit_logfile_required.py,sha256=jLHcVq9z0Ou20u-mwPf6EICDKY4dwFAzBgbRRx9_xDw,1007
|
|
163
160
|
fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py,sha256=9BwqUS9Gf7UW_KjrzHbtViC880qhD452KAytkHWWZyk,746
|
|
161
|
+
fractal_server/migrations/versions/f65ee53991e3_user_settings_related.py,sha256=q9oaVpp85X4EZt3f33ThyBDZD3_9trO2va9uAIh2yK0,1883
|
|
164
162
|
fractal_server/migrations/versions/fbce16ff4e47_new_history_items.py,sha256=TDWCaIoM0Q4SpRWmR9zr_rdp3lJXhCfBPTMhtrP5xYE,3950
|
|
165
163
|
fractal_server/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
166
164
|
fractal_server/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -179,31 +177,31 @@ fractal_server/runner/executors/local/runner.py,sha256=cwQyPfSXyvLTigU4hfyQuCTps
|
|
|
179
177
|
fractal_server/runner/executors/slurm_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
180
178
|
fractal_server/runner/executors/slurm_common/_batching.py,sha256=la_FXt4ErYU63vkmk2SGZcSOqq-Jzp_L9tZfzBY7rlU,8806
|
|
181
179
|
fractal_server/runner/executors/slurm_common/_job_states.py,sha256=nuV-Zba38kDrRESOVB3gaGbrSPZc4q7YGichQaeqTW0,238
|
|
182
|
-
fractal_server/runner/executors/slurm_common/base_slurm_runner.py,sha256=
|
|
180
|
+
fractal_server/runner/executors/slurm_common/base_slurm_runner.py,sha256=jnUuoHDwNu1UL0FWu61PjY8GLgK20PvVBpJRwRCKJP8,40969
|
|
183
181
|
fractal_server/runner/executors/slurm_common/get_slurm_config.py,sha256=kQQtc4o5Ya3gLMB6x9xuuyDX6jKpa0bSqkHeiAz7lTM,7071
|
|
184
182
|
fractal_server/runner/executors/slurm_common/remote.py,sha256=2ByWIHFKL1bW6CS04ijrJvX4jH8CpX2Pp-QhAncc-Hs,3806
|
|
185
|
-
fractal_server/runner/executors/slurm_common/slurm_config.py,sha256=
|
|
183
|
+
fractal_server/runner/executors/slurm_common/slurm_config.py,sha256=hnZWxgXZsawubPNRHPXMHe1eD8cT44z1BTuKaYqPLTU,7895
|
|
186
184
|
fractal_server/runner/executors/slurm_common/slurm_job_task_models.py,sha256=wOVtACSFLulc0gUwXlj_SXJHIQmgHpseohw-SahT1DM,3517
|
|
187
185
|
fractal_server/runner/executors/slurm_ssh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
188
186
|
fractal_server/runner/executors/slurm_ssh/run_subprocess.py,sha256=SyW6t4egvbiARph2YkFjc88Hj94fCamZVi50L7ph8VM,996
|
|
189
|
-
fractal_server/runner/executors/slurm_ssh/runner.py,sha256=
|
|
187
|
+
fractal_server/runner/executors/slurm_ssh/runner.py,sha256=1ehjRxcbChvk9mZgqCUCQY69Xpn8JyYH-Db6cQ7Xrt4,10203
|
|
190
188
|
fractal_server/runner/executors/slurm_ssh/tar_commands.py,sha256=yqBjWTLmh_FzhCllt_KfbuCUGvRhsHLVWlPOZlRWLzY,1762
|
|
191
189
|
fractal_server/runner/executors/slurm_sudo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
192
190
|
fractal_server/runner/executors/slurm_sudo/_subprocess_run_as_user.py,sha256=9pN0N409M24TXIyhuWJb-Tj0Ztaud68xtQ7wfAibmfk,2566
|
|
193
|
-
fractal_server/runner/executors/slurm_sudo/runner.py,sha256=
|
|
191
|
+
fractal_server/runner/executors/slurm_sudo/runner.py,sha256=a_9c29735U3xqiWGv8WsyBN8SX9SgkGTY1mepNUUh64,5916
|
|
194
192
|
fractal_server/runner/filenames.py,sha256=lPnxKHtdRizr6FqG3zOdjDPyWA7GoaJGTtiuJV0gA8E,70
|
|
195
193
|
fractal_server/runner/set_start_and_last_task_index.py,sha256=NsioSzfEpGyo9ZKrV5KsbxeI7d5V3tE678Y3IAo5rHM,1218
|
|
196
194
|
fractal_server/runner/task_files.py,sha256=MvOrklZrN8iLj3oPx7G-iaEFj2N_mkTOnxIBX-okH1E,4037
|
|
197
195
|
fractal_server/runner/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
198
196
|
fractal_server/runner/v2/_local.py,sha256=js1W8_9QQad_kbvMM8ytjfWX_BEoq8OER9BLdxH0JRs,3759
|
|
199
|
-
fractal_server/runner/v2/_slurm_ssh.py,sha256=
|
|
200
|
-
fractal_server/runner/v2/_slurm_sudo.py,sha256=
|
|
197
|
+
fractal_server/runner/v2/_slurm_ssh.py,sha256=F7Zcs9NpmXDktTX_fQQke99Ov06Hi4XUUDsDKZwOmOI,4437
|
|
198
|
+
fractal_server/runner/v2/_slurm_sudo.py,sha256=f34B6KWtn1Wwm7Y-D95Ecub0vKpA03zYL7jZAF53tfI,4344
|
|
201
199
|
fractal_server/runner/v2/db_tools.py,sha256=kLB0sGYNuCMPPoP4XDSClPIf7x5lSseTKUjzGk6gAfc,3318
|
|
202
200
|
fractal_server/runner/v2/deduplicate_list.py,sha256=vidkd7K6u3w0A4zVgsGZkc9mwoP6ihTYJZQUhBNorfE,667
|
|
203
201
|
fractal_server/runner/v2/merge_outputs.py,sha256=0ahaSwdMFAoEhxVaEaO9nSJuKIcWg9pDZ356ktSHcC0,897
|
|
204
202
|
fractal_server/runner/v2/runner.py,sha256=1vj6m_ir6RrYNr3Ew98h5hnEAms_TaHPhee52swQ_gA,19404
|
|
205
203
|
fractal_server/runner/v2/runner_functions.py,sha256=w_i74LCt_9f07w511wslTFhoDUtoE1R-IKcglEGWPIc,19618
|
|
206
|
-
fractal_server/runner/v2/submit_workflow.py,sha256=
|
|
204
|
+
fractal_server/runner/v2/submit_workflow.py,sha256=s3mo5pLZH5x8V01IZjoJXcbpCl9geZwvISEr5StSBeI,11458
|
|
207
205
|
fractal_server/runner/v2/task_interface.py,sha256=ftPPpOU16rbJD8q-QV7o_3ey8W7MQTFuWJiYUr4OmF4,2532
|
|
208
206
|
fractal_server/runner/versions.py,sha256=uz59Dxj7BphnFnr-p0kyaZRH0h4w5Xkd0UJNVGtt4ds,474
|
|
209
207
|
fractal_server/ssh/__init__.py,sha256=sVUmzxf7_DuXG1xoLQ1_00fo5NPhi2LJipSmU5EAkPs,124
|
|
@@ -258,8 +256,8 @@ fractal_server/types/validators/_workflow_task_arguments_validators.py,sha256=HL
|
|
|
258
256
|
fractal_server/urls.py,sha256=QjIKAC1a46bCdiPMu3AlpgFbcv6a4l3ABcd5xz190Og,471
|
|
259
257
|
fractal_server/utils.py,sha256=SYVVUuXe_nWyrJLsy7QA-KJscwc5PHEXjvsW4TK7XQI,2180
|
|
260
258
|
fractal_server/zip_tools.py,sha256=H0w7wS5yE4ebj7hw1_77YQ959dl2c-L0WX6J_ro1TY4,4884
|
|
261
|
-
fractal_server-2.17.
|
|
262
|
-
fractal_server-2.17.
|
|
263
|
-
fractal_server-2.17.
|
|
264
|
-
fractal_server-2.17.
|
|
265
|
-
fractal_server-2.17.
|
|
259
|
+
fractal_server-2.17.0a5.dist-info/METADATA,sha256=oUgYkhW5EongBJTrbWUUyPKU6j64g8F9GG4PPY0NR0c,4272
|
|
260
|
+
fractal_server-2.17.0a5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
261
|
+
fractal_server-2.17.0a5.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
|
262
|
+
fractal_server-2.17.0a5.dist-info/licenses/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
|
263
|
+
fractal_server-2.17.0a5.dist-info/RECORD,,
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
from fastapi import HTTPException
|
|
2
|
-
from fastapi import status
|
|
3
|
-
from pydantic import ValidationError
|
|
4
|
-
|
|
5
|
-
from fractal_server.app.db import AsyncSession
|
|
6
|
-
from fractal_server.app.models import UserOAuth
|
|
7
|
-
from fractal_server.app.models import UserSettings
|
|
8
|
-
from fractal_server.app.schemas.v2 import ResourceType
|
|
9
|
-
from fractal_server.app.user_settings import SlurmSshUserSettings
|
|
10
|
-
from fractal_server.app.user_settings import SlurmSudoUserSettings
|
|
11
|
-
from fractal_server.logger import set_logger
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
logger = set_logger(__name__)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def verify_user_has_settings(user: UserOAuth) -> None:
|
|
18
|
-
"""
|
|
19
|
-
Check that the `user.user_settings_id` foreign-key is set.
|
|
20
|
-
|
|
21
|
-
NOTE: This check will become useless when we make the foreign-key column
|
|
22
|
-
required, but for the moment (as of v2.6.0) we have to keep it in place.
|
|
23
|
-
|
|
24
|
-
Args:
|
|
25
|
-
user: The user to be checked.
|
|
26
|
-
"""
|
|
27
|
-
if user.user_settings_id is None:
|
|
28
|
-
raise HTTPException(
|
|
29
|
-
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT,
|
|
30
|
-
detail=f"Error: user '{user.email}' has no settings.",
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
async def validate_user_settings(
|
|
35
|
-
*, user: UserOAuth, backend: str, db: AsyncSession
|
|
36
|
-
) -> UserSettings:
|
|
37
|
-
"""
|
|
38
|
-
Get a UserSettings object and validate it based on a given Fractal backend.
|
|
39
|
-
|
|
40
|
-
Args:
|
|
41
|
-
user: The user whose settings we should validate.
|
|
42
|
-
backend: The value of `FRACTAL_RUNNER_BACKEND`
|
|
43
|
-
db: An async DB session
|
|
44
|
-
|
|
45
|
-
Returns:
|
|
46
|
-
`UserSetting` object associated to `user`, if valid.
|
|
47
|
-
"""
|
|
48
|
-
|
|
49
|
-
verify_user_has_settings(user)
|
|
50
|
-
|
|
51
|
-
user_settings = await db.get(UserSettings, user.user_settings_id)
|
|
52
|
-
|
|
53
|
-
match backend:
|
|
54
|
-
case ResourceType.SLURM_SSH:
|
|
55
|
-
UserSettingsValidationModel = SlurmSshUserSettings
|
|
56
|
-
case ResourceType.SLURM_SUDO:
|
|
57
|
-
UserSettingsValidationModel = SlurmSudoUserSettings
|
|
58
|
-
case _:
|
|
59
|
-
# For other backends, we don't validate anything
|
|
60
|
-
return user_settings
|
|
61
|
-
|
|
62
|
-
try:
|
|
63
|
-
UserSettingsValidationModel(**user_settings.model_dump())
|
|
64
|
-
except ValidationError as e:
|
|
65
|
-
error_msg = (
|
|
66
|
-
"User settings are not valid for "
|
|
67
|
-
f"FRACTAL_RUNNER_BACKEND='{backend}'. "
|
|
68
|
-
f"Original error: {str(e)}"
|
|
69
|
-
)
|
|
70
|
-
logger.warning(error_msg)
|
|
71
|
-
raise HTTPException(
|
|
72
|
-
status_code=status.HTTP_422_UNPROCESSABLE_CONTENT,
|
|
73
|
-
detail=error_msg,
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
return user_settings
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
from pydantic import BaseModel
|
|
2
|
-
from pydantic import ConfigDict
|
|
3
|
-
from pydantic import field_validator
|
|
4
|
-
|
|
5
|
-
from fractal_server.string_tools import validate_cmd
|
|
6
|
-
from fractal_server.types import AbsolutePathStr
|
|
7
|
-
from fractal_server.types import ListUniqueNonEmptyString
|
|
8
|
-
from fractal_server.types import NonEmptyStr
|
|
9
|
-
|
|
10
|
-
__all__ = (
|
|
11
|
-
"UserSettingsRead",
|
|
12
|
-
"UserSettingsReadStrict",
|
|
13
|
-
"UserSettingsUpdate",
|
|
14
|
-
"UserSettingsUpdateStrict",
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class UserSettingsRead(BaseModel):
|
|
19
|
-
"""
|
|
20
|
-
Schema reserved for superusers
|
|
21
|
-
"""
|
|
22
|
-
|
|
23
|
-
id: int
|
|
24
|
-
ssh_host: str | None = None
|
|
25
|
-
ssh_username: str | None = None
|
|
26
|
-
ssh_private_key_path: str | None = None
|
|
27
|
-
slurm_user: str | None = None
|
|
28
|
-
slurm_accounts: list[str]
|
|
29
|
-
project_dir: str | None = None
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class UserSettingsReadStrict(BaseModel):
|
|
33
|
-
slurm_user: str | None = None
|
|
34
|
-
slurm_accounts: list[str]
|
|
35
|
-
ssh_username: str | None = None
|
|
36
|
-
project_dir: str | None = None
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class UserSettingsUpdate(BaseModel):
|
|
40
|
-
"""
|
|
41
|
-
Schema reserved for superusers
|
|
42
|
-
"""
|
|
43
|
-
|
|
44
|
-
model_config = ConfigDict(extra="forbid")
|
|
45
|
-
|
|
46
|
-
ssh_host: NonEmptyStr | None = None
|
|
47
|
-
ssh_username: NonEmptyStr | None = None
|
|
48
|
-
ssh_private_key_path: AbsolutePathStr | None = None
|
|
49
|
-
slurm_user: NonEmptyStr | None = None
|
|
50
|
-
slurm_accounts: ListUniqueNonEmptyString | None = None
|
|
51
|
-
project_dir: AbsolutePathStr | None = None
|
|
52
|
-
|
|
53
|
-
@field_validator("project_dir", mode="after")
|
|
54
|
-
@classmethod
|
|
55
|
-
def validate_project_dir(cls, value):
|
|
56
|
-
if value is not None:
|
|
57
|
-
validate_cmd(value)
|
|
58
|
-
return value
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
class UserSettingsUpdateStrict(BaseModel):
|
|
62
|
-
model_config = ConfigDict(extra="forbid")
|
|
63
|
-
slurm_accounts: ListUniqueNonEmptyString | None = None
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# TODO: move this file to the appropriate path
|
|
2
|
-
from pydantic import BaseModel
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class SlurmSshUserSettings(BaseModel):
|
|
6
|
-
"""
|
|
7
|
-
Subset of user settings which must be present for task collection and job
|
|
8
|
-
execution when using the Slurm-SSH runner.
|
|
9
|
-
|
|
10
|
-
Attributes:
|
|
11
|
-
project_dir: Folder where `slurm_user` can write.
|
|
12
|
-
slurm_accounts:
|
|
13
|
-
List of SLURM accounts, to be used upon Fractal job submission.
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
project_dir: str
|
|
17
|
-
slurm_accounts: list[str]
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class SlurmSudoUserSettings(BaseModel):
|
|
21
|
-
"""
|
|
22
|
-
Subset of user settings which must be present for task collection and job
|
|
23
|
-
execution when using the Slurm-sudo runner.
|
|
24
|
-
|
|
25
|
-
Attributes:
|
|
26
|
-
project_dir: Folder where `slurm_user` can write.
|
|
27
|
-
slurm_accounts:
|
|
28
|
-
List of SLURM accounts, to be used upon Fractal job submission.
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
project_dir: str
|
|
32
|
-
slurm_accounts: list[str]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|