fractal-server 2.6.1__py3-none-any.whl → 2.6.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/schemas/_validators.py +7 -2
- fractal_server/app/schemas/user_settings.py +12 -6
- {fractal_server-2.6.1.dist-info → fractal_server-2.6.2.dist-info}/METADATA +1 -1
- {fractal_server-2.6.1.dist-info → fractal_server-2.6.2.dist-info}/RECORD +8 -8
- {fractal_server-2.6.1.dist-info → fractal_server-2.6.2.dist-info}/LICENSE +0 -0
- {fractal_server-2.6.1.dist-info → fractal_server-2.6.2.dist-info}/WHEEL +0 -0
- {fractal_server-2.6.1.dist-info → fractal_server-2.6.2.dist-info}/entry_points.txt +0 -0
fractal_server/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__VERSION__ = "2.6.
|
1
|
+
__VERSION__ = "2.6.2"
|
@@ -69,14 +69,19 @@ def valint(attribute: str, min_val: int = 1):
|
|
69
69
|
return val
|
70
70
|
|
71
71
|
|
72
|
-
def val_absolute_path(attribute: str):
|
72
|
+
def val_absolute_path(attribute: str, accept_none: bool = False):
|
73
73
|
"""
|
74
74
|
Check that a string attribute is an absolute path
|
75
75
|
"""
|
76
76
|
|
77
77
|
def val(string: Optional[str]) -> str:
|
78
78
|
if string is None:
|
79
|
-
|
79
|
+
if accept_none:
|
80
|
+
return string
|
81
|
+
else:
|
82
|
+
raise ValueError(
|
83
|
+
f"String attribute '{attribute}' cannot be None"
|
84
|
+
)
|
80
85
|
s = string.strip()
|
81
86
|
if not s:
|
82
87
|
raise ValueError(f"String attribute '{attribute}' cannot be empty")
|
@@ -47,23 +47,25 @@ class UserSettingsUpdate(BaseModel, extra=Extra.forbid):
|
|
47
47
|
slurm_accounts: Optional[list[StrictStr]] = None
|
48
48
|
cache_dir: Optional[str] = None
|
49
49
|
|
50
|
-
_ssh_host = validator("ssh_host", allow_reuse=True)(
|
50
|
+
_ssh_host = validator("ssh_host", allow_reuse=True)(
|
51
|
+
valstr("ssh_host", accept_none=True)
|
52
|
+
)
|
51
53
|
_ssh_username = validator("ssh_username", allow_reuse=True)(
|
52
|
-
valstr("ssh_username")
|
54
|
+
valstr("ssh_username", accept_none=True)
|
53
55
|
)
|
54
56
|
_ssh_private_key_path = validator(
|
55
57
|
"ssh_private_key_path", allow_reuse=True
|
56
|
-
)(val_absolute_path("ssh_private_key_path"))
|
58
|
+
)(val_absolute_path("ssh_private_key_path", accept_none=True))
|
57
59
|
|
58
60
|
_ssh_tasks_dir = validator("ssh_tasks_dir", allow_reuse=True)(
|
59
|
-
val_absolute_path("ssh_tasks_dir")
|
61
|
+
val_absolute_path("ssh_tasks_dir", accept_none=True)
|
60
62
|
)
|
61
63
|
_ssh_jobs_dir = validator("ssh_jobs_dir", allow_reuse=True)(
|
62
|
-
val_absolute_path("ssh_jobs_dir")
|
64
|
+
val_absolute_path("ssh_jobs_dir", accept_none=True)
|
63
65
|
)
|
64
66
|
|
65
67
|
_slurm_user = validator("slurm_user", allow_reuse=True)(
|
66
|
-
valstr("slurm_user")
|
68
|
+
valstr("slurm_user", accept_none=True)
|
67
69
|
)
|
68
70
|
|
69
71
|
@validator("slurm_accounts")
|
@@ -76,6 +78,8 @@ class UserSettingsUpdate(BaseModel, extra=Extra.forbid):
|
|
76
78
|
|
77
79
|
@validator("cache_dir")
|
78
80
|
def cache_dir_validator(cls, value):
|
81
|
+
if value is None:
|
82
|
+
return None
|
79
83
|
validate_cmd(value)
|
80
84
|
return val_absolute_path("cache_dir")(value)
|
81
85
|
|
@@ -90,5 +94,7 @@ class UserSettingsUpdateStrict(BaseModel, extra=Extra.forbid):
|
|
90
94
|
|
91
95
|
@validator("cache_dir")
|
92
96
|
def cache_dir_validator(cls, value):
|
97
|
+
if value is None:
|
98
|
+
return value
|
93
99
|
validate_cmd(value)
|
94
100
|
return val_absolute_path("cache_dir")(value)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
fractal_server/__init__.py,sha256
|
1
|
+
fractal_server/__init__.py,sha256=zk2Mr_vPWXiYjT0KF9CbddwUnuJ011NmmqEbItcDUz4,22
|
2
2
|
fractal_server/__main__.py,sha256=WcBAkmVE9aH5mDI6wGkVmPAql2N5Vyk0A-7zuUl8WX0,6122
|
3
3
|
fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
|
4
4
|
fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -125,10 +125,10 @@ fractal_server/app/runner/v2/runner_functions_low_level.py,sha256=1fWvQ6YZUUnDhO
|
|
125
125
|
fractal_server/app/runner/v2/task_interface.py,sha256=myS-kT0DsJ8xIJZBVEzgD8g54VbiwL6i7Im3e1zcVHQ,1866
|
126
126
|
fractal_server/app/runner/versions.py,sha256=dSaPRWqmFPHjg20kTCHmi_dmGNcCETflDtDLronNanU,852
|
127
127
|
fractal_server/app/schemas/__init__.py,sha256=stURAU_t3AOBaH0HSUbV-GKhlPKngnnIMoqWc3orFyI,135
|
128
|
-
fractal_server/app/schemas/_validators.py,sha256=
|
128
|
+
fractal_server/app/schemas/_validators.py,sha256=XKEGEHxp3H6YSJewtFWXe_2Nh7SDdNtAXmlEmJO6Vb0,3606
|
129
129
|
fractal_server/app/schemas/user.py,sha256=VNnAPnAVK6X0PZlw7XehocAshVNuUHdDwiZVWCCor6Y,2156
|
130
130
|
fractal_server/app/schemas/user_group.py,sha256=2f9XQ6kIar6NMY4UCN0yOnve6ZDHUVZaHv1dna1Vfjg,1446
|
131
|
-
fractal_server/app/schemas/user_settings.py,sha256=
|
131
|
+
fractal_server/app/schemas/user_settings.py,sha256=UEST1MSmd9w2YypCji3SONSFlJcr2u4uG3bTczZy_Pk,3102
|
132
132
|
fractal_server/app/schemas/v1/__init__.py,sha256=CrBGgBhoemCvmZ70ZUchM-jfVAICnoa7AjZBAtL2UB0,1852
|
133
133
|
fractal_server/app/schemas/v1/applyworkflow.py,sha256=uuIh7fHlHEL4yLqL-dePI6-nfCsqgBYATmht7w_KITw,4302
|
134
134
|
fractal_server/app/schemas/v1/dataset.py,sha256=n71lNUO3JLy2K3IM9BZM2Fk1EnKQOTU7pm2s2rJ1FGY,3444
|
@@ -213,8 +213,8 @@ fractal_server/tasks/v2/utils.py,sha256=JOyCacb6MNvrwfLNTyLwcz8y79J29YuJeJ2MK5kq
|
|
213
213
|
fractal_server/urls.py,sha256=5o_qq7PzKKbwq12NHSQZDmDitn5RAOeQ4xufu-2v9Zk,448
|
214
214
|
fractal_server/utils.py,sha256=b7WwFdcFZ8unyT65mloFToYuEDXpQoHRcmRNqrhd_dQ,2115
|
215
215
|
fractal_server/zip_tools.py,sha256=xYpzBshysD2nmxkD5WLYqMzPYUcCRM3kYy-7n9bJL-U,4426
|
216
|
-
fractal_server-2.6.
|
217
|
-
fractal_server-2.6.
|
218
|
-
fractal_server-2.6.
|
219
|
-
fractal_server-2.6.
|
220
|
-
fractal_server-2.6.
|
216
|
+
fractal_server-2.6.2.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
217
|
+
fractal_server-2.6.2.dist-info/METADATA,sha256=hlWGMOKcA-SXQpW1tlXMo9zfn6lKs31rl-byf88u8Bs,4628
|
218
|
+
fractal_server-2.6.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
219
|
+
fractal_server-2.6.2.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
220
|
+
fractal_server-2.6.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|