fractal-server 2.7.0a3__py3-none-any.whl → 2.7.0a4__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 +3 -9
- fractal_server/app/models/v2/collection_state.py +1 -0
- fractal_server/app/models/v2/task.py +27 -3
- fractal_server/app/routes/admin/v2/task.py +5 -13
- fractal_server/app/routes/admin/v2/task_group.py +21 -0
- fractal_server/app/routes/api/v1/task_collection.py +2 -2
- fractal_server/app/routes/api/v2/_aux_functions_tasks.py +75 -2
- fractal_server/app/routes/api/v2/task.py +16 -42
- fractal_server/app/routes/api/v2/task_collection.py +148 -187
- fractal_server/app/routes/api/v2/task_collection_custom.py +31 -58
- fractal_server/app/routes/api/v2/task_group.py +25 -1
- fractal_server/app/routes/api/v2/workflow.py +11 -46
- fractal_server/app/routes/auth/_aux_auth.py +15 -12
- fractal_server/app/routes/auth/group.py +46 -23
- fractal_server/app/runner/v2/task_interface.py +4 -9
- fractal_server/app/schemas/v2/dataset.py +2 -7
- fractal_server/app/schemas/v2/dumps.py +1 -1
- fractal_server/app/schemas/v2/job.py +1 -1
- fractal_server/app/schemas/v2/project.py +1 -1
- fractal_server/app/schemas/v2/task.py +5 -5
- fractal_server/app/schemas/v2/task_collection.py +8 -6
- fractal_server/app/schemas/v2/task_group.py +31 -3
- fractal_server/app/schemas/v2/workflow.py +2 -2
- fractal_server/app/schemas/v2/workflowtask.py +2 -2
- fractal_server/data_migrations/2_7_0.py +1 -11
- fractal_server/images/models.py +2 -4
- fractal_server/main.py +1 -1
- fractal_server/migrations/versions/034a469ec2eb_task_groups.py +184 -0
- fractal_server/string_tools.py +6 -2
- fractal_server/tasks/v1/_TaskCollectPip.py +1 -1
- fractal_server/tasks/v1/background_operations.py +2 -2
- fractal_server/tasks/v2/_venv_pip.py +62 -70
- fractal_server/tasks/v2/background_operations.py +168 -49
- fractal_server/tasks/v2/background_operations_ssh.py +35 -77
- fractal_server/tasks/v2/database_operations.py +7 -17
- fractal_server/tasks/v2/endpoint_operations.py +0 -134
- fractal_server/tasks/v2/templates/_1_create_venv.sh +9 -5
- fractal_server/tasks/v2/utils.py +5 -0
- fractal_server/utils.py +3 -2
- {fractal_server-2.7.0a3.dist-info → fractal_server-2.7.0a4.dist-info}/METADATA +1 -1
- {fractal_server-2.7.0a3.dist-info → fractal_server-2.7.0a4.dist-info}/RECORD +45 -48
- fractal_server/migrations/versions/742b74e1cc6e_revamp_taskv2_and_taskgroupv2.py +0 -101
- fractal_server/migrations/versions/7cf1baae8fb4_task_group_v2.py +0 -66
- fractal_server/migrations/versions/df7cc3501bf7_linkusergroup_timestamp_created.py +0 -42
- fractal_server/tasks/v2/_TaskCollectPip.py +0 -132
- {fractal_server-2.7.0a3.dist-info → fractal_server-2.7.0a4.dist-info}/LICENSE +0 -0
- {fractal_server-2.7.0a3.dist-info → fractal_server-2.7.0a4.dist-info}/WHEEL +0 -0
- {fractal_server-2.7.0a3.dist-info → fractal_server-2.7.0a4.dist-info}/entry_points.txt +0 -0
@@ -1,148 +1,14 @@
|
|
1
|
-
import json
|
2
|
-
from pathlib import Path
|
3
|
-
from typing import Literal
|
4
|
-
from typing import Optional
|
5
|
-
from typing import Union
|
6
|
-
from zipfile import ZipFile
|
7
|
-
|
8
1
|
from fastapi import HTTPException
|
9
2
|
from fastapi import status
|
10
3
|
from httpx import AsyncClient
|
11
4
|
from httpx import TimeoutException
|
12
5
|
|
13
|
-
from ._TaskCollectPip import _TaskCollectPip
|
14
|
-
from .utils import _parse_wheel_filename
|
15
|
-
from .utils import get_python_interpreter_v2
|
16
|
-
from fractal_server.app.schemas.v2 import ManifestV2
|
17
|
-
from fractal_server.config import get_settings
|
18
|
-
from fractal_server.logger import get_logger
|
19
6
|
from fractal_server.logger import set_logger
|
20
|
-
from fractal_server.syringe import Inject
|
21
|
-
from fractal_server.utils import execute_command
|
22
7
|
|
23
8
|
|
24
|
-
FRACTAL_PUBLIC_TASK_SUBDIR = ".fractal"
|
25
9
|
logger = set_logger(__name__)
|
26
10
|
|
27
11
|
|
28
|
-
async def download_package(
|
29
|
-
*,
|
30
|
-
task_pkg: _TaskCollectPip,
|
31
|
-
dest: Union[str, Path],
|
32
|
-
) -> Path:
|
33
|
-
"""
|
34
|
-
Download package to destination and return wheel-file path.
|
35
|
-
"""
|
36
|
-
interpreter = get_python_interpreter_v2(
|
37
|
-
python_version=task_pkg.python_version
|
38
|
-
)
|
39
|
-
pip = f"{interpreter} -m pip"
|
40
|
-
if task_pkg.package_version is None:
|
41
|
-
package_and_version = f"{task_pkg.package_name}"
|
42
|
-
else:
|
43
|
-
package_and_version = (
|
44
|
-
f"{task_pkg.package_name}=={task_pkg.package_version}"
|
45
|
-
)
|
46
|
-
cmd = f"{pip} download --no-deps {package_and_version} -d {dest}"
|
47
|
-
stdout = await execute_command(command=cmd, cwd=Path("."))
|
48
|
-
pkg_file = next(
|
49
|
-
line.split()[-1] for line in stdout.split("\n") if "Saved" in line
|
50
|
-
)
|
51
|
-
return Path(pkg_file)
|
52
|
-
|
53
|
-
|
54
|
-
def _load_manifest_from_wheel(
|
55
|
-
path: Path, wheel: ZipFile, logger_name: Optional[str] = None
|
56
|
-
) -> ManifestV2:
|
57
|
-
logger = get_logger(logger_name)
|
58
|
-
namelist = wheel.namelist()
|
59
|
-
try:
|
60
|
-
manifest = next(
|
61
|
-
name for name in namelist if "__FRACTAL_MANIFEST__.json" in name
|
62
|
-
)
|
63
|
-
except StopIteration:
|
64
|
-
msg = f"{path.as_posix()} does not include __FRACTAL_MANIFEST__.json"
|
65
|
-
logger.error(msg)
|
66
|
-
raise ValueError(msg)
|
67
|
-
with wheel.open(manifest) as manifest_fd:
|
68
|
-
manifest_dict = json.load(manifest_fd)
|
69
|
-
manifest_version = str(manifest_dict["manifest_version"])
|
70
|
-
if manifest_version == "2":
|
71
|
-
pkg_manifest = ManifestV2(**manifest_dict)
|
72
|
-
return pkg_manifest
|
73
|
-
else:
|
74
|
-
msg = f"Manifest version {manifest_version=} not supported"
|
75
|
-
logger.error(msg)
|
76
|
-
raise ValueError(msg)
|
77
|
-
|
78
|
-
|
79
|
-
def inspect_package(
|
80
|
-
path: Path, logger_name: Optional[str] = None
|
81
|
-
) -> dict[Literal["pkg_version", "pkg_manifest"], str]:
|
82
|
-
"""
|
83
|
-
Inspect task package to extract version and manifest
|
84
|
-
|
85
|
-
Note that this only works with wheel files, which have a well-defined
|
86
|
-
dist-info section. If we need to generalize to to tar.gz archives, we would
|
87
|
-
need to go and look for `PKG-INFO`.
|
88
|
-
|
89
|
-
Args:
|
90
|
-
path: Path of the package wheel file.
|
91
|
-
logger_name:
|
92
|
-
|
93
|
-
Returns:
|
94
|
-
A dictionary with keys `pkg_version` and `pkg_manifest`.
|
95
|
-
"""
|
96
|
-
|
97
|
-
logger = get_logger(logger_name)
|
98
|
-
|
99
|
-
if not path.as_posix().endswith(".whl"):
|
100
|
-
raise ValueError(
|
101
|
-
"Only wheel packages are supported in Fractal "
|
102
|
-
f"(given {path.name})."
|
103
|
-
)
|
104
|
-
|
105
|
-
# Extract package name and version from wheel filename
|
106
|
-
_info = _parse_wheel_filename(wheel_filename=path.name)
|
107
|
-
pkg_version = _info["version"]
|
108
|
-
|
109
|
-
# Read and validate task manifest
|
110
|
-
logger.debug(f"Now reading manifest for {path.as_posix()}")
|
111
|
-
with ZipFile(path) as wheel:
|
112
|
-
pkg_manifest = _load_manifest_from_wheel(
|
113
|
-
path, wheel, logger_name=logger_name
|
114
|
-
)
|
115
|
-
logger.debug("Manifest read correctly.")
|
116
|
-
|
117
|
-
info = dict(
|
118
|
-
pkg_version=pkg_version,
|
119
|
-
pkg_manifest=pkg_manifest,
|
120
|
-
)
|
121
|
-
return info
|
122
|
-
|
123
|
-
|
124
|
-
def create_package_dir_pip(
|
125
|
-
*,
|
126
|
-
task_pkg: _TaskCollectPip,
|
127
|
-
create: bool = True,
|
128
|
-
) -> Path:
|
129
|
-
"""
|
130
|
-
Create venv folder for a task package and return corresponding Path object
|
131
|
-
"""
|
132
|
-
settings = Inject(get_settings)
|
133
|
-
user = FRACTAL_PUBLIC_TASK_SUBDIR
|
134
|
-
if task_pkg.package_version is None:
|
135
|
-
raise ValueError(
|
136
|
-
f"Cannot create venv folder for package `{task_pkg.package}` "
|
137
|
-
"with `version=None`."
|
138
|
-
)
|
139
|
-
package_dir = f"{task_pkg.package_name}{task_pkg.package_version}"
|
140
|
-
venv_path = settings.FRACTAL_TASKS_DIR / user / package_dir
|
141
|
-
if create:
|
142
|
-
venv_path.mkdir(exist_ok=False, parents=True)
|
143
|
-
return venv_path
|
144
|
-
|
145
|
-
|
146
12
|
async def get_package_version_from_pypi(name: str) -> str:
|
147
13
|
"""
|
148
14
|
Make a GET call to PyPI JSON API and get latest package version.
|
@@ -7,16 +7,20 @@ write_log(){
|
|
7
7
|
|
8
8
|
|
9
9
|
# Variables to be filled within fractal-server
|
10
|
+
TASK_GROUP_DIR=__TASK_GROUP_DIR__
|
10
11
|
PACKAGE_ENV_DIR=__PACKAGE_ENV_DIR__
|
11
12
|
PYTHON=__PYTHON__
|
12
13
|
|
13
14
|
TIME_START=$(date +%s)
|
14
15
|
|
15
|
-
# Check that
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
# Check that task-group and venv folders do not exist
|
17
|
+
for DIR_TO_BE_CHECKED in "$TASK_GROUP_DIR" "$PACKAGE_ENV_DIR";
|
18
|
+
do
|
19
|
+
if [ -d "$DIR_TO_BE_CHECKED" ]; then
|
20
|
+
write_log "ERROR: Folder $DIR_TO_BE_CHECKED already exists. Exit."
|
21
|
+
exit 1
|
22
|
+
fi
|
23
|
+
done
|
20
24
|
|
21
25
|
write_log "START mkdir -p $PACKAGE_ENV_DIR"
|
22
26
|
mkdir -p $PACKAGE_ENV_DIR
|
fractal_server/tasks/v2/utils.py
CHANGED
@@ -45,6 +45,11 @@ def _parse_wheel_filename(wheel_filename: str) -> dict[str, str]:
|
|
45
45
|
Note that we transform exceptions in `ValueError`s, since this function is
|
46
46
|
also used within Pydantic validators.
|
47
47
|
"""
|
48
|
+
if "/" in wheel_filename:
|
49
|
+
raise ValueError(
|
50
|
+
"[_parse_wheel_filename] Input must be a filename, not a full "
|
51
|
+
f"path (given: {wheel_filename})."
|
52
|
+
)
|
48
53
|
try:
|
49
54
|
parts = wheel_filename.split("-")
|
50
55
|
return dict(distribution=parts[0], version=parts[1])
|
fractal_server/utils.py
CHANGED
@@ -32,8 +32,8 @@ def get_timestamp() -> datetime:
|
|
32
32
|
|
33
33
|
async def execute_command(
|
34
34
|
*,
|
35
|
-
cwd: Path,
|
36
35
|
command: str,
|
36
|
+
cwd: Optional[Path] = None,
|
37
37
|
logger_name: Optional[str] = None,
|
38
38
|
) -> str:
|
39
39
|
"""
|
@@ -60,12 +60,13 @@ async def execute_command(
|
|
60
60
|
cmd, *args = command_split
|
61
61
|
|
62
62
|
logger = get_logger(logger_name)
|
63
|
+
cwd_kwarg = dict() if cwd is None else dict(cwd=cwd)
|
63
64
|
proc = await asyncio.create_subprocess_exec(
|
64
65
|
cmd,
|
65
66
|
*args,
|
66
67
|
stdout=asyncio.subprocess.PIPE,
|
67
68
|
stderr=asyncio.subprocess.PIPE,
|
68
|
-
|
69
|
+
**cwd_kwarg,
|
69
70
|
)
|
70
71
|
stdout, stderr = await proc.communicate()
|
71
72
|
logger.debug(f"Subprocess call to: {command}")
|
@@ -1,5 +1,5 @@
|
|
1
|
-
fractal_server/__init__.py,sha256=
|
2
|
-
fractal_server/__main__.py,sha256=
|
1
|
+
fractal_server/__init__.py,sha256=9_YO3JbGhl33GlqFo7oPg2NBzR2h2okm4r0G4hr4TvI,24
|
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
|
5
5
|
fractal_server/app/db/__init__.py,sha256=81rK9w1__Z6PJ5cEcChPVc-wI9YOK4fN--_5Opry0MQ,4119
|
@@ -16,11 +16,11 @@ fractal_server/app/models/v1/state.py,sha256=m9gMZqqnm3oDpJNJp-Lht4kM7oO7pcEI7sL
|
|
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
18
|
fractal_server/app/models/v2/__init__.py,sha256=yvIE6kuqYEoF_kuCjl1AIjpMRi0VuTDWRJaaEzs9RQ8,522
|
19
|
-
fractal_server/app/models/v2/collection_state.py,sha256=
|
19
|
+
fractal_server/app/models/v2/collection_state.py,sha256=Yx18ZbywjraOdlHFyRVlb3VP101jBkOKkuOBIVD16fY,660
|
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=8cT_YBA5dyjBjunqCg23I-t3XZ62xJgiR-6brXISuLA,3337
|
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
|
@@ -29,8 +29,8 @@ fractal_server/app/routes/admin/v1.py,sha256=GIpZlwAwwwLGDWkBqywhtmp9TGsKLhGmZAd
|
|
29
29
|
fractal_server/app/routes/admin/v2/__init__.py,sha256=zkdrk3mSQWfgTJugS8Sc_Q_xCAwfmHUfdRe0DTaYT80,521
|
30
30
|
fractal_server/app/routes/admin/v2/job.py,sha256=JmNmF5MeHtcDQzGadCJWwFNDQvB5G8SwVABaL11S1Vc,8268
|
31
31
|
fractal_server/app/routes/admin/v2/project.py,sha256=luy-yiGX1JYTdPm1hpIdDUUqPm8xHuipLy9k2X6zu74,1223
|
32
|
-
fractal_server/app/routes/admin/v2/task.py,sha256=
|
33
|
-
fractal_server/app/routes/admin/v2/task_group.py,sha256=
|
32
|
+
fractal_server/app/routes/admin/v2/task.py,sha256=5gUz3NSedFZN1d5pGhGQAuXxyHEaRlymqqXNKbuWX3c,4096
|
33
|
+
fractal_server/app/routes/admin/v2/task_group.py,sha256=loxjJe9C2BBsG8gWkhHgrn6ReeE4mnipQ21PMP3MrKI,5398
|
34
34
|
fractal_server/app/routes/api/__init__.py,sha256=2IDheFi0OFdsUg7nbUiyahqybvpgXqeHUXIL2QtWrQQ,641
|
35
35
|
fractal_server/app/routes/api/v1/__init__.py,sha256=Y2HQdG197J0a7DyQEE2jn53IfxD0EHGhzK1I2JZuEck,958
|
36
36
|
fractal_server/app/routes/api/v1/_aux_functions.py,sha256=P9Q48thGH95w0h5cacYoibxqgiiLW4oqZ8rNJ2LIISY,13219
|
@@ -38,28 +38,28 @@ fractal_server/app/routes/api/v1/dataset.py,sha256=KVfKdp-bT8eB14kCjTSmpji4a2IPI
|
|
38
38
|
fractal_server/app/routes/api/v1/job.py,sha256=0jGxvu0xNQnWuov2qnoo9yE7Oat37XbcVn4Ute-UsiE,5370
|
39
39
|
fractal_server/app/routes/api/v1/project.py,sha256=V-oeLiLs3vhD6STKiI2_mOyeB7FDUAcEXevHZbCWQ10,15956
|
40
40
|
fractal_server/app/routes/api/v1/task.py,sha256=eW89nMCjpD4G6tHXDo2qGBKqWaPirjH6M3hpdJQhfa0,6528
|
41
|
-
fractal_server/app/routes/api/v1/task_collection.py,sha256=
|
41
|
+
fractal_server/app/routes/api/v1/task_collection.py,sha256=EPkuqnPtUpjpW6uQ1T9zAmtDhyNzhnyx0oJpr7mxYQ8,9066
|
42
42
|
fractal_server/app/routes/api/v1/workflow.py,sha256=2T93DuEnSshaDCue-JPmjuvGCtbk6lt9pFMuPt783t8,11217
|
43
43
|
fractal_server/app/routes/api/v1/workflowtask.py,sha256=OYYConwJbmNULDw5I3T-UbSJKrbbBiAHbbBeVcpoFKQ,5785
|
44
44
|
fractal_server/app/routes/api/v2/__init__.py,sha256=_2Yce3aFT-t2FF_Yk_KbNgmG4FJKXlY3QTqib64yhIs,1807
|
45
45
|
fractal_server/app/routes/api/v2/_aux_functions.py,sha256=ayRA66dnsaVGGhCsFJ4sbaseQSXo5bGbnwjOs4oCdKI,11893
|
46
|
-
fractal_server/app/routes/api/v2/_aux_functions_tasks.py,sha256=
|
46
|
+
fractal_server/app/routes/api/v2/_aux_functions_tasks.py,sha256=rgBi9KrbewTVwsd2aUAFZ4VZpAZml2q6-ekmIkK_vY0,7969
|
47
47
|
fractal_server/app/routes/api/v2/dataset.py,sha256=Eilf_BAGjicIhqUiVwI86jlW45ineA5sVzxXW4b2GoQ,8329
|
48
48
|
fractal_server/app/routes/api/v2/images.py,sha256=JR1rR6qEs81nacjriOXAOBQjAbCXF4Ew7M7mkWdxBU0,7920
|
49
49
|
fractal_server/app/routes/api/v2/job.py,sha256=Bga2Kz1OjvDIdxZObWaaXVhNIhC_5JKhKRjEH2_ayEE,5157
|
50
50
|
fractal_server/app/routes/api/v2/project.py,sha256=eWYFJ7F2ZYQcpi-_n-rhPF-Q4gJhzYBsVGYFhHZZXAE,6653
|
51
51
|
fractal_server/app/routes/api/v2/status.py,sha256=6N9DSZ4iFqbZImorWfEAPoyoFUgEruo4Hweqo0x0xXU,6435
|
52
52
|
fractal_server/app/routes/api/v2/submit.py,sha256=h7mjmea_VNCriGiA4HRuyxLHlvd9aGfTAFXK3bSsvzc,9422
|
53
|
-
fractal_server/app/routes/api/v2/task.py,sha256=
|
54
|
-
fractal_server/app/routes/api/v2/task_collection.py,sha256=
|
55
|
-
fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=
|
56
|
-
fractal_server/app/routes/api/v2/task_group.py,sha256=
|
57
|
-
fractal_server/app/routes/api/v2/workflow.py,sha256=
|
53
|
+
fractal_server/app/routes/api/v2/task.py,sha256=R_1bCinQvNrkEh6uAguNNfimduz1uJzgN_iTDwjnVF4,7209
|
54
|
+
fractal_server/app/routes/api/v2/task_collection.py,sha256=ncFSYv9VtBrWR8lEW6ZxpDUmk6h0NLuGxJFKlhjhXHM,11456
|
55
|
+
fractal_server/app/routes/api/v2/task_collection_custom.py,sha256=9T0U_4gqrQbJCy6uFDCMSZ-b1sfNIzyz_qm4P41W2Gs,6133
|
56
|
+
fractal_server/app/routes/api/v2/task_group.py,sha256=1uvhO7-Zgr6so5Ovn2PDiFKbqvbeGv6RrguZym8yZr0,5131
|
57
|
+
fractal_server/app/routes/api/v2/workflow.py,sha256=jxBgxjKjrtO8T9Y-IOZb1az9NeuhUY4Ma5wd-1uvvoE,10575
|
58
58
|
fractal_server/app/routes/api/v2/workflowtask.py,sha256=TIOePM13uK3GKVhtGK2wBB341ZFheBYQKTfXuPfdymE,6999
|
59
59
|
fractal_server/app/routes/auth/__init__.py,sha256=fao6CS0WiAjHDTvBzgBVV_bSXFpEAeDBF6Z6q7rRkPc,1658
|
60
|
-
fractal_server/app/routes/auth/_aux_auth.py,sha256=
|
60
|
+
fractal_server/app/routes/auth/_aux_auth.py,sha256=ifkNocTYatBSMYGwiR14qohmvR9SfMldceiEj6uJBrU,4783
|
61
61
|
fractal_server/app/routes/auth/current_user.py,sha256=v767HGi8k076ZHoErlU4Vv0_c8HQqYmi8ncjzZZDaDE,4455
|
62
|
-
fractal_server/app/routes/auth/group.py,sha256=
|
62
|
+
fractal_server/app/routes/auth/group.py,sha256=riav97YGJHqAwcbjbZcSYPfx8kEnyUnYe37155dMAmU,6548
|
63
63
|
fractal_server/app/routes/auth/login.py,sha256=tSu6OBLOieoBtMZB4JkBAdEgH2Y8KqPGSbwy7NIypIo,566
|
64
64
|
fractal_server/app/routes/auth/oauth.py,sha256=AnFHbjqL2AgBX3eksI931xD6RTtmbciHBEuGf9YJLjU,1895
|
65
65
|
fractal_server/app/routes/auth/register.py,sha256=DlHq79iOvGd_gt2v9uwtsqIKeO6i_GKaW59VIkllPqY,587
|
@@ -127,7 +127,7 @@ fractal_server/app/runner/v2/merge_outputs.py,sha256=IHuHqbKmk97K35BFvTrKVBs60z3
|
|
127
127
|
fractal_server/app/runner/v2/runner.py,sha256=nw9oYt3cFItHWVoevJyMI63K0kWHCTAriAQ_KINo_F8,13039
|
128
128
|
fractal_server/app/runner/v2/runner_functions.py,sha256=BLREIcQaE6FSc2AEJyZuiYk6rGazEz_9gprUqUZDljs,9488
|
129
129
|
fractal_server/app/runner/v2/runner_functions_low_level.py,sha256=1fWvQ6YZUUnDhO_mipXC5hnaT-zK-GHxg8ayoxZX82k,3648
|
130
|
-
fractal_server/app/runner/v2/task_interface.py,sha256=
|
130
|
+
fractal_server/app/runner/v2/task_interface.py,sha256=hT3p-bRGsLNAR_dNv_PYFoqzIF_EQtSsGwl38j1haYA,1824
|
131
131
|
fractal_server/app/runner/versions.py,sha256=dSaPRWqmFPHjg20kTCHmi_dmGNcCETflDtDLronNanU,852
|
132
132
|
fractal_server/app/schemas/__init__.py,sha256=stURAU_t3AOBaH0HSUbV-GKhlPKngnnIMoqWc3orFyI,135
|
133
133
|
fractal_server/app/schemas/_validators.py,sha256=XKEGEHxp3H6YSJewtFWXe_2Nh7SDdNtAXmlEmJO6Vb0,3606
|
@@ -145,33 +145,34 @@ fractal_server/app/schemas/v1/task.py,sha256=7BxOZ_qoRQ8n3YbQpDvB7VMcxB5fSYQmR5R
|
|
145
145
|
fractal_server/app/schemas/v1/task_collection.py,sha256=uvq9bcMaGD_qHsh7YtcpoSAkVAbw12eY4DocIO3MKOg,3057
|
146
146
|
fractal_server/app/schemas/v1/workflow.py,sha256=tuOs5E5Q_ozA8if7YPZ07cQjzqB_QMkBS4u92qo4Ro0,4618
|
147
147
|
fractal_server/app/schemas/v2/__init__.py,sha256=BHbRPSBLjGaCpmjd8OJSycKhBLfZY5b1lj0z9sLR17o,2273
|
148
|
-
fractal_server/app/schemas/v2/dataset.py,sha256=
|
149
|
-
fractal_server/app/schemas/v2/dumps.py,sha256=
|
150
|
-
fractal_server/app/schemas/v2/job.py,sha256=
|
148
|
+
fractal_server/app/schemas/v2/dataset.py,sha256=865ia13E9mWu1DaYyppKW2csNYglaInrScrprdVYX7A,2552
|
149
|
+
fractal_server/app/schemas/v2/dumps.py,sha256=xh5P_tJEhJ2VfGsMbBNOwosDT7Ee8lnxPSTAlF1ZR98,1737
|
150
|
+
fractal_server/app/schemas/v2/job.py,sha256=oYSLYkQ0HL83QyjEGIaggtZ117FndzFlONMKWd9sTXM,3270
|
151
151
|
fractal_server/app/schemas/v2/manifest.py,sha256=eHfDjth8cSDiuYeDMfBOte8sMHOI74DC0VlhebhUXvY,6545
|
152
|
-
fractal_server/app/schemas/v2/project.py,sha256=
|
152
|
+
fractal_server/app/schemas/v2/project.py,sha256=UXEA0UUUe0bFFOVLLmVtvDFLBO5vmD1JVI7EeTIcwDo,756
|
153
153
|
fractal_server/app/schemas/v2/status.py,sha256=SQaUpQkjFq5c5k5J4rOjNhuQaDOEg8lksPhkKmPU5VU,332
|
154
|
-
fractal_server/app/schemas/v2/task.py,sha256=
|
155
|
-
fractal_server/app/schemas/v2/task_collection.py,sha256=
|
156
|
-
fractal_server/app/schemas/v2/task_group.py,sha256=
|
157
|
-
fractal_server/app/schemas/v2/workflow.py,sha256=
|
158
|
-
fractal_server/app/schemas/v2/workflowtask.py,sha256=
|
154
|
+
fractal_server/app/schemas/v2/task.py,sha256=bm0qG_Zt6ClJHh6uSSb-vWxiKmh0x1gAQgMmtQayCk8,6648
|
155
|
+
fractal_server/app/schemas/v2/task_collection.py,sha256=Ddw_7QaQ93kdEIwWQvzLQDu03gho_OHdhah3n0ioK3M,6296
|
156
|
+
fractal_server/app/schemas/v2/task_group.py,sha256=F40u64z-wXHNPFjx9RHozzl_SySTHfKFc-sBFyn_e0I,2352
|
157
|
+
fractal_server/app/schemas/v2/workflow.py,sha256=HSNQSrBRdoBzh8Igr76FUWCAWvVzykrqmUv1vGv-8og,2026
|
158
|
+
fractal_server/app/schemas/v2/workflowtask.py,sha256=2T5LcourImZwlZa3PNsF_JM-I0fEAzWMhx1Y8KY0Ak8,5798
|
159
159
|
fractal_server/app/security/__init__.py,sha256=V1NOWlmaFZHMR6SrkMl62jyAuqYONyo8lyGvR6UZesM,12312
|
160
160
|
fractal_server/app/user_settings.py,sha256=aZgQ3i0JkHfgwLGW1ee6Gzr1ae3IioFfJKKSsSS8Svk,1312
|
161
161
|
fractal_server/config.py,sha256=gX0aYwDwbC5y7JNorifON84YMveubb7XTb4sH14N3KM,23667
|
162
|
-
fractal_server/data_migrations/2_7_0.py,sha256=
|
162
|
+
fractal_server/data_migrations/2_7_0.py,sha256=HWReCLmfz_abEzKEAbDflNjH5kQEgTpzjiKCWexNaTk,9133
|
163
163
|
fractal_server/data_migrations/README.md,sha256=_3AEFvDg9YkybDqCLlFPdDmGJvr6Tw7HRI14aZ3LOIw,398
|
164
164
|
fractal_server/data_migrations/tools.py,sha256=LeMeASwYGtEqd-3wOLle6WARdTGAimoyMmRbbJl-hAM,572
|
165
165
|
fractal_server/gunicorn_fractal.py,sha256=u6U01TLGlXgq1v8QmEpLih3QnsInZD7CqphgJ_GrGzc,1230
|
166
166
|
fractal_server/images/__init__.py,sha256=xO6jTLE4EZKO6cTDdJsBmK9cdeh9hFTaSbSuWgQg7y4,196
|
167
|
-
fractal_server/images/models.py,sha256=
|
167
|
+
fractal_server/images/models.py,sha256=UlWazUOFQtpS3pZuROjcJXviG_Ai453jqUDHdzuvD5w,4170
|
168
168
|
fractal_server/images/tools.py,sha256=gxeniYy4Z-cp_ToK2LHPJUTVVUUrdpogYdcBUvBuLiY,2209
|
169
169
|
fractal_server/logger.py,sha256=56wfka6fHaa3Rx5qO009nEs_y8gx5wZ2NUNZZ1I-uvc,5130
|
170
|
-
fractal_server/main.py,sha256=
|
170
|
+
fractal_server/main.py,sha256=gStLT9Du5QMpc9SyvRvtKU21EKwp-dG4HL3zGHzE06A,4908
|
171
171
|
fractal_server/migrations/README,sha256=4rQvyDfqodGhpJw74VYijRmgFP49ji5chyEemWGHsuw,59
|
172
172
|
fractal_server/migrations/env.py,sha256=9t_OeKVlhM8WRcukmTrLbWNup-imiBGP_9xNgwCbtpI,2730
|
173
173
|
fractal_server/migrations/naming_convention.py,sha256=htbKrVdetx3pklowb_9Cdo5RqeF0fJ740DNecY5de_M,265
|
174
174
|
fractal_server/migrations/script.py.mako,sha256=oMXw9LC3zRbinWWPPDgeZ4z9FJrV2zhRWiYdS5YgNbI,526
|
175
|
+
fractal_server/migrations/versions/034a469ec2eb_task_groups.py,sha256=vrPhC8hfFu1c4HmLHNZyCuqEfecFD8-bWc49bXMNes0,6199
|
175
176
|
fractal_server/migrations/versions/091b01f51f88_add_usergroup_and_linkusergroup_table.py,sha256=-BSS9AFTPcu3gYC-sYbawSy4MWQQx8TfMb5BW5EBKmQ,1450
|
176
177
|
fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py,sha256=-wHe-fOffmYeAm0JXVl_lxZ7hhDkaEVqxgxpHkb_uL8,954
|
177
178
|
fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py,sha256=Mob8McGYAcmgvrseyyYOa54E6Gsgr-4SiGdC-r9O4_A,1157
|
@@ -180,8 +181,6 @@ fractal_server/migrations/versions/50a13d6138fd_initial_schema.py,sha256=zwXegXs
|
|
180
181
|
fractal_server/migrations/versions/5bf02391cfef_v2.py,sha256=axhNkr_H6R4rRbY7oGYazNbFvPXeSyBDWFVbKNmiqs8,8433
|
181
182
|
fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py,sha256=Q-DsMzG3IcUV2Ol1dhJWosDvKERamBE6QvA2zzS5zpQ,1632
|
182
183
|
fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py,sha256=mbWuCkTpRAdGbRhW7lhXs_e5S6O37UAcCN6JfoY5H8A,1353
|
183
|
-
fractal_server/migrations/versions/742b74e1cc6e_revamp_taskv2_and_taskgroupv2.py,sha256=CHihUE7dfHfVwweH_ijdGw_l7XGM0UfXDqXwAG9FKBg,3002
|
184
|
-
fractal_server/migrations/versions/7cf1baae8fb4_task_group_v2.py,sha256=793xuEk8Pr28q1Hfe9_qNWWtU6ysXYdOFVRUPO_MB1o,1996
|
185
184
|
fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py,sha256=NSCuhANChsg76vBkShBl-9tQ4VEHubOjtAv1etHhlvY,2684
|
186
185
|
fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py,sha256=6pgODDtyAxevZvAJBj9IJ41inhV1RpwbpZr_qfPPu1A,1115
|
187
186
|
fractal_server/migrations/versions/94a47ea2d3ff_remove_cache_dir_slurm_user_and_slurm_.py,sha256=yL3-Hvzw5jBLKj4LFP1z5ofZE9L9W3tLwYtPNW7z4ko,1508
|
@@ -192,41 +191,39 @@ fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.p
|
|
192
191
|
fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py,sha256=ekDUML7ILpmdoqEclKbEUdyLi4uw9HSG_sTjG2hp_JE,867
|
193
192
|
fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py,sha256=6cHEZFuTXiQg9yu32Y3RH1XAl71av141WQ6UMbiITIg,949
|
194
193
|
fractal_server/migrations/versions/da2cb2ac4255_user_group_viewer_paths.py,sha256=yGWSA2HIHUybcVy66xBITk08opV2DFYSCIIrulaUZhI,901
|
195
|
-
fractal_server/migrations/versions/df7cc3501bf7_linkusergroup_timestamp_created.py,sha256=pkF9ocXKYCsIeVXf8kDRK4hmIgv7UHCytJu2U-X1n7w,1134
|
196
194
|
fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py,sha256=lOggSvzGWqQvnxxFuSM6W50Ui49R918A-uBuiZJ0pNM,963
|
197
195
|
fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py,sha256=jilQW3QIqYQ4Q6hCnUiG7UtNMpA41ujqrB3tPFiPM1Q,1221
|
198
196
|
fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py,sha256=9BwqUS9Gf7UW_KjrzHbtViC880qhD452KAytkHWWZyk,746
|
199
197
|
fractal_server/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
200
198
|
fractal_server/ssh/__init__.py,sha256=sVUmzxf7_DuXG1xoLQ1_00fo5NPhi2LJipSmU5EAkPs,124
|
201
199
|
fractal_server/ssh/_fabric.py,sha256=Fw6NZl8YnlShYTL-jmuPpbJ_Kn2pDRAIRY3bbDcnMA8,16214
|
202
|
-
fractal_server/string_tools.py,sha256=
|
200
|
+
fractal_server/string_tools.py,sha256=Z4qcleqXSG6RCG4hqS1emm0U-Bvv0sgTm_T87ZdYn7M,2395
|
203
201
|
fractal_server/syringe.py,sha256=3qSMW3YaMKKnLdgnooAINOPxnCOxP7y2jeAQYB21Gdo,2786
|
204
202
|
fractal_server/tasks/__init__.py,sha256=kadmVUoIghl8s190_Tt-8f-WBqMi8u8oU4Pvw39NHE8,23
|
205
203
|
fractal_server/tasks/utils.py,sha256=wucz57I7G0Vd8hvtmvonlryACx9zIVlqfxG5I87MJ80,1820
|
206
|
-
fractal_server/tasks/v1/_TaskCollectPip.py,sha256=
|
204
|
+
fractal_server/tasks/v1/_TaskCollectPip.py,sha256=ARq5AoHYXH0hziEsb-nFAqbsLA-VIddXOdXL38O6_zA,3746
|
207
205
|
fractal_server/tasks/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
208
|
-
fractal_server/tasks/v1/background_operations.py,sha256=
|
206
|
+
fractal_server/tasks/v1/background_operations.py,sha256=OlRMFY4i6J5EQ_ofDUjAPYDhTDF3QHT7hqXRc06EBio,11772
|
209
207
|
fractal_server/tasks/v1/endpoint_operations.py,sha256=YyMU1Y3Xt7D9WOKqaMLuwEoIaAqQP2Klz3I-ypAgOLI,5077
|
210
208
|
fractal_server/tasks/v1/get_collection_data.py,sha256=bi9tuApLgoKZNMIG1kR4GoKI9S6Y040gFfNQapw4ikM,502
|
211
209
|
fractal_server/tasks/v1/utils.py,sha256=J9oKys-82OehBxOon5wWl3CxjVBgYWeVEEyWGVFnreI,1759
|
212
|
-
fractal_server/tasks/v2/_TaskCollectPip.py,sha256=kWQNMNZ8OEddkYhmhsk3E6ArcaD7qe4vsjYYx9vbrUg,4900
|
213
210
|
fractal_server/tasks/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
214
|
-
fractal_server/tasks/v2/_venv_pip.py,sha256=
|
215
|
-
fractal_server/tasks/v2/background_operations.py,sha256=
|
216
|
-
fractal_server/tasks/v2/background_operations_ssh.py,sha256=
|
217
|
-
fractal_server/tasks/v2/database_operations.py,sha256=
|
218
|
-
fractal_server/tasks/v2/endpoint_operations.py,sha256=
|
219
|
-
fractal_server/tasks/v2/templates/_1_create_venv.sh,sha256=
|
211
|
+
fractal_server/tasks/v2/_venv_pip.py,sha256=FOD20yKfTsW7sim3h7CsB6pgp85JBhELyYvbkpaiDKA,6390
|
212
|
+
fractal_server/tasks/v2/background_operations.py,sha256=B_Djcd0LKQuYk_6bgg4keEXkCH5kEwMlpHap9tk5QzY,15399
|
213
|
+
fractal_server/tasks/v2/background_operations_ssh.py,sha256=RcMshcrj04r70hnyCB9aANk-8x8gr55AeP3v0gS7-Ts,13410
|
214
|
+
fractal_server/tasks/v2/database_operations.py,sha256=6r56yyFPnEBrXl6ncmO6D76znzISQCFZqCYcD-Ummd4,1213
|
215
|
+
fractal_server/tasks/v2/endpoint_operations.py,sha256=3bMLnwncAbOb_l9jW_94oNpmU7AMJDXM36bpQNk-tzU,1413
|
216
|
+
fractal_server/tasks/v2/templates/_1_create_venv.sh,sha256=7tt-B6n8KRN-pannZ0enE6XSxyq-hKRYRGY63CvtINI,1151
|
220
217
|
fractal_server/tasks/v2/templates/_2_upgrade_pip.sh,sha256=ca5Yng6JgJYu-a4QrsIsatwUmrLdRWBKw7_VJrY7WLY,555
|
221
218
|
fractal_server/tasks/v2/templates/_3_pip_install.sh,sha256=T9sabeB9iQzVZpLfuLkKGz9EpfHkUrJHKWO4HNij6yM,595
|
222
219
|
fractal_server/tasks/v2/templates/_4_pip_freeze.sh,sha256=qHdDKu1svXi1VQKGePciEJK4_uEKuwAvwaDCcGxSvNk,274
|
223
220
|
fractal_server/tasks/v2/templates/_5_pip_show.sh,sha256=GrJ19uHYQxANEy9JaeNJZVTquY9c8Ww9eCdnC7eLVr0,1754
|
224
|
-
fractal_server/tasks/v2/utils.py,sha256=
|
221
|
+
fractal_server/tasks/v2/utils.py,sha256=MnY6MhcxDRo4rPuXo2tQ252eWEPZF3OlCGe-p5MrG9U,1846
|
225
222
|
fractal_server/urls.py,sha256=5o_qq7PzKKbwq12NHSQZDmDitn5RAOeQ4xufu-2v9Zk,448
|
226
|
-
fractal_server/utils.py,sha256=
|
223
|
+
fractal_server/utils.py,sha256=jrlCBPmC7F0ptBVcDac-EbZNsdYTLbHfX9oxkXthS5Q,2193
|
227
224
|
fractal_server/zip_tools.py,sha256=xYpzBshysD2nmxkD5WLYqMzPYUcCRM3kYy-7n9bJL-U,4426
|
228
|
-
fractal_server-2.7.
|
229
|
-
fractal_server-2.7.
|
230
|
-
fractal_server-2.7.
|
231
|
-
fractal_server-2.7.
|
232
|
-
fractal_server-2.7.
|
225
|
+
fractal_server-2.7.0a4.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
|
226
|
+
fractal_server-2.7.0a4.dist-info/METADATA,sha256=Qr2jnRh7ETsVojqsgBF9_O3PKPdyABXi0KMstyhSTr8,4630
|
227
|
+
fractal_server-2.7.0a4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
228
|
+
fractal_server-2.7.0a4.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
|
229
|
+
fractal_server-2.7.0a4.dist-info/RECORD,,
|
@@ -1,101 +0,0 @@
|
|
1
|
-
"""Revamp TaskV2 and TaskGroupV2
|
2
|
-
|
3
|
-
Revision ID: 742b74e1cc6e
|
4
|
-
Revises: df7cc3501bf7
|
5
|
-
Create Date: 2024-10-07 16:56:37.399878
|
6
|
-
|
7
|
-
"""
|
8
|
-
import sqlalchemy as sa
|
9
|
-
import sqlmodel
|
10
|
-
from alembic import op
|
11
|
-
|
12
|
-
|
13
|
-
# revision identifiers, used by Alembic.
|
14
|
-
revision = "742b74e1cc6e"
|
15
|
-
down_revision = "df7cc3501bf7"
|
16
|
-
branch_labels = None
|
17
|
-
depends_on = None
|
18
|
-
|
19
|
-
|
20
|
-
def upgrade() -> None:
|
21
|
-
# ### commands auto generated by Alembic - please adjust! ###
|
22
|
-
with op.batch_alter_table("taskgroupv2", schema=None) as batch_op:
|
23
|
-
batch_op.add_column(
|
24
|
-
sa.Column(
|
25
|
-
"origin", sqlmodel.sql.sqltypes.AutoString(), nullable=False
|
26
|
-
)
|
27
|
-
)
|
28
|
-
batch_op.add_column(
|
29
|
-
sa.Column(
|
30
|
-
"pkg_name", sqlmodel.sql.sqltypes.AutoString(), nullable=False
|
31
|
-
)
|
32
|
-
)
|
33
|
-
batch_op.add_column(
|
34
|
-
sa.Column(
|
35
|
-
"version", sqlmodel.sql.sqltypes.AutoString(), nullable=True
|
36
|
-
)
|
37
|
-
)
|
38
|
-
batch_op.add_column(
|
39
|
-
sa.Column(
|
40
|
-
"python_version",
|
41
|
-
sqlmodel.sql.sqltypes.AutoString(),
|
42
|
-
nullable=True,
|
43
|
-
)
|
44
|
-
)
|
45
|
-
batch_op.add_column(
|
46
|
-
sa.Column(
|
47
|
-
"path", sqlmodel.sql.sqltypes.AutoString(), nullable=True
|
48
|
-
)
|
49
|
-
)
|
50
|
-
batch_op.add_column(
|
51
|
-
sa.Column(
|
52
|
-
"venv_path", sqlmodel.sql.sqltypes.AutoString(), nullable=True
|
53
|
-
)
|
54
|
-
)
|
55
|
-
batch_op.add_column(
|
56
|
-
sa.Column(
|
57
|
-
"pip_extras", sqlmodel.sql.sqltypes.AutoString(), nullable=True
|
58
|
-
)
|
59
|
-
)
|
60
|
-
|
61
|
-
with op.batch_alter_table("taskv2", schema=None) as batch_op:
|
62
|
-
batch_op.add_column(
|
63
|
-
sa.Column(
|
64
|
-
"category", sqlmodel.sql.sqltypes.AutoString(), nullable=True
|
65
|
-
)
|
66
|
-
)
|
67
|
-
batch_op.add_column(
|
68
|
-
sa.Column(
|
69
|
-
"modality", sqlmodel.sql.sqltypes.AutoString(), nullable=True
|
70
|
-
)
|
71
|
-
)
|
72
|
-
batch_op.add_column(
|
73
|
-
sa.Column(
|
74
|
-
"authors", sqlmodel.sql.sqltypes.AutoString(), nullable=True
|
75
|
-
)
|
76
|
-
)
|
77
|
-
batch_op.add_column(
|
78
|
-
sa.Column("tags", sa.JSON(), server_default="[]", nullable=False)
|
79
|
-
)
|
80
|
-
|
81
|
-
# ### end Alembic commands ###
|
82
|
-
|
83
|
-
|
84
|
-
def downgrade() -> None:
|
85
|
-
# ### commands auto generated by Alembic - please adjust! ###
|
86
|
-
with op.batch_alter_table("taskv2", schema=None) as batch_op:
|
87
|
-
batch_op.drop_column("tags")
|
88
|
-
batch_op.drop_column("authors")
|
89
|
-
batch_op.drop_column("modality")
|
90
|
-
batch_op.drop_column("category")
|
91
|
-
|
92
|
-
with op.batch_alter_table("taskgroupv2", schema=None) as batch_op:
|
93
|
-
batch_op.drop_column("pip_extras")
|
94
|
-
batch_op.drop_column("venv_path")
|
95
|
-
batch_op.drop_column("path")
|
96
|
-
batch_op.drop_column("python_version")
|
97
|
-
batch_op.drop_column("version")
|
98
|
-
batch_op.drop_column("pkg_name")
|
99
|
-
batch_op.drop_column("origin")
|
100
|
-
|
101
|
-
# ### end Alembic commands ###
|
@@ -1,66 +0,0 @@
|
|
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 ###
|
@@ -1,42 +0,0 @@
|
|
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 ###
|