fractal-server 2.4.2__py3-none-any.whl → 2.5.0a0__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.
Files changed (30) hide show
  1. fractal_server/__init__.py +1 -1
  2. fractal_server/app/db/__init__.py +4 -1
  3. fractal_server/app/models/v1/task.py +0 -5
  4. fractal_server/app/models/v2/workflowtask.py +2 -10
  5. fractal_server/app/routes/admin/v2.py +0 -30
  6. fractal_server/app/routes/api/v2/__init__.py +0 -4
  7. fractal_server/app/routes/api/v2/_aux_functions.py +11 -46
  8. fractal_server/app/routes/api/v2/workflow.py +23 -54
  9. fractal_server/app/routes/api/v2/workflowtask.py +9 -33
  10. fractal_server/app/runner/v2/__init__.py +1 -4
  11. fractal_server/app/runner/v2/_slurm_common/get_slurm_config.py +1 -4
  12. fractal_server/app/runner/v2/handle_failed_job.py +2 -9
  13. fractal_server/app/runner/v2/runner.py +42 -70
  14. fractal_server/app/runner/v2/runner_functions.py +0 -58
  15. fractal_server/app/runner/v2/runner_functions_low_level.py +7 -21
  16. fractal_server/app/schemas/v2/__init__.py +0 -1
  17. fractal_server/app/schemas/v2/dumps.py +2 -23
  18. fractal_server/app/schemas/v2/task.py +0 -5
  19. fractal_server/app/schemas/v2/workflowtask.py +4 -29
  20. fractal_server/migrations/env.py +4 -7
  21. fractal_server/migrations/naming_convention.py +7 -0
  22. fractal_server/migrations/versions/091b01f51f88_add_usergroup_and_linkusergroup_table.py +1 -1
  23. fractal_server/migrations/versions/501961cfcd85_remove_link_between_v1_and_v2_tasks_.py +97 -0
  24. {fractal_server-2.4.2.dist-info → fractal_server-2.5.0a0.dist-info}/METADATA +1 -1
  25. {fractal_server-2.4.2.dist-info → fractal_server-2.5.0a0.dist-info}/RECORD +28 -28
  26. fractal_server/app/routes/api/v2/task_legacy.py +0 -59
  27. fractal_server/app/runner/v2/v1_compat.py +0 -31
  28. {fractal_server-2.4.2.dist-info → fractal_server-2.5.0a0.dist-info}/LICENSE +0 -0
  29. {fractal_server-2.4.2.dist-info → fractal_server-2.5.0a0.dist-info}/WHEEL +0 -0
  30. {fractal_server-2.4.2.dist-info → fractal_server-2.5.0a0.dist-info}/entry_points.txt +0 -0
@@ -1,31 +0,0 @@
1
- from copy import deepcopy
2
- from pathlib import Path
3
- from typing import Any
4
-
5
-
6
- def convert_v2_args_into_v1(
7
- kwargs_v2: dict[str, Any],
8
- parallelization_level: str = "image",
9
- ) -> dict[str, Any]:
10
- kwargs_v1 = deepcopy(kwargs_v2)
11
-
12
- zarr_url = kwargs_v1.pop("zarr_url")
13
- input_path = Path(zarr_url).parents[3].as_posix()
14
- image_component = zarr_url.replace(input_path, "").lstrip("/")
15
- if parallelization_level == "image":
16
- component = image_component
17
- elif parallelization_level == "well":
18
- component = str(Path(image_component).parent)
19
- elif parallelization_level == "plate":
20
- component = str(Path(image_component).parents[2])
21
- else:
22
- raise ValueError(f"Invalid {parallelization_level=}.")
23
-
24
- kwargs_v1.update(
25
- input_paths=[input_path],
26
- output_path=input_path,
27
- metadata={},
28
- component=component,
29
- )
30
-
31
- return kwargs_v1