fractal-server 2.0.0a10__tar.gz → 2.0.0a11__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 (169) hide show
  1. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/PKG-INFO +1 -1
  2. fractal_server-2.0.0a11/fractal_server/__init__.py +1 -0
  3. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/__init__.py +0 -1
  4. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v1/__init__.py +1 -0
  5. {fractal_server-2.0.0a10/fractal_server/app/models → fractal_server-2.0.0a11/fractal_server/app/models/v1}/state.py +2 -2
  6. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v2/__init__.py +2 -0
  7. fractal_server-2.0.0a11/fractal_server/app/models/v2/collection_state.py +21 -0
  8. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v2/job.py +2 -2
  9. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/admin/v2.py +4 -4
  10. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/_aux_functions.py +2 -2
  11. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/task_collection.py +4 -4
  12. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/workflowtask.py +10 -10
  13. fractal_server-2.0.0a10/fractal_server/migrations/versions/80e12e1bc4fd_v2.py → fractal_server-2.0.0a11/fractal_server/migrations/versions/5bf02391cfef_v2.py +12 -4
  14. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/v2/background_operations.py +2 -2
  15. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/pyproject.toml +2 -2
  16. fractal_server-2.0.0a10/fractal_server/__init__.py +0 -1
  17. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/LICENSE +0 -0
  18. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/README.md +0 -0
  19. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/__main__.py +0 -0
  20. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/alembic.ini +0 -0
  21. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/__init__.py +0 -0
  22. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/db/__init__.py +0 -0
  23. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/linkuserproject.py +0 -0
  24. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/security.py +0 -0
  25. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v1/dataset.py +0 -0
  26. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v1/job.py +0 -0
  27. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v1/project.py +0 -0
  28. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v1/task.py +0 -0
  29. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v1/workflow.py +0 -0
  30. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v2/dataset.py +0 -0
  31. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v2/project.py +0 -0
  32. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v2/task.py +0 -0
  33. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v2/workflow.py +0 -0
  34. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/models/v2/workflowtask.py +0 -0
  35. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/__init__.py +0 -0
  36. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/admin/__init__.py +0 -0
  37. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/admin/v1.py +0 -0
  38. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/__init__.py +0 -0
  39. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v1/__init__.py +0 -0
  40. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v1/_aux_functions.py +0 -0
  41. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v1/dataset.py +0 -0
  42. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v1/job.py +0 -0
  43. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v1/project.py +0 -0
  44. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v1/task.py +0 -0
  45. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v1/task_collection.py +0 -0
  46. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v1/workflow.py +0 -0
  47. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v1/workflowtask.py +0 -0
  48. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/__init__.py +0 -0
  49. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/dataset.py +0 -0
  50. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/images.py +0 -0
  51. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/job.py +0 -0
  52. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/project.py +0 -0
  53. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/status.py +0 -0
  54. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/submit.py +0 -0
  55. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/task.py +0 -0
  56. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/task_legacy.py +0 -0
  57. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/api/v2/workflow.py +0 -0
  58. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/auth.py +0 -0
  59. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/aux/__init__.py +0 -0
  60. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/aux/_job.py +0 -0
  61. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/routes/aux/_runner.py +0 -0
  62. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/.gitignore +0 -0
  63. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/__init__.py +0 -0
  64. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/async_wrap.py +0 -0
  65. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/components.py +0 -0
  66. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/exceptions.py +0 -0
  67. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/executors/__init__.py +0 -0
  68. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/executors/slurm/__init__.py +0 -0
  69. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/executors/slurm/_batching.py +0 -0
  70. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/executors/slurm/_check_jobs_status.py +0 -0
  71. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/executors/slurm/_executor_wait_thread.py +0 -0
  72. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/executors/slurm/_slurm_config.py +0 -0
  73. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/executors/slurm/_subprocess_run_as_user.py +0 -0
  74. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/executors/slurm/executor.py +0 -0
  75. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/executors/slurm/remote.py +0 -0
  76. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/filenames.py +0 -0
  77. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/set_start_and_last_task_index.py +0 -0
  78. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/task_files.py +0 -0
  79. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/__init__.py +0 -0
  80. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/_common.py +0 -0
  81. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/_local/__init__.py +0 -0
  82. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/_local/_local_config.py +0 -0
  83. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/_local/_submit_setup.py +0 -0
  84. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/_local/executor.py +0 -0
  85. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/_slurm/__init__.py +0 -0
  86. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/_slurm/_submit_setup.py +0 -0
  87. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/_slurm/get_slurm_config.py +0 -0
  88. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/common.py +0 -0
  89. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v1/handle_failed_job.py +0 -0
  90. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/__init__.py +0 -0
  91. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/_local/__init__.py +0 -0
  92. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/_local/_local_config.py +0 -0
  93. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/_local/_submit_setup.py +0 -0
  94. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/_local/executor.py +0 -0
  95. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/_slurm/__init__.py +0 -0
  96. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/_slurm/_submit_setup.py +0 -0
  97. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/_slurm/get_slurm_config.py +0 -0
  98. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/deduplicate_list.py +0 -0
  99. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/handle_failed_job.py +0 -0
  100. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/merge_outputs.py +0 -0
  101. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/runner.py +0 -0
  102. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/runner_functions.py +0 -0
  103. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/runner_functions_low_level.py +0 -0
  104. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/task_interface.py +0 -0
  105. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/runner/v2/v1_compat.py +0 -0
  106. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/__init__.py +0 -0
  107. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/_validators.py +0 -0
  108. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/state.py +0 -0
  109. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/user.py +0 -0
  110. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v1/__init__.py +0 -0
  111. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v1/applyworkflow.py +0 -0
  112. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v1/dataset.py +0 -0
  113. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v1/dumps.py +0 -0
  114. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v1/manifest.py +0 -0
  115. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v1/project.py +0 -0
  116. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v1/task.py +0 -0
  117. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v1/task_collection.py +0 -0
  118. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v1/workflow.py +0 -0
  119. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/__init__.py +0 -0
  120. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/dataset.py +0 -0
  121. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/dumps.py +0 -0
  122. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/job.py +0 -0
  123. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/manifest.py +0 -0
  124. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/project.py +0 -0
  125. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/status.py +0 -0
  126. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/task.py +0 -0
  127. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/task_collection.py +0 -0
  128. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/workflow.py +0 -0
  129. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/schemas/v2/workflowtask.py +0 -0
  130. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/app/security/__init__.py +0 -0
  131. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/config.py +0 -0
  132. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/data_migrations/README.md +0 -0
  133. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/images/__init__.py +0 -0
  134. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/images/models.py +0 -0
  135. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/images/tools.py +0 -0
  136. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/logger.py +0 -0
  137. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/main.py +0 -0
  138. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/README +0 -0
  139. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/env.py +0 -0
  140. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/script.py.mako +0 -0
  141. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py +0 -0
  142. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py +0 -0
  143. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/50a13d6138fd_initial_schema.py +0 -0
  144. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py +0 -0
  145. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py +0 -0
  146. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py +0 -0
  147. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py +0 -0
  148. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/97f444d47249_add_applyworkflow_project_dump.py +0 -0
  149. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/99ea79d9e5d2_add_dataset_history.py +0 -0
  150. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.py +0 -0
  151. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py +0 -0
  152. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py +0 -0
  153. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py +0 -0
  154. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py +0 -0
  155. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py +0 -0
  156. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/py.typed +0 -0
  157. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/syringe.py +0 -0
  158. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/__init__.py +0 -0
  159. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/endpoint_operations.py +0 -0
  160. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/utils.py +0 -0
  161. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/v1/_TaskCollectPip.py +0 -0
  162. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/v1/__init__.py +0 -0
  163. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/v1/background_operations.py +0 -0
  164. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/v1/get_collection_data.py +0 -0
  165. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/v2/_TaskCollectPip.py +0 -0
  166. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/v2/__init__.py +0 -0
  167. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/tasks/v2/get_collection_data.py +0 -0
  168. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/fractal_server/urls.py +0 -0
  169. {fractal_server-2.0.0a10 → fractal_server-2.0.0a11}/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.0a10
3
+ Version: 2.0.0a11
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.0a11"
@@ -2,6 +2,5 @@
2
2
  `models` module
3
3
  """
4
4
  from .security import * # noqa: F401, F403
5
- from .state import State # noqa: F401
6
5
  from .v1 import * # noqa: F401, F403
7
6
  from .v2 import * # noqa: F401, F403
@@ -6,6 +6,7 @@ from .dataset import Resource # noqa: F401
6
6
  from .job import ApplyWorkflow # noqa: F403, F401
7
7
  from .job import JobStatusTypeV1 # noqa: F401, F403
8
8
  from .project import Project # noqa: F403, F401
9
+ from .state import State # noqa: F403, F401
9
10
  from .task import Task # noqa: F403, F401
10
11
  from .workflow import Workflow # noqa: F401, F403
11
12
  from .workflow import WorkflowTask # noqa: F401, F403
@@ -8,8 +8,8 @@ from sqlalchemy.types import JSON
8
8
  from sqlmodel import Field
9
9
  from sqlmodel import SQLModel
10
10
 
11
- from ...utils import get_timestamp
12
- from ..schemas.v1 import _StateBase
11
+ from ....utils import get_timestamp
12
+ from ...schemas.v1 import _StateBase
13
13
 
14
14
 
15
15
  class State(_StateBase, SQLModel, table=True):
@@ -2,6 +2,7 @@
2
2
  v2 `models` module
3
3
  """
4
4
  from ..linkuserproject import LinkUserProjectV2
5
+ from .collection_state import CollectionStateV2
5
6
  from .dataset import DatasetV2
6
7
  from .job import JobV2
7
8
  from .project import ProjectV2
@@ -14,6 +15,7 @@ __all__ = [
14
15
  "DatasetV2",
15
16
  "JobV2",
16
17
  "ProjectV2",
18
+ "CollectionStateV2",
17
19
  "TaskV2",
18
20
  "WorkflowTaskV2",
19
21
  "WorkflowV2",
@@ -0,0 +1,21 @@
1
+ from datetime import datetime
2
+ from typing import Any
3
+ from typing import Optional
4
+
5
+ from sqlalchemy import Column
6
+ from sqlalchemy.types import DateTime
7
+ from sqlalchemy.types import JSON
8
+ from sqlmodel import Field
9
+ from sqlmodel import SQLModel
10
+
11
+ from ....utils import get_timestamp
12
+
13
+
14
+ class CollectionStateV2(SQLModel, table=True):
15
+
16
+ id: Optional[int] = Field(default=None, primary_key=True)
17
+ data: dict[str, Any] = Field(sa_column=Column(JSON), default={})
18
+ timestamp: datetime = Field(
19
+ default_factory=get_timestamp,
20
+ sa_column=Column(DateTime(timezone=True)),
21
+ )
@@ -9,7 +9,7 @@ from sqlmodel import Field
9
9
  from sqlmodel import SQLModel
10
10
 
11
11
  from ....utils import get_timestamp
12
- from ...schemas.v1 import JobStatusTypeV1
12
+ from ...schemas.v2 import JobStatusTypeV2
13
13
 
14
14
 
15
15
  class JobV2(SQLModel, table=True):
@@ -47,5 +47,5 @@ class JobV2(SQLModel, table=True):
47
47
  end_timestamp: Optional[datetime] = Field(
48
48
  default=None, sa_column=Column(DateTime(timezone=True))
49
49
  )
50
- status: str = JobStatusTypeV1.SUBMITTED
50
+ status: str = JobStatusTypeV2.SUBMITTED
51
51
  log: Optional[str] = None
@@ -20,13 +20,13 @@ from ....syringe import Inject
20
20
  from ....utils import get_timestamp
21
21
  from ...db import AsyncSession
22
22
  from ...db import get_async_db
23
- from ...models import JobStatusTypeV1
24
23
  from ...models.security import UserOAuth as User
25
24
  from ...models.v1 import Task
26
25
  from ...models.v2 import JobV2
27
26
  from ...models.v2 import ProjectV2
28
27
  from ...runner.filenames import WORKFLOW_LOG_FILENAME
29
28
  from ...schemas.v2 import JobReadV2
29
+ from ...schemas.v2 import JobStatusTypeV2
30
30
  from ...schemas.v2 import JobUpdateV2
31
31
  from ...schemas.v2 import ProjectReadV2
32
32
  from ...security import current_active_superuser
@@ -90,7 +90,7 @@ async def view_job(
90
90
  project_id: Optional[int] = None,
91
91
  dataset_id: Optional[int] = None,
92
92
  workflow_id: Optional[int] = None,
93
- status: Optional[JobStatusTypeV1] = None,
93
+ status: Optional[JobStatusTypeV2] = None,
94
94
  start_timestamp_min: Optional[datetime] = None,
95
95
  start_timestamp_max: Optional[datetime] = None,
96
96
  end_timestamp_min: Optional[datetime] = None,
@@ -175,7 +175,7 @@ async def view_single_job(
175
175
  )
176
176
  await db.close()
177
177
 
178
- if show_tmp_logs and (job.status == JobStatusTypeV1.SUBMITTED):
178
+ if show_tmp_logs and (job.status == JobStatusTypeV2.SUBMITTED):
179
179
  try:
180
180
  with open(f"{job.working_dir}/{WORKFLOW_LOG_FILENAME}", "r") as f:
181
181
  job.log = f.read()
@@ -208,7 +208,7 @@ async def update_job(
208
208
  detail=f"Job {job_id} not found",
209
209
  )
210
210
 
211
- if job_update.status != JobStatusTypeV1.FAILED:
211
+ if job_update.status != JobStatusTypeV2.FAILED:
212
212
  raise HTTPException(
213
213
  status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
214
214
  detail=f"Cannot set job status to {job_update.status}",
@@ -21,7 +21,7 @@ from ....models.v2 import ProjectV2
21
21
  from ....models.v2 import TaskV2
22
22
  from ....models.v2 import WorkflowTaskV2
23
23
  from ....models.v2 import WorkflowV2
24
- from ....schemas.v1 import JobStatusTypeV1
24
+ from ....schemas.v2 import JobStatusTypeV2
25
25
  from ....security import User
26
26
  from fractal_server.images import Filters
27
27
 
@@ -384,7 +384,7 @@ def _get_submitted_jobs_statement() -> SelectOfScalar:
384
384
  A sqlmodel statement that selects all `Job`s with
385
385
  `Job.status` equal to `submitted`.
386
386
  """
387
- stm = select(JobV2).where(JobV2.status == JobStatusTypeV1.SUBMITTED)
387
+ stm = select(JobV2).where(JobV2.status == JobStatusTypeV2.SUBMITTED)
388
388
  return stm
389
389
 
390
390
 
@@ -17,7 +17,7 @@ from .....logger import set_logger
17
17
  from .....syringe import Inject
18
18
  from ....db import AsyncSession
19
19
  from ....db import get_async_db
20
- from ....models import State
20
+ from ....models import CollectionStateV2
21
21
  from ....models.v2 import TaskV2
22
22
  from ....schemas import StateRead
23
23
  from ....schemas.v2 import TaskCollectPipV2
@@ -151,7 +151,7 @@ async def collect_tasks_pip(
151
151
  ),
152
152
  )
153
153
  task_collect_status.info = "Already installed"
154
- state = State(data=task_collect_status.sanitised_dict())
154
+ state = CollectionStateV2(data=task_collect_status.sanitised_dict())
155
155
  response.status_code == status.HTTP_200_OK
156
156
  await db.close()
157
157
  return state
@@ -181,7 +181,7 @@ async def collect_tasks_pip(
181
181
  # Create State object (after casting venv_path to string)
182
182
  collection_status_dict = collection_status.dict()
183
183
  collection_status_dict["venv_path"] = str(collection_status.venv_path)
184
- state = State(data=collection_status_dict)
184
+ state = CollectionStateV2(data=collection_status_dict)
185
185
  db.add(state)
186
186
  await db.commit()
187
187
  await db.refresh(state)
@@ -220,7 +220,7 @@ async def check_collection_status(
220
220
  """
221
221
  logger = set_logger(logger_name="check_collection_status")
222
222
  logger.debug(f"Querying state for state.id={state_id}")
223
- state = await db.get(State, state_id)
223
+ state = await db.get(CollectionStateV2, state_id)
224
224
  if not state:
225
225
  await db.close()
226
226
  raise HTTPException(
@@ -46,6 +46,11 @@ async def create_workflowtask(
46
46
 
47
47
  if new_task.is_legacy_task is True:
48
48
  task = await db.get(Task, task_id)
49
+ if not task:
50
+ raise HTTPException(
51
+ status_code=status.HTTP_404_NOT_FOUND,
52
+ detail=f"Task {task_id} not found.",
53
+ )
49
54
  if not task.is_v2_compatible:
50
55
  raise HTTPException(
51
56
  status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
@@ -53,16 +58,11 @@ async def create_workflowtask(
53
58
  )
54
59
  else:
55
60
  task = await db.get(TaskV2, task_id)
56
-
57
- if not task:
58
- if new_task.is_legacy_task:
59
- error = f"Task {task_id} not found."
60
- else:
61
- error = f"TaskV2 {task_id} not found."
62
-
63
- raise HTTPException(
64
- status_code=status.HTTP_404_NOT_FOUND, detail=error
65
- )
61
+ if not task:
62
+ raise HTTPException(
63
+ status_code=status.HTTP_404_NOT_FOUND,
64
+ detail=f"TaskV2 {task_id} not found.",
65
+ )
66
66
 
67
67
  if new_task.is_legacy_task is True or task.type == "parallel":
68
68
  if (
@@ -1,8 +1,8 @@
1
- """V2
1
+ """v2
2
2
 
3
- Revision ID: 80e12e1bc4fd
3
+ Revision ID: 5bf02391cfef
4
4
  Revises: 9fd26a2b0de4
5
- Create Date: 2024-04-12 10:13:58.085788
5
+ Create Date: 2024-04-18 10:35:19.067833
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 = "80e12e1bc4fd"
14
+ revision = "5bf02391cfef"
15
15
  down_revision = "9fd26a2b0de4"
16
16
  branch_labels = None
17
17
  depends_on = None
@@ -19,6 +19,13 @@ depends_on = None
19
19
 
20
20
  def upgrade() -> None:
21
21
  # ### commands auto generated by Alembic - please adjust! ###
22
+ op.create_table(
23
+ "collectionstatev2",
24
+ sa.Column("id", sa.Integer(), nullable=False),
25
+ sa.Column("data", sa.JSON(), nullable=True),
26
+ sa.Column("timestamp", sa.DateTime(timezone=True), nullable=True),
27
+ sa.PrimaryKeyConstraint("id"),
28
+ )
22
29
  op.create_table(
23
30
  "projectv2",
24
31
  sa.Column("id", sa.Integer(), nullable=False),
@@ -234,4 +241,5 @@ def downgrade() -> None:
234
241
  op.drop_table("datasetv2")
235
242
  op.drop_table("taskv2")
236
243
  op.drop_table("projectv2")
244
+ op.drop_table("collectionstatev2")
237
245
  # ### end Alembic commands ###
@@ -15,7 +15,7 @@ from ..utils import slugify_task_name
15
15
  from ._TaskCollectPip import _TaskCollectPip
16
16
  from fractal_server.app.db import DBSyncSession
17
17
  from fractal_server.app.db import get_sync_db
18
- from fractal_server.app.models import State
18
+ from fractal_server.app.models.v2 import CollectionStateV2
19
19
  from fractal_server.app.models.v2 import TaskV2
20
20
  from fractal_server.app.schemas.v2 import TaskCollectStatusV2
21
21
  from fractal_server.app.schemas.v2 import TaskCreateV2
@@ -313,7 +313,7 @@ async def background_collect_pip(
313
313
  logger.debug(f"{key}: {value}")
314
314
 
315
315
  with next(get_sync_db()) as db:
316
- state: State = db.get(State, state_id)
316
+ state: CollectionStateV2 = db.get(CollectionStateV2, state_id)
317
317
  data = TaskCollectStatusV2(**state.data)
318
318
  data.info = None
319
319
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "fractal-server"
3
- version = "2.0.0a10"
3
+ version = "2.0.0a11"
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.0a10"
89
+ current_version = "2.0.0a11"
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.0a10"