fractal-server 2.0.0a4__tar.gz → 2.0.0a6__tar.gz

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 (165) hide show
  1. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/PKG-INFO +1 -1
  2. fractal_server-2.0.0a6/fractal_server/__init__.py +1 -0
  3. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v2/dataset.py +0 -1
  4. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v2/project.py +0 -1
  5. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v1/task_collection.py +10 -0
  6. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/__init__.py +5 -1
  7. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/submit.py +0 -9
  8. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/task_collection.py +11 -1
  9. fractal_server-2.0.0a6/fractal_server/app/routes/api/v2/task_legacy.py +59 -0
  10. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/_common.py +1 -1
  11. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/deduplicate_list.py +2 -1
  12. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/runner.py +19 -0
  13. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/task_interface.py +4 -2
  14. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v1/task.py +0 -1
  15. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/__init__.py +1 -0
  16. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/dataset.py +2 -5
  17. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/dumps.py +0 -2
  18. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/project.py +0 -3
  19. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/task.py +5 -0
  20. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/workflow.py +2 -2
  21. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/images/__init__.py +1 -0
  22. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/images/models.py +35 -1
  23. fractal_server-2.0.0a4/fractal_server/migrations/versions/d71e732236cd_v2.py → fractal_server-2.0.0a6/fractal_server/migrations/versions/80e12e1bc4fd_v2.py +4 -6
  24. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/pyproject.toml +2 -2
  25. fractal_server-2.0.0a4/fractal_server/__init__.py +0 -1
  26. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/LICENSE +0 -0
  27. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/README.md +0 -0
  28. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/__main__.py +0 -0
  29. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/alembic.ini +0 -0
  30. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/__init__.py +0 -0
  31. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/db/__init__.py +0 -0
  32. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/__init__.py +0 -0
  33. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/linkuserproject.py +0 -0
  34. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/security.py +0 -0
  35. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/state.py +0 -0
  36. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v1/__init__.py +0 -0
  37. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v1/dataset.py +0 -0
  38. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v1/job.py +0 -0
  39. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v1/project.py +0 -0
  40. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v1/task.py +0 -0
  41. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v1/workflow.py +0 -0
  42. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v2/__init__.py +0 -0
  43. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v2/job.py +0 -0
  44. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v2/task.py +0 -0
  45. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v2/workflow.py +0 -0
  46. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/models/v2/workflowtask.py +0 -0
  47. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/__init__.py +0 -0
  48. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/admin/__init__.py +0 -0
  49. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/admin/v1.py +0 -0
  50. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/admin/v2.py +0 -0
  51. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/__init__.py +0 -0
  52. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v1/__init__.py +0 -0
  53. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v1/_aux_functions.py +0 -0
  54. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v1/dataset.py +0 -0
  55. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v1/job.py +0 -0
  56. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v1/project.py +0 -0
  57. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v1/task.py +0 -0
  58. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v1/workflow.py +0 -0
  59. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v1/workflowtask.py +0 -0
  60. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/_aux_functions.py +0 -0
  61. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/dataset.py +0 -0
  62. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/images.py +0 -0
  63. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/job.py +0 -0
  64. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/project.py +0 -0
  65. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/task.py +0 -0
  66. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/workflow.py +0 -0
  67. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/api/v2/workflowtask.py +0 -0
  68. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/auth.py +0 -0
  69. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/aux/__init__.py +0 -0
  70. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/aux/_job.py +0 -0
  71. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/routes/aux/_runner.py +0 -0
  72. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/.gitignore +0 -0
  73. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/__init__.py +0 -0
  74. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/async_wrap.py +0 -0
  75. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/components.py +0 -0
  76. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/exceptions.py +0 -0
  77. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/executors/__init__.py +0 -0
  78. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/executors/slurm/__init__.py +0 -0
  79. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/executors/slurm/_batching.py +0 -0
  80. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/executors/slurm/_check_jobs_status.py +0 -0
  81. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/executors/slurm/_executor_wait_thread.py +0 -0
  82. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/executors/slurm/_slurm_config.py +0 -0
  83. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/executors/slurm/_subprocess_run_as_user.py +0 -0
  84. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/executors/slurm/executor.py +0 -0
  85. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/executors/slurm/remote.py +0 -0
  86. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/filenames.py +0 -0
  87. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/set_start_and_last_task_index.py +0 -0
  88. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/task_files.py +0 -0
  89. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/__init__.py +0 -0
  90. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/_local/__init__.py +0 -0
  91. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/_local/_local_config.py +0 -0
  92. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/_local/_submit_setup.py +0 -0
  93. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/_local/executor.py +0 -0
  94. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/_slurm/__init__.py +0 -0
  95. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/_slurm/_submit_setup.py +0 -0
  96. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/_slurm/get_slurm_config.py +0 -0
  97. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/common.py +0 -0
  98. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v1/handle_failed_job.py +0 -0
  99. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/__init__.py +0 -0
  100. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/_local/__init__.py +0 -0
  101. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/_local/_local_config.py +0 -0
  102. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/_local/_submit_setup.py +0 -0
  103. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/_local/executor.py +0 -0
  104. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/_slurm/__init__.py +0 -0
  105. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/_slurm/_submit_setup.py +0 -0
  106. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/_slurm/get_slurm_config.py +0 -0
  107. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/handle_failed_job.py +0 -0
  108. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/merge_outputs.py +0 -0
  109. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/runner_functions.py +0 -0
  110. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/runner_functions_low_level.py +0 -0
  111. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/runner/v2/v1_compat.py +0 -0
  112. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/__init__.py +0 -0
  113. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/_validators.py +0 -0
  114. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/state.py +0 -0
  115. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/user.py +0 -0
  116. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v1/__init__.py +0 -0
  117. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v1/applyworkflow.py +0 -0
  118. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v1/dataset.py +0 -0
  119. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v1/dumps.py +0 -0
  120. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v1/manifest.py +0 -0
  121. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v1/project.py +0 -0
  122. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v1/task_collection.py +0 -0
  123. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v1/workflow.py +0 -0
  124. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/job.py +0 -0
  125. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/manifest.py +0 -0
  126. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/task_collection.py +0 -0
  127. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/schemas/v2/workflowtask.py +0 -0
  128. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/app/security/__init__.py +0 -0
  129. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/config.py +0 -0
  130. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/data_migrations/README.md +0 -0
  131. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/images/tools.py +0 -0
  132. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/logger.py +0 -0
  133. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/main.py +0 -0
  134. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/README +0 -0
  135. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/env.py +0 -0
  136. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/script.py.mako +0 -0
  137. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py +0 -0
  138. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py +0 -0
  139. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/50a13d6138fd_initial_schema.py +0 -0
  140. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py +0 -0
  141. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py +0 -0
  142. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py +0 -0
  143. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py +0 -0
  144. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/97f444d47249_add_applyworkflow_project_dump.py +0 -0
  145. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/99ea79d9e5d2_add_dataset_history.py +0 -0
  146. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.py +0 -0
  147. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py +0 -0
  148. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py +0 -0
  149. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py +0 -0
  150. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py +0 -0
  151. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py +0 -0
  152. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/py.typed +0 -0
  153. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/syringe.py +0 -0
  154. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/__init__.py +0 -0
  155. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/endpoint_operations.py +0 -0
  156. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/utils.py +0 -0
  157. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/v1/_TaskCollectPip.py +0 -0
  158. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/v1/__init__.py +0 -0
  159. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/v1/background_operations.py +0 -0
  160. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/v1/get_collection_data.py +0 -0
  161. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/v2/_TaskCollectPip.py +0 -0
  162. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/v2/__init__.py +0 -0
  163. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/v2/background_operations.py +0 -0
  164. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/tasks/v2/get_collection_data.py +0 -0
  165. {fractal_server-2.0.0a4 → fractal_server-2.0.0a6}/fractal_server/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fractal-server
3
- Version: 2.0.0a4
3
+ Version: 2.0.0a6
4
4
  Summary: Server component of the Fractal analytics platform
5
5
  Home-page: https://github.com/fractal-analytics-platform/fractal-server
6
6
  License: BSD-3-Clause
@@ -0,0 +1 @@
1
+ __VERSION__ = "2.0.0a6"
@@ -28,7 +28,6 @@ class DatasetV2(SQLModel, table=True):
28
28
  history: list[dict[str, Any]] = Field(
29
29
  sa_column=Column(JSON, server_default="[]", nullable=False)
30
30
  )
31
- read_only: bool = False
32
31
 
33
32
  timestamp_created: datetime = Field(
34
33
  default_factory=get_timestamp,
@@ -16,7 +16,6 @@ class ProjectV2(SQLModel, table=True):
16
16
 
17
17
  id: Optional[int] = Field(default=None, primary_key=True)
18
18
  name: str
19
- read_only: bool = False
20
19
  timestamp_created: datetime = Field(
21
20
  default_factory=get_timestamp,
22
21
  sa_column=Column(DateTime(timezone=True), nullable=False),
@@ -140,6 +140,16 @@ async def collect_tasks_pip(
140
140
  f"Original error: {e}"
141
141
  ),
142
142
  )
143
+ except ValidationError as e:
144
+ await db.close()
145
+ raise HTTPException(
146
+ status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
147
+ detail=(
148
+ "Cannot collect package. Possible reason: an old version "
149
+ "of the same package has already been collected. "
150
+ f"Original error: {e}"
151
+ ),
152
+ )
143
153
  task_collect_status.info = "Already installed"
144
154
  state = State(data=task_collect_status.sanitised_dict())
145
155
  response.status_code == status.HTTP_200_OK
@@ -10,6 +10,7 @@ from .project import router as project_router_v2
10
10
  from .submit import router as submit_job_router_v2
11
11
  from .task import router as task_router_v2
12
12
  from .task_collection import router as task_collection_router_v2
13
+ from .task_legacy import router as task_legacy_router_v2
13
14
  from .workflow import router as workflow_router_v2
14
15
  from .workflowtask import router as workflowtask_router_v2
15
16
 
@@ -20,9 +21,12 @@ router_api_v2.include_router(job_router_v2, tags=["V2 Job"])
20
21
  router_api_v2.include_router(images_routes_v2, tags=["V2 Images"])
21
22
  router_api_v2.include_router(project_router_v2, tags=["V2 Project"])
22
23
  router_api_v2.include_router(submit_job_router_v2, tags=["V2 Job"])
23
- router_api_v2.include_router(task_router_v2, prefix="/task", tags=["V2 Task"])
24
24
  router_api_v2.include_router(
25
25
  task_collection_router_v2, prefix="/task", tags=["V2 Task Collection"]
26
26
  )
27
+ router_api_v2.include_router(task_router_v2, prefix="/task", tags=["V2 Task"])
28
+ router_api_v2.include_router(
29
+ task_legacy_router_v2, prefix="/task-legacy", tags=["V2 Task Legacy"]
30
+ )
27
31
  router_api_v2.include_router(workflow_router_v2, tags=["V2 Workflow"])
28
32
  router_api_v2.include_router(workflowtask_router_v2, tags=["V2 WorkflowTask"])
@@ -59,15 +59,6 @@ async def apply_workflow(
59
59
  project = output["project"]
60
60
  dataset = output["dataset"]
61
61
 
62
- if dataset.read_only:
63
- raise HTTPException(
64
- status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
65
- detail=(
66
- "Cannot apply workflow because dataset "
67
- f"({dataset_id=}) is read_only."
68
- ),
69
- )
70
-
71
62
  workflow = await _get_workflow_check_owner(
72
63
  project_id=project_id, workflow_id=workflow_id, user_id=user.id, db=db
73
64
  )
@@ -137,7 +137,17 @@ async def collect_tasks_pip(
137
137
  detail=(
138
138
  "Cannot collect package. Possible reason: another "
139
139
  "collection of the same package is in progress. "
140
- f"Original error: {e}"
140
+ f"Original FileNotFoundError: {e}"
141
+ ),
142
+ )
143
+ except ValidationError as e:
144
+ await db.close()
145
+ raise HTTPException(
146
+ status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
147
+ detail=(
148
+ "Cannot collect package. Possible reason: an old version "
149
+ "of the same package has already been collected. "
150
+ f"Original ValidationError: {e}"
141
151
  ),
142
152
  )
143
153
  task_collect_status.info = "Already installed"
@@ -0,0 +1,59 @@
1
+ from fastapi import APIRouter
2
+ from fastapi import Depends
3
+ from fastapi import HTTPException
4
+ from fastapi import status
5
+ from sqlmodel import select
6
+
7
+ from .....logger import set_logger
8
+ from ....db import AsyncSession
9
+ from ....db import get_async_db
10
+ from ....models.v1 import Task as TaskV1
11
+ from ....schemas.v2 import TaskLegacyReadV2
12
+ from ....security import current_active_user
13
+ from ....security import User
14
+
15
+ router = APIRouter()
16
+
17
+ logger = set_logger(__name__)
18
+
19
+
20
+ @router.get("/", response_model=list[TaskLegacyReadV2])
21
+ async def get_list_task_legacy(
22
+ args_schema: bool = True,
23
+ only_v2_compatible: bool = False,
24
+ user: User = Depends(current_active_user),
25
+ db: AsyncSession = Depends(get_async_db),
26
+ ) -> list[TaskLegacyReadV2]:
27
+ """
28
+ Get list of available legacy tasks
29
+ """
30
+ stm = select(TaskV1)
31
+ if only_v2_compatible:
32
+ stm = stm.where(TaskV1.is_v2_compatible)
33
+ res = await db.execute(stm)
34
+ task_list = res.scalars().all()
35
+ await db.close()
36
+ if args_schema is False:
37
+ for task in task_list:
38
+ setattr(task, "args_schema", None)
39
+
40
+ return task_list
41
+
42
+
43
+ @router.get("/{task_id}/", response_model=TaskLegacyReadV2)
44
+ async def get_task_legacy(
45
+ task_id: int,
46
+ user: User = Depends(current_active_user),
47
+ db: AsyncSession = Depends(get_async_db),
48
+ ) -> TaskLegacyReadV2:
49
+ """
50
+ Get info on a specific legacy task
51
+ """
52
+ task = await db.get(TaskV1, task_id)
53
+ await db.close()
54
+ if not task:
55
+ raise HTTPException(
56
+ status_code=status.HTTP_404_NOT_FOUND,
57
+ detail=f"TaskV1[{task_id}] not found",
58
+ )
59
+ return task
@@ -207,7 +207,7 @@ def call_single_task(
207
207
  with task_files.metadiff.open("r") as f_metadiff:
208
208
  diff_metadata = json.load(f_metadiff)
209
209
  except FileNotFoundError as e:
210
- logger.error(
210
+ logger.warning(
211
211
  f"Skip collection of updated metadata. Original error: {str(e)}"
212
212
  )
213
213
  diff_metadata = {}
@@ -1,9 +1,10 @@
1
1
  from typing import TypeVar
2
2
 
3
3
  from ....images import SingleImage
4
+ from ....images import SingleImageTaskOutput
4
5
  from .task_interface import InitArgsModel
5
6
 
6
- T = TypeVar("T", SingleImage, InitArgsModel)
7
+ T = TypeVar("T", SingleImage, SingleImageTaskOutput, InitArgsModel)
7
8
 
8
9
 
9
10
  def deduplicate_list(
@@ -157,6 +157,20 @@ def execute_tasks_v2(
157
157
  updated_types.update(image["types"])
158
158
  updated_types.update(task.output_types)
159
159
 
160
+ # Unset attributes with None value
161
+ updated_attributes = {
162
+ key: value
163
+ for key, value in updated_attributes.items()
164
+ if value is not None
165
+ }
166
+
167
+ # Validate new image
168
+ SingleImage(
169
+ zarr_url=image["zarr_url"],
170
+ types=updated_types,
171
+ attributes=updated_attributes,
172
+ )
173
+
160
174
  # Update image in the dataset image list
161
175
  tmp_images[original_index]["attributes"] = updated_attributes
162
176
  tmp_images[original_index]["types"] = updated_types
@@ -182,6 +196,11 @@ def execute_tasks_v2(
182
196
  updated_types = copy(original_img["types"])
183
197
  # Update image attributes/types with task output and manifest
184
198
  updated_attributes.update(image["attributes"])
199
+ updated_attributes = {
200
+ key: value
201
+ for key, value in updated_attributes.items()
202
+ if value is not None
203
+ }
185
204
  updated_types.update(image["types"])
186
205
  updated_types.update(task.output_types)
187
206
  new_image = dict(
@@ -3,7 +3,7 @@ from typing import Any
3
3
  from pydantic import BaseModel
4
4
  from pydantic import Field
5
5
 
6
- from ....images import SingleImage
6
+ from ....images import SingleImageTaskOutput
7
7
  from fractal_server.images import Filters
8
8
 
9
9
 
@@ -11,7 +11,9 @@ class TaskOutput(BaseModel):
11
11
  class Config:
12
12
  extra = "forbid"
13
13
 
14
- image_list_updates: list[SingleImage] = Field(default_factory=list)
14
+ image_list_updates: list[SingleImageTaskOutput] = Field(
15
+ default_factory=list
16
+ )
15
17
  image_list_removals: list[str] = Field(default_factory=list)
16
18
  filters: Filters = Field(default_factory=Filters)
17
19
 
@@ -122,7 +122,6 @@ class TaskReadV1(_TaskBaseV1):
122
122
  args_schema_version: Optional[str]
123
123
  docs_info: Optional[str]
124
124
  docs_link: Optional[HttpUrl]
125
- is_v2_compatible: bool
126
125
 
127
126
 
128
127
  class TaskCreateV1(_TaskBaseV1):
@@ -17,6 +17,7 @@ from .project import ProjectUpdateV2 # noqa F401
17
17
  from .task import TaskCreateV2 # noqa F401
18
18
  from .task import TaskExportV2 # noqa F401
19
19
  from .task import TaskImportV2 # noqa F401
20
+ from .task import TaskLegacyReadV2 # noqa F401
20
21
  from .task import TaskReadV2 # noqa F401
21
22
  from .task import TaskUpdateV2 # noqa F401
22
23
  from .task_collection import TaskCollectPipV2 # noqa F401
@@ -8,8 +8,8 @@ from pydantic import validator
8
8
 
9
9
  from .._validators import valstr
10
10
  from .._validators import valutc
11
- from ..v1.project import ProjectReadV1
12
11
  from .dumps import WorkflowTaskDumpV2
12
+ from .project import ProjectReadV2
13
13
  from .workflowtask import WorkflowTaskStatusTypeV2
14
14
  from fractal_server.images import Filters
15
15
 
@@ -45,7 +45,6 @@ class DatasetCreateV2(BaseModel, extra=Extra.forbid):
45
45
 
46
46
  name: str
47
47
 
48
- read_only: bool = False
49
48
  zarr_dir: str
50
49
 
51
50
  filters: Filters = Field(default_factory=Filters)
@@ -60,10 +59,9 @@ class DatasetReadV2(BaseModel):
60
59
  name: str
61
60
 
62
61
  project_id: int
63
- project: ProjectReadV1
62
+ project: ProjectReadV2
64
63
 
65
64
  history: list[_DatasetHistoryItemV2]
66
- read_only: bool
67
65
 
68
66
  timestamp_created: datetime
69
67
 
@@ -81,7 +79,6 @@ class DatasetUpdateV2(BaseModel):
81
79
  extra = "forbid"
82
80
 
83
81
  name: Optional[str]
84
- read_only: Optional[bool]
85
82
  zarr_dir: Optional[str]
86
83
  filters: Optional[Filters]
87
84
 
@@ -22,7 +22,6 @@ class ProjectDumpV2(BaseModel, extra=Extra.forbid):
22
22
 
23
23
  id: int
24
24
  name: str
25
- read_only: bool
26
25
  timestamp_created: str
27
26
 
28
27
 
@@ -80,7 +79,6 @@ class DatasetDumpV2(BaseModel):
80
79
  id: int
81
80
  name: str
82
81
  project_id: int
83
- read_only: bool
84
82
  timestamp_created: str
85
83
 
86
84
  zarr_dir: str
@@ -12,7 +12,6 @@ from .._validators import valutc
12
12
  class ProjectCreateV2(BaseModel, extra=Extra.forbid):
13
13
 
14
14
  name: str
15
- read_only: bool = False
16
15
  # Validators
17
16
  _name = validator("name", allow_reuse=True)(valstr("name"))
18
17
 
@@ -21,7 +20,6 @@ class ProjectReadV2(BaseModel):
21
20
 
22
21
  id: int
23
22
  name: str
24
- read_only: bool
25
23
  timestamp_created: datetime
26
24
  # Validators
27
25
  _timestamp_created = validator("timestamp_created", allow_reuse=True)(
@@ -32,6 +30,5 @@ class ProjectReadV2(BaseModel):
32
30
  class ProjectUpdateV2(BaseModel):
33
31
 
34
32
  name: Optional[str]
35
- read_only: Optional[bool]
36
33
  # Validators
37
34
  _name = validator("name", allow_reuse=True)(valstr("name"))
@@ -11,6 +11,7 @@ from pydantic import validator
11
11
 
12
12
  from .._validators import valdictkeys
13
13
  from .._validators import valstr
14
+ from ..v1.task import TaskReadV1
14
15
 
15
16
 
16
17
  class TaskCreateV2(BaseModel, extra=Extra.forbid):
@@ -100,6 +101,10 @@ class TaskReadV2(BaseModel):
100
101
  output_types: dict[str, bool]
101
102
 
102
103
 
104
+ class TaskLegacyReadV2(TaskReadV1):
105
+ is_v2_compatible: bool
106
+
107
+
103
108
  class TaskUpdateV2(BaseModel):
104
109
 
105
110
  name: Optional[str]
@@ -7,7 +7,7 @@ from pydantic import validator
7
7
 
8
8
  from .._validators import valstr
9
9
  from .._validators import valutc
10
- from ..v1.project import ProjectReadV1
10
+ from .project import ProjectReadV2
11
11
  from .workflowtask import WorkflowTaskExportV2
12
12
  from .workflowtask import WorkflowTaskImportV2
13
13
  from .workflowtask import WorkflowTaskReadV2
@@ -27,7 +27,7 @@ class WorkflowReadV2(BaseModel):
27
27
  name: str
28
28
  project_id: int
29
29
  task_list: list[WorkflowTaskReadV2]
30
- project: ProjectReadV1
30
+ project: ProjectReadV2
31
31
  timestamp_created: datetime
32
32
 
33
33
  _timestamp_created = validator("timestamp_created", allow_reuse=True)(
@@ -1,2 +1,3 @@
1
1
  from .models import Filters # noqa: F401
2
2
  from .models import SingleImage # noqa: F401
3
+ from .models import SingleImageTaskOutput # noqa: F401
@@ -9,7 +9,16 @@ from pydantic import validator
9
9
  from fractal_server.app.schemas._validators import valdictkeys
10
10
 
11
11
 
12
- class SingleImage(BaseModel):
12
+ class SingleImageBase(BaseModel):
13
+ """
14
+ Base for SingleImage and SingleImageTaskOutput.
15
+
16
+ Attributes:
17
+ zarr_url:
18
+ origin:
19
+ attributes:
20
+ types:
21
+ """
13
22
 
14
23
  zarr_url: str
15
24
  origin: Optional[str] = None
@@ -23,6 +32,31 @@ class SingleImage(BaseModel):
23
32
  )
24
33
  _types = validator("types", allow_reuse=True)(valdictkeys("types"))
25
34
 
35
+
36
+ class SingleImageTaskOutput(SingleImageBase):
37
+ """
38
+ `SingleImageBase`, with scalar `attributes` values (`None` included).
39
+ """
40
+
41
+ @validator("attributes")
42
+ def validate_attributes(
43
+ cls, v: dict[str, Any]
44
+ ) -> dict[str, Union[int, float, str, bool, None]]:
45
+ for key, value in v.items():
46
+ if not isinstance(value, (int, float, str, bool, type(None))):
47
+ raise ValueError(
48
+ f"SingleImageTaskOutput.attributes[{key}] must be a "
49
+ "scalar (int, float, str or bool). "
50
+ f"Given {value} ({type(value)})"
51
+ )
52
+ return v
53
+
54
+
55
+ class SingleImage(SingleImageBase):
56
+ """
57
+ `SingleImageBase`, with scalar `attributes` values (`None` excluded).
58
+ """
59
+
26
60
  @validator("attributes")
27
61
  def validate_attributes(
28
62
  cls, v: dict[str, Any]
@@ -1,8 +1,8 @@
1
- """v2
1
+ """V2
2
2
 
3
- Revision ID: d71e732236cd
3
+ Revision ID: 80e12e1bc4fd
4
4
  Revises: 9fd26a2b0de4
5
- Create Date: 2024-04-05 11:09:17.639183
5
+ Create Date: 2024-04-12 10:13:58.085788
6
6
 
7
7
  """
8
8
  import sqlalchemy as sa
@@ -11,7 +11,7 @@ from alembic import op
11
11
 
12
12
 
13
13
  # revision identifiers, used by Alembic.
14
- revision = "d71e732236cd"
14
+ revision = "80e12e1bc4fd"
15
15
  down_revision = "9fd26a2b0de4"
16
16
  branch_labels = None
17
17
  depends_on = None
@@ -23,7 +23,6 @@ def upgrade() -> None:
23
23
  "projectv2",
24
24
  sa.Column("id", sa.Integer(), nullable=False),
25
25
  sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
26
- sa.Column("read_only", sa.Boolean(), nullable=False),
27
26
  sa.Column(
28
27
  "timestamp_created", sa.DateTime(timezone=True), nullable=False
29
28
  ),
@@ -81,7 +80,6 @@ def upgrade() -> None:
81
80
  sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
82
81
  sa.Column("project_id", sa.Integer(), nullable=False),
83
82
  sa.Column("history", sa.JSON(), server_default="[]", nullable=False),
84
- sa.Column("read_only", sa.Boolean(), nullable=False),
85
83
  sa.Column(
86
84
  "timestamp_created", sa.DateTime(timezone=True), nullable=False
87
85
  ),
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "fractal-server"
3
- version = "2.0.0a4"
3
+ version = "2.0.0a6"
4
4
  description = "Server component of the Fractal analytics platform"
5
5
  authors = [
6
6
  "Jacopo Nespolo <jacopo.nespolo@exact-lab.it>",
@@ -86,7 +86,7 @@ filterwarnings = [
86
86
  ]
87
87
 
88
88
  [tool.bumpver]
89
- current_version = "2.0.0a4"
89
+ current_version = "2.0.0a6"
90
90
  version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
91
91
  commit_message = "bump version {old_version} -> {new_version}"
92
92
  commit = true
@@ -1 +0,0 @@
1
- __VERSION__ = "2.0.0a4"