fractal-server 2.6.4__py3-none-any.whl → 2.7.0a1__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/linkusergroup.py +11 -0
- fractal_server/app/models/v2/__init__.py +2 -0
- fractal_server/app/models/v2/task.py +27 -0
- fractal_server/app/routes/api/v2/__init__.py +4 -0
- fractal_server/app/routes/api/v2/_aux_functions.py +0 -61
- fractal_server/app/routes/api/v2/_aux_functions_tasks.py +209 -0
- fractal_server/app/routes/api/v2/submit.py +16 -3
- fractal_server/app/routes/api/v2/task.py +59 -72
- fractal_server/app/routes/api/v2/task_collection.py +20 -4
- fractal_server/app/routes/api/v2/task_collection_custom.py +44 -18
- fractal_server/app/routes/api/v2/task_group.py +138 -0
- fractal_server/app/routes/api/v2/workflow.py +24 -3
- fractal_server/app/routes/api/v2/workflowtask.py +4 -7
- fractal_server/app/routes/auth/_aux_auth.py +72 -29
- fractal_server/app/routes/auth/current_user.py +5 -5
- fractal_server/app/routes/auth/router.py +0 -2
- fractal_server/app/routes/auth/users.py +8 -7
- fractal_server/app/schemas/user.py +1 -2
- fractal_server/app/schemas/v2/__init__.py +5 -0
- fractal_server/app/schemas/v2/task.py +2 -1
- fractal_server/app/schemas/v2/task_group.py +23 -0
- fractal_server/app/schemas/v2/workflow.py +5 -0
- fractal_server/app/schemas/v2/workflowtask.py +4 -0
- fractal_server/migrations/versions/7cf1baae8fb4_task_group_v2.py +66 -0
- fractal_server/migrations/versions/df7cc3501bf7_linkusergroup_timestamp_created.py +42 -0
- fractal_server/tasks/v2/background_operations.py +16 -35
- fractal_server/tasks/v2/background_operations_ssh.py +15 -2
- fractal_server/tasks/v2/database_operations.py +54 -0
- {fractal_server-2.6.4.dist-info → fractal_server-2.7.0a1.dist-info}/METADATA +1 -1
- {fractal_server-2.6.4.dist-info → fractal_server-2.7.0a1.dist-info}/RECORD +34 -29
- fractal_server/app/routes/auth/group_names.py +0 -34
- {fractal_server-2.6.4.dist-info → fractal_server-2.7.0a1.dist-info}/LICENSE +0 -0
- {fractal_server-2.6.4.dist-info → fractal_server-2.7.0a1.dist-info}/WHEEL +0 -0
- {fractal_server-2.6.4.dist-info → fractal_server-2.7.0a1.dist-info}/entry_points.txt +0 -0
@@ -102,6 +102,10 @@ class WorkflowTaskReadV2(BaseModel):
|
|
102
102
|
task: TaskReadV2
|
103
103
|
|
104
104
|
|
105
|
+
class WorkflowTaskReadV2WithWarning(WorkflowTaskReadV2):
|
106
|
+
warning: Optional[str] = None
|
107
|
+
|
108
|
+
|
105
109
|
class WorkflowTaskUpdateV2(BaseModel):
|
106
110
|
|
107
111
|
meta_non_parallel: Optional[dict[str, Any]]
|
@@ -0,0 +1,66 @@
|
|
1
|
+
"""task group v2
|
2
|
+
|
3
|
+
Revision ID: 7cf1baae8fb4
|
4
|
+
Revises: da2cb2ac4255
|
5
|
+
Create Date: 2024-10-01 12:31:46.792037
|
6
|
+
|
7
|
+
"""
|
8
|
+
import sqlalchemy as sa
|
9
|
+
from alembic import op
|
10
|
+
|
11
|
+
|
12
|
+
# revision identifiers, used by Alembic.
|
13
|
+
revision = "7cf1baae8fb4"
|
14
|
+
down_revision = "da2cb2ac4255"
|
15
|
+
branch_labels = None
|
16
|
+
depends_on = None
|
17
|
+
|
18
|
+
|
19
|
+
def upgrade() -> None:
|
20
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
21
|
+
op.create_table(
|
22
|
+
"taskgroupv2",
|
23
|
+
sa.Column("id", sa.Integer(), nullable=False),
|
24
|
+
sa.Column("user_id", sa.Integer(), nullable=False),
|
25
|
+
sa.Column("user_group_id", sa.Integer(), nullable=True),
|
26
|
+
sa.Column("active", sa.Boolean(), nullable=False),
|
27
|
+
sa.Column(
|
28
|
+
"timestamp_created", sa.DateTime(timezone=True), nullable=False
|
29
|
+
),
|
30
|
+
sa.ForeignKeyConstraint(
|
31
|
+
["user_group_id"],
|
32
|
+
["usergroup.id"],
|
33
|
+
name=op.f("fk_taskgroupv2_user_group_id_usergroup"),
|
34
|
+
),
|
35
|
+
sa.ForeignKeyConstraint(
|
36
|
+
["user_id"],
|
37
|
+
["user_oauth.id"],
|
38
|
+
name=op.f("fk_taskgroupv2_user_id_user_oauth"),
|
39
|
+
),
|
40
|
+
sa.PrimaryKeyConstraint("id", name=op.f("pk_taskgroupv2")),
|
41
|
+
)
|
42
|
+
with op.batch_alter_table("taskv2", schema=None) as batch_op:
|
43
|
+
batch_op.add_column(
|
44
|
+
sa.Column("taskgroupv2_id", sa.Integer(), nullable=True)
|
45
|
+
)
|
46
|
+
batch_op.create_foreign_key(
|
47
|
+
batch_op.f("fk_taskv2_taskgroupv2_id_taskgroupv2"),
|
48
|
+
"taskgroupv2",
|
49
|
+
["taskgroupv2_id"],
|
50
|
+
["id"],
|
51
|
+
)
|
52
|
+
|
53
|
+
# ### end Alembic commands ###
|
54
|
+
|
55
|
+
|
56
|
+
def downgrade() -> None:
|
57
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
58
|
+
with op.batch_alter_table("taskv2", schema=None) as batch_op:
|
59
|
+
batch_op.drop_constraint(
|
60
|
+
batch_op.f("fk_taskv2_taskgroupv2_id_taskgroupv2"),
|
61
|
+
type_="foreignkey",
|
62
|
+
)
|
63
|
+
batch_op.drop_column("taskgroupv2_id")
|
64
|
+
|
65
|
+
op.drop_table("taskgroupv2")
|
66
|
+
# ### end Alembic commands ###
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"""LinkUserGroup.timestamp_created
|
2
|
+
|
3
|
+
Revision ID: df7cc3501bf7
|
4
|
+
Revises: 7cf1baae8fb4
|
5
|
+
Create Date: 2024-10-03 13:55:53.272269
|
6
|
+
|
7
|
+
"""
|
8
|
+
from datetime import datetime
|
9
|
+
from datetime import timezone
|
10
|
+
|
11
|
+
import sqlalchemy as sa
|
12
|
+
from alembic import op
|
13
|
+
|
14
|
+
|
15
|
+
# revision identifiers, used by Alembic.
|
16
|
+
revision = "df7cc3501bf7"
|
17
|
+
down_revision = "7cf1baae8fb4"
|
18
|
+
branch_labels = None
|
19
|
+
depends_on = None
|
20
|
+
|
21
|
+
|
22
|
+
def upgrade() -> None:
|
23
|
+
with op.batch_alter_table("linkusergroup", schema=None) as batch_op:
|
24
|
+
batch_op.add_column(
|
25
|
+
sa.Column(
|
26
|
+
"timestamp_created",
|
27
|
+
sa.DateTime(timezone=True),
|
28
|
+
nullable=False,
|
29
|
+
server_default=str(datetime(2000, 1, 1, tzinfo=timezone.utc)),
|
30
|
+
)
|
31
|
+
)
|
32
|
+
|
33
|
+
with op.batch_alter_table("project", schema=None) as batch_op:
|
34
|
+
batch_op.alter_column("timestamp_created", server_default=None)
|
35
|
+
|
36
|
+
|
37
|
+
def downgrade() -> None:
|
38
|
+
# ### commands auto generated by Alembic - please adjust! ###
|
39
|
+
with op.batch_alter_table("linkusergroup", schema=None) as batch_op:
|
40
|
+
batch_op.drop_column("timestamp_created")
|
41
|
+
|
42
|
+
# ### end Alembic commands ###
|
@@ -17,11 +17,12 @@ from ..utils import get_collection_log
|
|
17
17
|
from ..utils import get_collection_path
|
18
18
|
from ..utils import get_log_path
|
19
19
|
from ._TaskCollectPip import _TaskCollectPip
|
20
|
+
from .database_operations import create_db_task_group_and_tasks
|
20
21
|
from fractal_server.app.db import get_sync_db
|
21
22
|
from fractal_server.app.models.v2 import CollectionStateV2
|
22
|
-
from fractal_server.app.models.v2 import TaskV2
|
23
23
|
from fractal_server.app.schemas.v2 import CollectionStatusV2
|
24
24
|
from fractal_server.app.schemas.v2 import TaskCreateV2
|
25
|
+
from fractal_server.app.schemas.v2 import TaskGroupCreateV2
|
25
26
|
from fractal_server.app.schemas.v2 import TaskReadV2
|
26
27
|
from fractal_server.app.schemas.v2.manifest import ManifestV2
|
27
28
|
from fractal_server.logger import get_logger
|
@@ -30,38 +31,6 @@ from fractal_server.logger import set_logger
|
|
30
31
|
from fractal_server.tasks.v2._venv_pip import _create_venv_install_package_pip
|
31
32
|
|
32
33
|
|
33
|
-
def _get_task_type(task: TaskCreateV2) -> str:
|
34
|
-
if task.command_non_parallel is None:
|
35
|
-
return "parallel"
|
36
|
-
elif task.command_parallel is None:
|
37
|
-
return "non_parallel"
|
38
|
-
else:
|
39
|
-
return "compound"
|
40
|
-
|
41
|
-
|
42
|
-
def _insert_tasks(
|
43
|
-
task_list: list[TaskCreateV2],
|
44
|
-
db: DBSyncSession,
|
45
|
-
owner: Optional[str] = None,
|
46
|
-
) -> list[TaskV2]:
|
47
|
-
"""
|
48
|
-
Insert tasks into database
|
49
|
-
"""
|
50
|
-
|
51
|
-
owner_dict = dict(owner=owner) if owner is not None else dict()
|
52
|
-
|
53
|
-
task_db_list = [
|
54
|
-
TaskV2(**t.dict(), **owner_dict, type=_get_task_type(t))
|
55
|
-
for t in task_list
|
56
|
-
]
|
57
|
-
db.add_all(task_db_list)
|
58
|
-
db.commit()
|
59
|
-
for t in task_db_list:
|
60
|
-
db.refresh(t)
|
61
|
-
db.close()
|
62
|
-
return task_db_list
|
63
|
-
|
64
|
-
|
65
34
|
def _set_collection_state_data_status(
|
66
35
|
*,
|
67
36
|
state_id: int,
|
@@ -232,9 +201,12 @@ def _check_task_files_exist(task_list: list[TaskCreateV2]) -> None:
|
|
232
201
|
|
233
202
|
|
234
203
|
async def background_collect_pip(
|
204
|
+
*,
|
235
205
|
state_id: int,
|
236
206
|
venv_path: Path,
|
237
207
|
task_pkg: _TaskCollectPip,
|
208
|
+
user_id: int,
|
209
|
+
user_group_id: Optional[int],
|
238
210
|
) -> None:
|
239
211
|
"""
|
240
212
|
Setup venv, install package, collect tasks.
|
@@ -301,7 +273,15 @@ async def background_collect_pip(
|
|
301
273
|
python_bin=python_bin,
|
302
274
|
)
|
303
275
|
_check_task_files_exist(task_list=task_list)
|
304
|
-
|
276
|
+
|
277
|
+
task_group = create_db_task_group_and_tasks(
|
278
|
+
task_list=task_list,
|
279
|
+
task_group_obj=TaskGroupCreateV2(),
|
280
|
+
user_id=user_id,
|
281
|
+
user_group_id=user_group_id,
|
282
|
+
db=db,
|
283
|
+
)
|
284
|
+
|
305
285
|
logger.debug("collecting - prepare tasks and update db " "- END")
|
306
286
|
logger.debug("collecting - END")
|
307
287
|
|
@@ -310,7 +290,8 @@ async def background_collect_pip(
|
|
310
290
|
collection_path = get_collection_path(venv_path)
|
311
291
|
collection_state = db.get(CollectionStateV2, state_id)
|
312
292
|
task_read_list = [
|
313
|
-
TaskReadV2(**task.model_dump()).dict()
|
293
|
+
TaskReadV2(**task.model_dump()).dict()
|
294
|
+
for task in task_group.task_list
|
314
295
|
]
|
315
296
|
collection_state.data["task_list"] = task_read_list
|
316
297
|
collection_state.data["log"] = get_collection_log(venv_path)
|
@@ -2,17 +2,19 @@ import json
|
|
2
2
|
import os
|
3
3
|
from pathlib import Path
|
4
4
|
from tempfile import TemporaryDirectory
|
5
|
+
from typing import Optional
|
5
6
|
|
6
7
|
from sqlalchemy.orm.attributes import flag_modified
|
7
8
|
|
8
9
|
from ...app.models.v2 import CollectionStateV2
|
9
10
|
from ._TaskCollectPip import _TaskCollectPip
|
10
11
|
from .background_operations import _handle_failure
|
11
|
-
from .background_operations import _insert_tasks
|
12
12
|
from .background_operations import _prepare_tasks_metadata
|
13
13
|
from .background_operations import _set_collection_state_data_status
|
14
|
+
from .database_operations import create_db_task_group_and_tasks
|
14
15
|
from fractal_server.app.db import get_sync_db
|
15
16
|
from fractal_server.app.schemas.v2 import CollectionStatusV2
|
17
|
+
from fractal_server.app.schemas.v2 import TaskGroupCreateV2
|
16
18
|
from fractal_server.app.schemas.v2.manifest import ManifestV2
|
17
19
|
from fractal_server.config import get_settings
|
18
20
|
from fractal_server.logger import get_logger
|
@@ -108,10 +110,13 @@ def _customize_and_run_template(
|
|
108
110
|
|
109
111
|
|
110
112
|
def background_collect_pip_ssh(
|
113
|
+
*,
|
111
114
|
state_id: int,
|
112
115
|
task_pkg: _TaskCollectPip,
|
113
116
|
fractal_ssh: FractalSSH,
|
114
117
|
tasks_base_dir: str,
|
118
|
+
user_id: int,
|
119
|
+
user_group_id: Optional[int],
|
115
120
|
) -> None:
|
116
121
|
"""
|
117
122
|
Collect a task package over SSH
|
@@ -310,7 +315,15 @@ def background_collect_pip_ssh(
|
|
310
315
|
package_root=Path(package_root_remote),
|
311
316
|
python_bin=Path(python_bin),
|
312
317
|
)
|
313
|
-
|
318
|
+
|
319
|
+
create_db_task_group_and_tasks(
|
320
|
+
task_list=task_list,
|
321
|
+
task_group_obj=TaskGroupCreateV2(),
|
322
|
+
user_id=user_id,
|
323
|
+
user_group_id=user_group_id,
|
324
|
+
db=db,
|
325
|
+
)
|
326
|
+
|
314
327
|
logger.debug("collecting - END")
|
315
328
|
|
316
329
|
# Finalize (write metadata to DB)
|
@@ -0,0 +1,54 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
3
|
+
from sqlalchemy.orm import Session as DBSyncSession
|
4
|
+
|
5
|
+
from fractal_server.app.models.v2 import TaskGroupV2
|
6
|
+
from fractal_server.app.models.v2 import TaskV2
|
7
|
+
from fractal_server.app.schemas.v2 import TaskCreateV2
|
8
|
+
from fractal_server.app.schemas.v2 import TaskGroupCreateV2
|
9
|
+
|
10
|
+
|
11
|
+
def _get_task_type(task: TaskCreateV2) -> str:
|
12
|
+
if task.command_non_parallel is None:
|
13
|
+
return "parallel"
|
14
|
+
elif task.command_parallel is None:
|
15
|
+
return "non_parallel"
|
16
|
+
else:
|
17
|
+
return "compound"
|
18
|
+
|
19
|
+
|
20
|
+
def create_db_task_group_and_tasks(
|
21
|
+
*,
|
22
|
+
task_list: list[TaskCreateV2],
|
23
|
+
task_group_obj: TaskGroupCreateV2,
|
24
|
+
user_id: int,
|
25
|
+
db: DBSyncSession,
|
26
|
+
user_group_id: Optional[int] = None,
|
27
|
+
) -> TaskGroupV2:
|
28
|
+
"""
|
29
|
+
Create a `TaskGroupV2` with N `TaskV2`s, and insert them into the database.
|
30
|
+
|
31
|
+
Arguments:
|
32
|
+
task_group:
|
33
|
+
task_list:
|
34
|
+
user_id:
|
35
|
+
user_group_id: Can be `None`
|
36
|
+
db: A synchronous database session
|
37
|
+
"""
|
38
|
+
actual_task_list = [
|
39
|
+
TaskV2(
|
40
|
+
**task.dict(),
|
41
|
+
type=_get_task_type(task),
|
42
|
+
)
|
43
|
+
for task in task_list
|
44
|
+
]
|
45
|
+
task_group = TaskGroupV2(
|
46
|
+
user_id=user_id,
|
47
|
+
user_group_id=user_group_id,
|
48
|
+
task_list=actual_task_list,
|
49
|
+
**task_group_obj.dict(),
|
50
|
+
)
|
51
|
+
db.add(task_group)
|
52
|
+
db.commit()
|
53
|
+
db.refresh(task_group)
|
54
|
+
return task_group
|
@@ -1,10 +1,10 @@
|
|
1
|
-
fractal_server/__init__.py,sha256=
|
1
|
+
fractal_server/__init__.py,sha256=a93MyH1kQ9BKFlxzrvnhMDhXFBw7mHkaQCSrrhceInk,24
|
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
|
5
5
|
fractal_server/app/db/__init__.py,sha256=81rK9w1__Z6PJ5cEcChPVc-wI9YOK4fN--_5Opry0MQ,4119
|
6
6
|
fractal_server/app/models/__init__.py,sha256=aG7mf1zZbsgzDSp7GHEcZhdjHfW3TGPOLCI8MrvYhPw,500
|
7
|
-
fractal_server/app/models/linkusergroup.py,sha256=
|
7
|
+
fractal_server/app/models/linkusergroup.py,sha256=LWTUfhH2uAnn_4moK7QdRUIHWtpw-hPZuW-5jClv_OE,610
|
8
8
|
fractal_server/app/models/linkuserproject.py,sha256=eQaourbGRshvlMVlKzLYJKHEjfsW1CbWws9yW4eHXhA,567
|
9
9
|
fractal_server/app/models/security.py,sha256=2npjgRKBZ7OAnhAXNbYxjtuOsSm1P4kak__qfk2SpeM,3770
|
10
10
|
fractal_server/app/models/user_settings.py,sha256=0YXCAwoAVGqI2irRLdXgr9-JS0STtHhSaoFENigAnrk,1312
|
@@ -15,12 +15,12 @@ fractal_server/app/models/v1/project.py,sha256=JG7b5J9CzVNxua4MaMYpfB57xt2qjbXr5
|
|
15
15
|
fractal_server/app/models/v1/state.py,sha256=m9gMZqqnm3oDpJNJp-Lht4kM7oO7pcEI7sL1g7LFvWU,1043
|
16
16
|
fractal_server/app/models/v1/task.py,sha256=uFXam7eu3Ye1Yt7_g7llCzY8BetmDRilsq5hR2C1Zbg,2640
|
17
17
|
fractal_server/app/models/v1/workflow.py,sha256=dnY5eMaOe3oZv8arn00RNX9qVkBtTLG-vYdWXcQuyo4,3950
|
18
|
-
fractal_server/app/models/v2/__init__.py,sha256=
|
18
|
+
fractal_server/app/models/v2/__init__.py,sha256=yvIE6kuqYEoF_kuCjl1AIjpMRi0VuTDWRJaaEzs9RQ8,522
|
19
19
|
fractal_server/app/models/v2/collection_state.py,sha256=nxb042i8tt8rCpmgbFJoBCYWU-34m0HdUfO9YurTp8k,588
|
20
20
|
fractal_server/app/models/v2/dataset.py,sha256=-7sxHEw4IIAvF_uSan7tA3o8hvoakBkQ0SRvqS2iOQU,1455
|
21
21
|
fractal_server/app/models/v2/job.py,sha256=ypJmN-qspkKBGhBG7Mt-HypSQqcQ2EmB4Bzzb2-y550,1535
|
22
22
|
fractal_server/app/models/v2/project.py,sha256=rAHoh5KfYwIaW7rTX0_O0jvWmxEvfo1BafvmcXuSSRk,786
|
23
|
-
fractal_server/app/models/v2/task.py,sha256=
|
23
|
+
fractal_server/app/models/v2/task.py,sha256=JuRo18JBiHxuujux0Uw-AWzj8L0ln2ZMJA7zQn4KQU8,2074
|
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,29 +37,30 @@ fractal_server/app/routes/api/v1/task.py,sha256=eW89nMCjpD4G6tHXDo2qGBKqWaPirjH6
|
|
37
37
|
fractal_server/app/routes/api/v1/task_collection.py,sha256=VYxhtd_idBppgJM7-FCHikI2OKMAIz05fhV_TsJpWI8,9060
|
38
38
|
fractal_server/app/routes/api/v1/workflow.py,sha256=2T93DuEnSshaDCue-JPmjuvGCtbk6lt9pFMuPt783t8,11217
|
39
39
|
fractal_server/app/routes/api/v1/workflowtask.py,sha256=OYYConwJbmNULDw5I3T-UbSJKrbbBiAHbbBeVcpoFKQ,5785
|
40
|
-
fractal_server/app/routes/api/v2/__init__.py,sha256=
|
41
|
-
fractal_server/app/routes/api/v2/_aux_functions.py,sha256=
|
40
|
+
fractal_server/app/routes/api/v2/__init__.py,sha256=_2Yce3aFT-t2FF_Yk_KbNgmG4FJKXlY3QTqib64yhIs,1807
|
41
|
+
fractal_server/app/routes/api/v2/_aux_functions.py,sha256=ayRA66dnsaVGGhCsFJ4sbaseQSXo5bGbnwjOs4oCdKI,11893
|
42
|
+
fractal_server/app/routes/api/v2/_aux_functions_tasks.py,sha256=1s_zuQUd4lPL2jqb7nPRP3ZcII6A4EmvX1Gi8xxxWHo,5713
|
42
43
|
fractal_server/app/routes/api/v2/dataset.py,sha256=Eilf_BAGjicIhqUiVwI86jlW45ineA5sVzxXW4b2GoQ,8329
|
43
44
|
fractal_server/app/routes/api/v2/images.py,sha256=JR1rR6qEs81nacjriOXAOBQjAbCXF4Ew7M7mkWdxBU0,7920
|
44
45
|
fractal_server/app/routes/api/v2/job.py,sha256=Bga2Kz1OjvDIdxZObWaaXVhNIhC_5JKhKRjEH2_ayEE,5157
|
45
46
|
fractal_server/app/routes/api/v2/project.py,sha256=eWYFJ7F2ZYQcpi-_n-rhPF-Q4gJhzYBsVGYFhHZZXAE,6653
|
46
47
|
fractal_server/app/routes/api/v2/status.py,sha256=6N9DSZ4iFqbZImorWfEAPoyoFUgEruo4Hweqo0x0xXU,6435
|
47
|
-
fractal_server/app/routes/api/v2/submit.py,sha256=
|
48
|
-
fractal_server/app/routes/api/v2/task.py,sha256=
|
49
|
-
fractal_server/app/routes/api/v2/task_collection.py,sha256=
|
50
|
-
fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=
|
51
|
-
fractal_server/app/routes/api/v2/
|
52
|
-
fractal_server/app/routes/api/v2/
|
48
|
+
fractal_server/app/routes/api/v2/submit.py,sha256=h7mjmea_VNCriGiA4HRuyxLHlvd9aGfTAFXK3bSsvzc,9422
|
49
|
+
fractal_server/app/routes/api/v2/task.py,sha256=CZQjI5IKxeN23YTu3eTjPuPcO6BSmcAXQR3Pcy0WSuQ,7828
|
50
|
+
fractal_server/app/routes/api/v2/task_collection.py,sha256=9trKrJDuaKKgdn-mG06VuFpyObhbcCD8AstaxN4lAOM,13507
|
51
|
+
fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=T3RoxQWmJVipEdXSjbD_Zdw_mc3IIYT3aDLZIQ_StIM,7272
|
52
|
+
fractal_server/app/routes/api/v2/task_group.py,sha256=yRUCMZtXH9KdfD2pfdCKPBGf_eVn-S5CXFHCUyXAoJk,4078
|
53
|
+
fractal_server/app/routes/api/v2/workflow.py,sha256=q4_sFCSw-_1oC4FENv_HIInDF_2uJG5QXqiH9Ns_ZK4,11330
|
54
|
+
fractal_server/app/routes/api/v2/workflowtask.py,sha256=TIOePM13uK3GKVhtGK2wBB341ZFheBYQKTfXuPfdymE,6999
|
53
55
|
fractal_server/app/routes/auth/__init__.py,sha256=fao6CS0WiAjHDTvBzgBVV_bSXFpEAeDBF6Z6q7rRkPc,1658
|
54
|
-
fractal_server/app/routes/auth/_aux_auth.py,sha256=
|
55
|
-
fractal_server/app/routes/auth/current_user.py,sha256=
|
56
|
+
fractal_server/app/routes/auth/_aux_auth.py,sha256=6GERRDXK4P-2OA81bjxJZEw6hN4QCk5x7MqDNtN7VG4,4746
|
57
|
+
fractal_server/app/routes/auth/current_user.py,sha256=v767HGi8k076ZHoErlU4Vv0_c8HQqYmi8ncjzZZDaDE,4455
|
56
58
|
fractal_server/app/routes/auth/group.py,sha256=eT-1c0Ow8KbYkKEMQ5ebhEAeRixwJs2kQW45UIutH5w,5833
|
57
|
-
fractal_server/app/routes/auth/group_names.py,sha256=zvYDfhxKlDmbSr-oLXYy6WUVkPPTvzH6ZJtuoNdGZbE,960
|
58
59
|
fractal_server/app/routes/auth/login.py,sha256=tSu6OBLOieoBtMZB4JkBAdEgH2Y8KqPGSbwy7NIypIo,566
|
59
60
|
fractal_server/app/routes/auth/oauth.py,sha256=AnFHbjqL2AgBX3eksI931xD6RTtmbciHBEuGf9YJLjU,1895
|
60
61
|
fractal_server/app/routes/auth/register.py,sha256=DlHq79iOvGd_gt2v9uwtsqIKeO6i_GKaW59VIkllPqY,587
|
61
|
-
fractal_server/app/routes/auth/router.py,sha256=
|
62
|
-
fractal_server/app/routes/auth/users.py,sha256=
|
62
|
+
fractal_server/app/routes/auth/router.py,sha256=tzJrygXFZlmV_uWelVqTOJMEH-3Fr7ydwlgx1LxRjxY,527
|
63
|
+
fractal_server/app/routes/auth/users.py,sha256=FzKNoB-wD32AkVOj1Vi29lGGyOl8NSMCRL9tEhxqpJk,8403
|
63
64
|
fractal_server/app/routes/aux/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
64
65
|
fractal_server/app/routes/aux/_job.py,sha256=q-RCiW17yXnZKAC_0La52RLvhqhxuvbgQJ2MlGXOj8A,702
|
65
66
|
fractal_server/app/routes/aux/_runner.py,sha256=FdCVla5DxGAZ__aB7Z8dEJzD_RIeh5tftjrPyqkr8N8,895
|
@@ -126,7 +127,7 @@ fractal_server/app/runner/v2/task_interface.py,sha256=myS-kT0DsJ8xIJZBVEzgD8g54V
|
|
126
127
|
fractal_server/app/runner/versions.py,sha256=dSaPRWqmFPHjg20kTCHmi_dmGNcCETflDtDLronNanU,852
|
127
128
|
fractal_server/app/schemas/__init__.py,sha256=stURAU_t3AOBaH0HSUbV-GKhlPKngnnIMoqWc3orFyI,135
|
128
129
|
fractal_server/app/schemas/_validators.py,sha256=XKEGEHxp3H6YSJewtFWXe_2Nh7SDdNtAXmlEmJO6Vb0,3606
|
129
|
-
fractal_server/app/schemas/user.py,sha256=
|
130
|
+
fractal_server/app/schemas/user.py,sha256=aUD8YAcfYTEO06TEUoTx4heVrXFiX7E2Mb8D2--4FsA,2130
|
130
131
|
fractal_server/app/schemas/user_group.py,sha256=YwJvYgj-PI66LWy38CEd_FIZPsBV1_2N5zJPGFcFvBw,2143
|
131
132
|
fractal_server/app/schemas/user_settings.py,sha256=UEST1MSmd9w2YypCji3SONSFlJcr2u4uG3bTczZy_Pk,3102
|
132
133
|
fractal_server/app/schemas/v1/__init__.py,sha256=CrBGgBhoemCvmZ70ZUchM-jfVAICnoa7AjZBAtL2UB0,1852
|
@@ -139,17 +140,18 @@ fractal_server/app/schemas/v1/state.py,sha256=GYeOE_1PtDOgu5W4t_3gw3DBHXH2aCGzIN
|
|
139
140
|
fractal_server/app/schemas/v1/task.py,sha256=7BxOZ_qoRQ8n3YbQpDvB7VMcxB5fSYQmR5RLIWhuJ5U,3704
|
140
141
|
fractal_server/app/schemas/v1/task_collection.py,sha256=uvq9bcMaGD_qHsh7YtcpoSAkVAbw12eY4DocIO3MKOg,3057
|
141
142
|
fractal_server/app/schemas/v1/workflow.py,sha256=tuOs5E5Q_ozA8if7YPZ07cQjzqB_QMkBS4u92qo4Ro0,4618
|
142
|
-
fractal_server/app/schemas/v2/__init__.py,sha256=
|
143
|
+
fractal_server/app/schemas/v2/__init__.py,sha256=BHbRPSBLjGaCpmjd8OJSycKhBLfZY5b1lj0z9sLR17o,2273
|
143
144
|
fractal_server/app/schemas/v2/dataset.py,sha256=dLT52tV4dSf2HrFNak4vdQEn8PT_04IUrGnd2z-AXIU,2599
|
144
145
|
fractal_server/app/schemas/v2/dumps.py,sha256=ZrJCHTv9oU2QMNjPUSBO3DIPRO3qDvbxpAGpernpf-Q,1720
|
145
146
|
fractal_server/app/schemas/v2/job.py,sha256=zfF9K3v4jWUJ7M482ta2CkqUJ4tVT4XfVt60p9IRhP0,3250
|
146
147
|
fractal_server/app/schemas/v2/manifest.py,sha256=N37IWohcfO3_y2l8rVM0h_1nZq7m4Izxk9iL1vtwBJw,6243
|
147
148
|
fractal_server/app/schemas/v2/project.py,sha256=u7S4B-bote1oGjzAGiZ-DuQIyeRAGqJsI71Tc1EtYE0,736
|
148
149
|
fractal_server/app/schemas/v2/status.py,sha256=SQaUpQkjFq5c5k5J4rOjNhuQaDOEg8lksPhkKmPU5VU,332
|
149
|
-
fractal_server/app/schemas/v2/task.py,sha256=
|
150
|
+
fractal_server/app/schemas/v2/task.py,sha256=TpMBinf3Mf2Kqlj1IgiHkf6Blob_bjXyIM-7xgK7XqY,4814
|
150
151
|
fractal_server/app/schemas/v2/task_collection.py,sha256=_utBv7_kcRJCbPdWezasU8GrikI_QFPKeIl4vyAgDd4,6155
|
151
|
-
fractal_server/app/schemas/v2/
|
152
|
-
fractal_server/app/schemas/v2/
|
152
|
+
fractal_server/app/schemas/v2/task_group.py,sha256=8A4MgLgSIRBdb5Q10Ae7RmsRdZkVtGRxD6cIdn8Gjho,419
|
153
|
+
fractal_server/app/schemas/v2/workflow.py,sha256=7jqZhGn6plFSU8EkQsvvnDMh5N8m7GouRt1DIXmweIA,1986
|
154
|
+
fractal_server/app/schemas/v2/workflowtask.py,sha256=t29n7TM2Z_bcFC8RKor694dcU_cGaasUSuX4Q9oQikY,5758
|
153
155
|
fractal_server/app/security/__init__.py,sha256=V1NOWlmaFZHMR6SrkMl62jyAuqYONyo8lyGvR6UZesM,12312
|
154
156
|
fractal_server/app/user_settings.py,sha256=aZgQ3i0JkHfgwLGW1ee6Gzr1ae3IioFfJKKSsSS8Svk,1312
|
155
157
|
fractal_server/config.py,sha256=gX0aYwDwbC5y7JNorifON84YMveubb7XTb4sH14N3KM,23667
|
@@ -173,6 +175,7 @@ fractal_server/migrations/versions/50a13d6138fd_initial_schema.py,sha256=zwXegXs
|
|
173
175
|
fractal_server/migrations/versions/5bf02391cfef_v2.py,sha256=axhNkr_H6R4rRbY7oGYazNbFvPXeSyBDWFVbKNmiqs8,8433
|
174
176
|
fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py,sha256=Q-DsMzG3IcUV2Ol1dhJWosDvKERamBE6QvA2zzS5zpQ,1632
|
175
177
|
fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py,sha256=mbWuCkTpRAdGbRhW7lhXs_e5S6O37UAcCN6JfoY5H8A,1353
|
178
|
+
fractal_server/migrations/versions/7cf1baae8fb4_task_group_v2.py,sha256=793xuEk8Pr28q1Hfe9_qNWWtU6ysXYdOFVRUPO_MB1o,1996
|
176
179
|
fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py,sha256=NSCuhANChsg76vBkShBl-9tQ4VEHubOjtAv1etHhlvY,2684
|
177
180
|
fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py,sha256=6pgODDtyAxevZvAJBj9IJ41inhV1RpwbpZr_qfPPu1A,1115
|
178
181
|
fractal_server/migrations/versions/94a47ea2d3ff_remove_cache_dir_slurm_user_and_slurm_.py,sha256=yL3-Hvzw5jBLKj4LFP1z5ofZE9L9W3tLwYtPNW7z4ko,1508
|
@@ -183,6 +186,7 @@ fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.p
|
|
183
186
|
fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py,sha256=ekDUML7ILpmdoqEclKbEUdyLi4uw9HSG_sTjG2hp_JE,867
|
184
187
|
fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py,sha256=6cHEZFuTXiQg9yu32Y3RH1XAl71av141WQ6UMbiITIg,949
|
185
188
|
fractal_server/migrations/versions/da2cb2ac4255_user_group_viewer_paths.py,sha256=yGWSA2HIHUybcVy66xBITk08opV2DFYSCIIrulaUZhI,901
|
189
|
+
fractal_server/migrations/versions/df7cc3501bf7_linkusergroup_timestamp_created.py,sha256=pkF9ocXKYCsIeVXf8kDRK4hmIgv7UHCytJu2U-X1n7w,1134
|
186
190
|
fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py,sha256=lOggSvzGWqQvnxxFuSM6W50Ui49R918A-uBuiZJ0pNM,963
|
187
191
|
fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py,sha256=jilQW3QIqYQ4Q6hCnUiG7UtNMpA41ujqrB3tPFiPM1Q,1221
|
188
192
|
fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py,sha256=9BwqUS9Gf7UW_KjrzHbtViC880qhD452KAytkHWWZyk,746
|
@@ -202,8 +206,9 @@ fractal_server/tasks/v1/utils.py,sha256=J9oKys-82OehBxOon5wWl3CxjVBgYWeVEEyWGVFn
|
|
202
206
|
fractal_server/tasks/v2/_TaskCollectPip.py,sha256=kWQNMNZ8OEddkYhmhsk3E6ArcaD7qe4vsjYYx9vbrUg,4900
|
203
207
|
fractal_server/tasks/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
204
208
|
fractal_server/tasks/v2/_venv_pip.py,sha256=6NCItfeWgO9BDnlfhoCfiUG5UCGGz_SJz4Mfn4Jg_nk,6489
|
205
|
-
fractal_server/tasks/v2/background_operations.py,sha256=
|
206
|
-
fractal_server/tasks/v2/background_operations_ssh.py,sha256=
|
209
|
+
fractal_server/tasks/v2/background_operations.py,sha256=Z-AlIIYGbwoZMQgpAM_4PDgh3w5xk-cwrJXwcOiJk_M,11171
|
210
|
+
fractal_server/tasks/v2/background_operations_ssh.py,sha256=Tw-vuGbxjvXF90QSbkvoRzxSGYLdjGUDO6n0tKHML1s,14494
|
211
|
+
fractal_server/tasks/v2/database_operations.py,sha256=_55kLUMWuOYQANuN0QDtDt-GWby4hDKPJp5NOB4ZoxA,1396
|
207
212
|
fractal_server/tasks/v2/endpoint_operations.py,sha256=gT38pl5TEH6WNWOtg4Itegt2lTJJI6YRa7fEj9Y4x2s,4226
|
208
213
|
fractal_server/tasks/v2/templates/_1_create_venv.sh,sha256=5uW0ETYxl5xiQEXP107zgq8V_-vf3k5NzMMj1hSLjas,1015
|
209
214
|
fractal_server/tasks/v2/templates/_2_upgrade_pip.sh,sha256=ca5Yng6JgJYu-a4QrsIsatwUmrLdRWBKw7_VJrY7WLY,555
|
@@ -214,8 +219,8 @@ fractal_server/tasks/v2/utils.py,sha256=JOyCacb6MNvrwfLNTyLwcz8y79J29YuJeJ2MK5kq
|
|
214
219
|
fractal_server/urls.py,sha256=5o_qq7PzKKbwq12NHSQZDmDitn5RAOeQ4xufu-2v9Zk,448
|
215
220
|
fractal_server/utils.py,sha256=b7WwFdcFZ8unyT65mloFToYuEDXpQoHRcmRNqrhd_dQ,2115
|
216
221
|
fractal_server/zip_tools.py,sha256=xYpzBshysD2nmxkD5WLYqMzPYUcCRM3kYy-7n9bJL-U,4426
|
217
|
-
fractal_server-2.
|
218
|
-
fractal_server-2.
|
219
|
-
fractal_server-2.
|
220
|
-
fractal_server-2.
|
221
|
-
fractal_server-2.
|
222
|
+
fractal_server-2.7.0a1.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
223
|
+
fractal_server-2.7.0a1.dist-info/METADATA,sha256=sl_pu6zE_5uRj_frkAhgWsAJxDvNNz6LYpmsLq4BPWE,4630
|
224
|
+
fractal_server-2.7.0a1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
225
|
+
fractal_server-2.7.0a1.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
226
|
+
fractal_server-2.7.0a1.dist-info/RECORD,,
|
@@ -1,34 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Definition `/auth/group-names/` endpoints
|
3
|
-
"""
|
4
|
-
from fastapi import APIRouter
|
5
|
-
from fastapi import Depends
|
6
|
-
from fastapi import status
|
7
|
-
from sqlalchemy.ext.asyncio import AsyncSession
|
8
|
-
from sqlmodel import select
|
9
|
-
|
10
|
-
from . import current_active_user
|
11
|
-
from ...db import get_async_db
|
12
|
-
from fractal_server.app.models import UserGroup
|
13
|
-
from fractal_server.app.models import UserOAuth
|
14
|
-
|
15
|
-
router_group_names = APIRouter()
|
16
|
-
|
17
|
-
|
18
|
-
@router_group_names.get(
|
19
|
-
"/group-names/", response_model=list[str], status_code=status.HTTP_200_OK
|
20
|
-
)
|
21
|
-
async def get_list_user_group_names(
|
22
|
-
user: UserOAuth = Depends(current_active_user),
|
23
|
-
db: AsyncSession = Depends(get_async_db),
|
24
|
-
) -> list[str]:
|
25
|
-
"""
|
26
|
-
Return the available group names.
|
27
|
-
|
28
|
-
This endpoint is not restricted to superusers.
|
29
|
-
"""
|
30
|
-
stm_all_groups = select(UserGroup)
|
31
|
-
res = await db.execute(stm_all_groups)
|
32
|
-
groups = res.scalars().all()
|
33
|
-
group_names = [group.name for group in groups]
|
34
|
-
return group_names
|
File without changes
|
File without changes
|
File without changes
|