fractal-server 2.14.0a5__tar.gz → 2.14.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 (213) hide show
  1. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/PKG-INFO +1 -1
  2. fractal_server-2.14.0a6/fractal_server/__init__.py +1 -0
  3. fractal_server-2.14.0a6/fractal_server/app/runner/v2/_db_tools.py +48 -0
  4. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/runner_functions.py +70 -65
  5. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/pyproject.toml +2 -2
  6. fractal_server-2.14.0a5/fractal_server/__init__.py +0 -1
  7. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/LICENSE +0 -0
  8. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/README.md +0 -0
  9. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/__main__.py +0 -0
  10. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/alembic.ini +0 -0
  11. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/__init__.py +0 -0
  12. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/db/__init__.py +0 -0
  13. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/history/__init__.py +0 -0
  14. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/history/image_updates.py +0 -0
  15. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/history/status_enum.py +0 -0
  16. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/__init__.py +0 -0
  17. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/linkusergroup.py +0 -0
  18. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/linkuserproject.py +0 -0
  19. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/security.py +0 -0
  20. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/user_settings.py +0 -0
  21. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/__init__.py +0 -0
  22. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/accounting.py +0 -0
  23. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/dataset.py +0 -0
  24. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/history.py +0 -0
  25. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/job.py +0 -0
  26. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/project.py +0 -0
  27. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/task.py +0 -0
  28. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/task_group.py +0 -0
  29. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/workflow.py +0 -0
  30. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/models/v2/workflowtask.py +0 -0
  31. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/__init__.py +0 -0
  32. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/admin/__init__.py +0 -0
  33. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/admin/v2/__init__.py +0 -0
  34. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/admin/v2/accounting.py +0 -0
  35. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/admin/v2/impersonate.py +0 -0
  36. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/admin/v2/job.py +0 -0
  37. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/admin/v2/project.py +0 -0
  38. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/admin/v2/task.py +0 -0
  39. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/admin/v2/task_group.py +0 -0
  40. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/admin/v2/task_group_lifecycle.py +0 -0
  41. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/__init__.py +0 -0
  42. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/__init__.py +0 -0
  43. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/_aux_functions.py +0 -0
  44. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/_aux_functions_history.py +0 -0
  45. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/_aux_functions_task_lifecycle.py +0 -0
  46. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/_aux_functions_tasks.py +0 -0
  47. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/dataset.py +0 -0
  48. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/history.py +0 -0
  49. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/images.py +0 -0
  50. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/job.py +0 -0
  51. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/project.py +0 -0
  52. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/status_legacy.py +0 -0
  53. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/submit.py +0 -0
  54. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/task.py +0 -0
  55. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/task_collection.py +0 -0
  56. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/task_collection_custom.py +0 -0
  57. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/task_group.py +0 -0
  58. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/task_group_lifecycle.py +0 -0
  59. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/workflow.py +0 -0
  60. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/workflow_import.py +0 -0
  61. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/api/v2/workflowtask.py +0 -0
  62. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/auth/__init__.py +0 -0
  63. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/auth/_aux_auth.py +0 -0
  64. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/auth/current_user.py +0 -0
  65. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/auth/group.py +0 -0
  66. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/auth/login.py +0 -0
  67. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/auth/oauth.py +0 -0
  68. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/auth/register.py +0 -0
  69. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/auth/router.py +0 -0
  70. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/auth/users.py +0 -0
  71. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/aux/__init__.py +0 -0
  72. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/aux/_job.py +0 -0
  73. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/aux/_runner.py +0 -0
  74. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/aux/validate_user_settings.py +0 -0
  75. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/routes/pagination.py +0 -0
  76. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/__init__.py +0 -0
  77. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/components.py +0 -0
  78. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/compress_folder.py +0 -0
  79. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/exceptions.py +0 -0
  80. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/__init__.py +0 -0
  81. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/base_runner.py +0 -0
  82. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/local/__init__.py +0 -0
  83. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/local/_local_config.py +0 -0
  84. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/local/_submit_setup.py +0 -0
  85. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/local/runner.py +0 -0
  86. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_common/__init__.py +0 -0
  87. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_common/_batching.py +0 -0
  88. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_common/_job_states.py +0 -0
  89. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_common/_slurm_config.py +0 -0
  90. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_common/_submit_setup.py +0 -0
  91. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_common/get_slurm_config.py +0 -0
  92. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_common/remote.py +0 -0
  93. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_common/utils_executors.py +0 -0
  94. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_ssh/__init__.py +0 -0
  95. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_ssh/_executor_wait_thread.py +0 -0
  96. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_ssh/_slurm_job.py +0 -0
  97. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_ssh/executor.py +0 -0
  98. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_sudo/__init__.py +0 -0
  99. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_sudo/_check_jobs_status.py +0 -0
  100. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_sudo/_subprocess_run_as_user.py +0 -0
  101. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/executors/slurm_sudo/runner.py +0 -0
  102. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/extract_archive.py +0 -0
  103. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/filenames.py +0 -0
  104. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/run_subprocess.py +0 -0
  105. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/set_start_and_last_task_index.py +0 -0
  106. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/shutdown.py +0 -0
  107. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/task_files.py +0 -0
  108. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/__init__.py +0 -0
  109. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/_local.py +0 -0
  110. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/_slurm_ssh.py +0 -0
  111. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/_slurm_sudo.py +0 -0
  112. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/deduplicate_list.py +0 -0
  113. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/merge_outputs.py +0 -0
  114. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/runner.py +0 -0
  115. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/runner_functions_low_level.py +0 -0
  116. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/v2/task_interface.py +0 -0
  117. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/runner/versions.py +0 -0
  118. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/__init__.py +0 -0
  119. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/_filter_validators.py +0 -0
  120. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/_validators.py +0 -0
  121. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/user.py +0 -0
  122. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/user_group.py +0 -0
  123. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/user_settings.py +0 -0
  124. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/__init__.py +0 -0
  125. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/accounting.py +0 -0
  126. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/dataset.py +0 -0
  127. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/dumps.py +0 -0
  128. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/job.py +0 -0
  129. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/manifest.py +0 -0
  130. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/project.py +0 -0
  131. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/status.py +0 -0
  132. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/task.py +0 -0
  133. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/task_collection.py +0 -0
  134. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/task_group.py +0 -0
  135. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/workflow.py +0 -0
  136. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/schemas/v2/workflowtask.py +0 -0
  137. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/security/__init__.py +0 -0
  138. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/security/signup_email.py +0 -0
  139. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/app/user_settings.py +0 -0
  140. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/config.py +0 -0
  141. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/data_migrations/README.md +0 -0
  142. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/data_migrations/tools.py +0 -0
  143. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/gunicorn_fractal.py +0 -0
  144. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/images/__init__.py +0 -0
  145. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/images/models.py +0 -0
  146. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/images/tools.py +0 -0
  147. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/logger.py +0 -0
  148. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/main.py +0 -0
  149. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/env.py +0 -0
  150. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/naming_convention.py +0 -0
  151. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/034a469ec2eb_task_groups.py +0 -0
  152. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/091b01f51f88_add_usergroup_and_linkusergroup_table.py +0 -0
  153. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/19eca0dd47a9_user_settings_project_dir.py +0 -0
  154. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/1eac13a26c83_drop_v1_tables.py +0 -0
  155. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/316140ff7ee1_remove_usersettings_cache_dir.py +0 -0
  156. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py +0 -0
  157. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py +0 -0
  158. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/501961cfcd85_remove_link_between_v1_and_v2_tasks_.py +0 -0
  159. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/50a13d6138fd_initial_schema.py +0 -0
  160. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/5bf02391cfef_v2.py +0 -0
  161. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py +0 -0
  162. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py +0 -0
  163. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py +0 -0
  164. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/8e8f227a3e36_update_taskv2_post_2_7_0.py +0 -0
  165. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py +0 -0
  166. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/94a47ea2d3ff_remove_cache_dir_slurm_user_and_slurm_.py +0 -0
  167. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/97f444d47249_add_applyworkflow_project_dump.py +0 -0
  168. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/99ea79d9e5d2_add_dataset_history.py +0 -0
  169. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/9c5ae74c9b98_add_user_settings_table.py +0 -0
  170. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.py +0 -0
  171. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py +0 -0
  172. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/af1ef1c83c9b_add_accounting_tables.py +0 -0
  173. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/af8673379a5c_drop_old_filter_columns.py +0 -0
  174. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/d256a7379ab8_taskgroup_activity_and_venv_info_to_.py +0 -0
  175. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py +0 -0
  176. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/da2cb2ac4255_user_group_viewer_paths.py +0 -0
  177. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/db09233ad13a_split_filters_and_keep_old_columns.py +0 -0
  178. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py +0 -0
  179. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py +0 -0
  180. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py +0 -0
  181. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/migrations/versions/fbce16ff4e47_new_history_items.py +0 -0
  182. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/py.typed +0 -0
  183. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/ssh/__init__.py +0 -0
  184. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/ssh/_fabric.py +0 -0
  185. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/string_tools.py +0 -0
  186. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/syringe.py +0 -0
  187. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/__init__.py +0 -0
  188. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/utils.py +0 -0
  189. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/__init__.py +0 -0
  190. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/local/__init__.py +0 -0
  191. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/local/_utils.py +0 -0
  192. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/local/collect.py +0 -0
  193. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/local/deactivate.py +0 -0
  194. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/local/reactivate.py +0 -0
  195. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/ssh/__init__.py +0 -0
  196. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/ssh/_utils.py +0 -0
  197. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/ssh/collect.py +0 -0
  198. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/ssh/deactivate.py +0 -0
  199. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/ssh/reactivate.py +0 -0
  200. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/templates/1_create_venv.sh +0 -0
  201. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/templates/2_pip_install.sh +0 -0
  202. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/templates/3_pip_freeze.sh +0 -0
  203. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/templates/4_pip_show.sh +0 -0
  204. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/templates/5_get_venv_size_and_file_number.sh +0 -0
  205. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/templates/6_pip_install_from_freeze.sh +0 -0
  206. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/utils_background.py +0 -0
  207. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/utils_database.py +0 -0
  208. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/utils_package_names.py +0 -0
  209. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/utils_python_interpreter.py +0 -0
  210. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/tasks/v2/utils_templates.py +0 -0
  211. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/urls.py +0 -0
  212. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/utils.py +0 -0
  213. {fractal_server-2.14.0a5 → fractal_server-2.14.0a6}/fractal_server/zip_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fractal-server
3
- Version: 2.14.0a5
3
+ Version: 2.14.0a6
4
4
  Summary: Backend 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.14.0a6"
@@ -0,0 +1,48 @@
1
+ from typing import Any
2
+
3
+ from sqlalchemy.dialects.postgresql import insert as pg_insert
4
+ from sqlalchemy.orm import Session
5
+
6
+ from fractal_server.app.models.v2 import HistoryImageCache
7
+
8
+
9
+ def bulk_upsert_image_cache_fast(
10
+ *,
11
+ list_upsert_objects: list[dict[str, Any]],
12
+ db: Session,
13
+ ) -> None:
14
+ """
15
+ Insert or update many objects into `HistoryImageCache` and commit
16
+
17
+ This function is an optimized version of
18
+
19
+ ```python
20
+ for obj in list_upsert_objects:
21
+ db.merge(**obj)
22
+ db.commit()
23
+ ```
24
+
25
+ See docs at
26
+ https://docs.sqlalchemy.org/en/20/dialects/postgresql.html#insert-on-conflict-upsert
27
+
28
+ FIXME: we tried to replace `index_elements` with
29
+ `constraint="pk_historyimagecache"`, but it did not work as expected.
30
+
31
+ Arguments:
32
+ list_upsert_objects:
33
+ List of dictionaries for objects to be upsert-ed.
34
+ db: A sync database session
35
+ """
36
+ if len(list_upsert_objects) == 0:
37
+ return None
38
+ stmt = pg_insert(HistoryImageCache).values(list_upsert_objects)
39
+ stmt = stmt.on_conflict_do_update(
40
+ index_elements=[
41
+ HistoryImageCache.zarr_url,
42
+ HistoryImageCache.dataset_id,
43
+ HistoryImageCache.workflowtask_id,
44
+ ],
45
+ set_=dict(latest_history_unit_id=stmt.excluded.latest_history_unit_id),
46
+ )
47
+ db.execute(stmt)
48
+ db.commit()
@@ -16,13 +16,13 @@ from .task_interface import InitTaskOutput
16
16
  from .task_interface import TaskOutput
17
17
  from fractal_server.app.db import get_sync_db
18
18
  from fractal_server.app.history.status_enum import XXXStatus
19
- from fractal_server.app.models.v2 import HistoryImageCache
20
19
  from fractal_server.app.models.v2 import HistoryUnit
21
20
  from fractal_server.app.models.v2 import TaskV2
22
21
  from fractal_server.app.models.v2 import WorkflowTaskV2
23
22
  from fractal_server.app.runner.components import _COMPONENT_KEY_
24
23
  from fractal_server.app.runner.components import _index_to_component
25
24
  from fractal_server.app.runner.executors.base_runner import BaseRunner
25
+ from fractal_server.app.runner.v2._db_tools import bulk_upsert_image_cache_fast
26
26
 
27
27
 
28
28
  __all__ = [
@@ -114,12 +114,12 @@ def run_v2_task_non_parallel(
114
114
  which_type="non_parallel",
115
115
  )
116
116
 
117
- function_kwargs = dict(
118
- zarr_urls=[image["zarr_url"] for image in images],
119
- zarr_dir=zarr_dir,
117
+ function_kwargs = {
118
+ "zarr_urls": [image["zarr_url"] for image in images],
119
+ "zarr_dir": zarr_dir,
120
+ _COMPONENT_KEY_: _index_to_component(0),
120
121
  **(wftask.args_non_parallel or {}),
121
- )
122
- function_kwargs[_COMPONENT_KEY_] = _index_to_component(0)
122
+ }
123
123
 
124
124
  # Database History operations
125
125
  with next(get_sync_db()) as db:
@@ -133,16 +133,18 @@ def run_v2_task_non_parallel(
133
133
  db.commit()
134
134
  db.refresh(history_unit)
135
135
  history_unit_id = history_unit.id
136
- for zarr_url in function_kwargs["zarr_urls"]:
137
- db.merge(
138
- HistoryImageCache(
136
+ bulk_upsert_image_cache_fast(
137
+ db=db,
138
+ list_upsert_objects=[
139
+ dict(
139
140
  workflowtask_id=wftask.id,
140
141
  dataset_id=dataset_id,
141
142
  zarr_url=zarr_url,
142
143
  latest_history_unit_id=history_unit_id,
143
144
  )
144
- )
145
- db.commit()
145
+ for zarr_url in history_unit.zarr_urls
146
+ ],
147
+ )
146
148
 
147
149
  result, exception = executor.submit(
148
150
  functools.partial(
@@ -191,7 +193,6 @@ def run_v2_task_parallel(
191
193
  dataset_id: int,
192
194
  history_run_id: int,
193
195
  ) -> tuple[TaskOutput, int, dict[int, BaseException]]:
194
-
195
196
  if len(images) == 0:
196
197
  # FIXME: Do something with history units/images?
197
198
  return (TaskOutput(), 0, {})
@@ -205,39 +206,45 @@ def run_v2_task_parallel(
205
206
  which_type="parallel",
206
207
  )
207
208
 
208
- list_function_kwargs = []
209
- history_unit_ids = []
209
+ list_function_kwargs = [
210
+ {
211
+ "zarr_url": image["zarr_url"],
212
+ _COMPONENT_KEY_: _index_to_component(ind),
213
+ **(wftask.args_parallel or {}),
214
+ }
215
+ for ind, image in enumerate(images)
216
+ ]
217
+ history_units = [
218
+ HistoryUnit(
219
+ history_run_id=history_run_id,
220
+ status=XXXStatus.SUBMITTED,
221
+ logfile=None, # FIXME
222
+ zarr_urls=[image["zarr_url"]],
223
+ )
224
+ for image in images
225
+ ]
226
+
210
227
  with next(get_sync_db()) as db:
211
- for ind, image in enumerate(images):
212
- list_function_kwargs.append(
213
- dict(
214
- zarr_url=image["zarr_url"],
215
- **(wftask.args_parallel or {}),
216
- ),
217
- )
218
- list_function_kwargs[-1][_COMPONENT_KEY_] = _index_to_component(
219
- ind
220
- )
221
- history_unit = HistoryUnit(
222
- history_run_id=history_run_id,
223
- status=XXXStatus.SUBMITTED,
224
- logfile=None, # FIXME
225
- zarr_urls=[image["zarr_url"]],
226
- )
227
- # FIXME: this should be a bulk operation
228
- db.add(history_unit)
229
- db.commit()
228
+ db.add_all(history_units)
229
+ db.commit()
230
+
231
+ for history_unit in history_units:
230
232
  db.refresh(history_unit)
231
- db.merge(
232
- HistoryImageCache(
233
- workflowtask_id=wftask.id,
234
- dataset_id=dataset_id,
235
- zarr_url=image["zarr_url"],
236
- latest_history_unit_id=history_unit.id,
237
- )
233
+ history_unit_ids = [history_unit.id for history_unit in history_units]
234
+
235
+ history_image_caches = [
236
+ dict(
237
+ workflowtask_id=wftask.id,
238
+ dataset_id=dataset_id,
239
+ zarr_url=history_unit.zarr_urls[0],
240
+ latest_history_unit_id=history_unit.id,
238
241
  )
239
- db.commit()
240
- history_unit_ids.append(history_unit.id)
242
+ for history_unit in history_units
243
+ ]
244
+
245
+ bulk_upsert_image_cache_fast(
246
+ db=db, list_upsert_objects=history_image_caches
247
+ )
241
248
 
242
249
  results, exceptions = executor.multisubmit(
243
250
  functools.partial(
@@ -300,7 +307,6 @@ def run_v2_task_compound(
300
307
  dataset_id: int,
301
308
  history_run_id: int,
302
309
  ) -> tuple[TaskOutput, int, dict[int, BaseException]]:
303
-
304
310
  executor_options_init = submit_setup_call(
305
311
  wftask=wftask,
306
312
  root_dir_local=workflow_dir_local,
@@ -315,12 +321,12 @@ def run_v2_task_compound(
315
321
  )
316
322
 
317
323
  # 3/A: non-parallel init task
318
- function_kwargs = dict(
319
- zarr_urls=[image["zarr_url"] for image in images],
320
- zarr_dir=zarr_dir,
324
+ function_kwargs = {
325
+ "zarr_urls": [image["zarr_url"] for image in images],
326
+ "zarr_dir": zarr_dir,
327
+ _COMPONENT_KEY_: f"init_{_index_to_component(0)}",
321
328
  **(wftask.args_non_parallel or {}),
322
- )
323
- function_kwargs[_COMPONENT_KEY_] = f"init_{_index_to_component(0)}"
329
+ }
324
330
 
325
331
  # Create database History entries
326
332
  input_image_zarr_urls = function_kwargs["zarr_urls"]
@@ -337,16 +343,18 @@ def run_v2_task_compound(
337
343
  db.refresh(history_unit)
338
344
  history_unit_id = history_unit.id
339
345
  # Create one `HistoryImageCache` for each input image
340
- for zarr_url in input_image_zarr_urls:
341
- db.merge(
342
- HistoryImageCache(
346
+ bulk_upsert_image_cache_fast(
347
+ db=db,
348
+ list_upsert_objects=[
349
+ dict(
343
350
  workflowtask_id=wftask.id,
344
351
  dataset_id=dataset_id,
345
352
  zarr_url=zarr_url,
346
353
  latest_history_unit_id=history_unit_id,
347
354
  )
348
- )
349
- db.commit()
355
+ for zarr_url in input_image_zarr_urls
356
+ ],
357
+ )
350
358
 
351
359
  result, exception = executor.submit(
352
360
  functools.partial(
@@ -394,18 +402,15 @@ def run_v2_task_compound(
394
402
  db.commit()
395
403
  return (TaskOutput(), 0, {})
396
404
 
397
- list_function_kwargs = []
398
- for ind, parallelization_item in enumerate(parallelization_list):
399
- list_function_kwargs.append(
400
- dict(
401
- zarr_url=parallelization_item.zarr_url,
402
- init_args=parallelization_item.init_args,
403
- **(wftask.args_parallel or {}),
404
- ),
405
- )
406
- list_function_kwargs[-1][
407
- _COMPONENT_KEY_
408
- ] = f"compute_{_index_to_component(ind)}"
405
+ list_function_kwargs = [
406
+ {
407
+ "zarr_url": parallelization_item.zarr_url,
408
+ "init_args": parallelization_item.init_args,
409
+ _COMPONENT_KEY_: f"compute_{_index_to_component(ind)}",
410
+ **(wftask.args_parallel or {}),
411
+ }
412
+ for ind, parallelization_item in enumerate(parallelization_list)
413
+ ]
409
414
 
410
415
  results, exceptions = executor.multisubmit(
411
416
  functools.partial(
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fractal-server"
3
- version = "2.14.0a5"
3
+ version = "2.14.0a6"
4
4
  description = "Backend component of the Fractal analytics platform"
5
5
  authors = [
6
6
  { name="Tommaso Comparin", email="tommaso.comparin@exact-lab.it" },
@@ -95,7 +95,7 @@ filterwarnings = [
95
95
  markers = ["container", "ssh"]
96
96
 
97
97
  [tool.bumpver]
98
- current_version = "2.14.0a5"
98
+ current_version = "2.14.0a6"
99
99
  version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
100
100
  commit_message = "bump version {old_version} -> {new_version}"
101
101
  commit = true
@@ -1 +0,0 @@
1
- __VERSION__ = "2.14.0a5"