fractal-server 2.3.1a0__tar.gz → 2.3.3__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 (199) hide show
  1. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/PKG-INFO +1 -1
  2. fractal_server-2.3.3/fractal_server/__init__.py +1 -0
  3. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/admin/v1.py +1 -3
  4. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/admin/v2.py +1 -3
  5. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v1/job.py +1 -3
  6. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/job.py +1 -3
  7. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/aux/_job.py +7 -5
  8. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/config.py +1 -1
  9. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/ssh/_fabric.py +0 -1
  10. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/string_tools.py +12 -6
  11. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/background_operations_ssh.py +32 -13
  12. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/templates/_1_create_venv.sh +2 -2
  13. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/templates/_2_upgrade_pip.sh +0 -4
  14. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/templates/_3_pip_install.sh +0 -4
  15. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/templates/_4_pip_freeze.sh +0 -6
  16. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/templates/_5_pip_show.sh +1 -3
  17. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/pyproject.toml +2 -2
  18. fractal_server-2.3.1a0/fractal_server/__init__.py +0 -1
  19. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/LICENSE +0 -0
  20. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/README.md +0 -0
  21. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/__main__.py +0 -0
  22. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/alembic.ini +0 -0
  23. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/__init__.py +0 -0
  24. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/db/__init__.py +0 -0
  25. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/__init__.py +0 -0
  26. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/linkuserproject.py +0 -0
  27. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/security.py +0 -0
  28. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v1/__init__.py +0 -0
  29. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v1/dataset.py +0 -0
  30. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v1/job.py +0 -0
  31. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v1/project.py +0 -0
  32. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v1/state.py +0 -0
  33. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v1/task.py +0 -0
  34. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v1/workflow.py +0 -0
  35. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v2/__init__.py +0 -0
  36. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v2/collection_state.py +0 -0
  37. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v2/dataset.py +0 -0
  38. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v2/job.py +0 -0
  39. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v2/project.py +0 -0
  40. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v2/task.py +0 -0
  41. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v2/workflow.py +0 -0
  42. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/models/v2/workflowtask.py +0 -0
  43. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/__init__.py +0 -0
  44. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/admin/__init__.py +0 -0
  45. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/__init__.py +0 -0
  46. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v1/__init__.py +0 -0
  47. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v1/_aux_functions.py +0 -0
  48. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v1/dataset.py +0 -0
  49. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v1/project.py +0 -0
  50. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v1/task.py +0 -0
  51. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v1/task_collection.py +0 -0
  52. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v1/workflow.py +0 -0
  53. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v1/workflowtask.py +0 -0
  54. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/__init__.py +0 -0
  55. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/_aux_functions.py +0 -0
  56. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/dataset.py +0 -0
  57. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/images.py +0 -0
  58. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/project.py +0 -0
  59. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/status.py +0 -0
  60. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/submit.py +0 -0
  61. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/task.py +0 -0
  62. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/task_collection.py +0 -0
  63. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/task_collection_custom.py +0 -0
  64. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/task_legacy.py +0 -0
  65. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/workflow.py +0 -0
  66. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/api/v2/workflowtask.py +0 -0
  67. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/auth.py +0 -0
  68. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/aux/__init__.py +0 -0
  69. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/routes/aux/_runner.py +0 -0
  70. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/.gitignore +0 -0
  71. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/__init__.py +0 -0
  72. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/async_wrap.py +0 -0
  73. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/components.py +0 -0
  74. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/compress_folder.py +0 -0
  75. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/exceptions.py +0 -0
  76. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/__init__.py +0 -0
  77. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/__init__.py +0 -0
  78. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/_batching.py +0 -0
  79. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/_slurm_config.py +0 -0
  80. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/remote.py +0 -0
  81. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/ssh/__init__.py +0 -0
  82. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/ssh/_executor_wait_thread.py +0 -0
  83. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/ssh/_slurm_job.py +0 -0
  84. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/ssh/executor.py +0 -0
  85. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/sudo/__init__.py +0 -0
  86. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/sudo/_check_jobs_status.py +0 -0
  87. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/sudo/_executor_wait_thread.py +0 -0
  88. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/sudo/_subprocess_run_as_user.py +0 -0
  89. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/executors/slurm/sudo/executor.py +0 -0
  90. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/extract_archive.py +0 -0
  91. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/filenames.py +0 -0
  92. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/set_start_and_last_task_index.py +0 -0
  93. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/shutdown.py +0 -0
  94. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/task_files.py +0 -0
  95. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/__init__.py +0 -0
  96. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/_common.py +0 -0
  97. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/_local/__init__.py +0 -0
  98. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/_local/_local_config.py +0 -0
  99. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/_local/_submit_setup.py +0 -0
  100. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/_local/executor.py +0 -0
  101. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/_slurm/__init__.py +0 -0
  102. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/_slurm/_submit_setup.py +0 -0
  103. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/_slurm/get_slurm_config.py +0 -0
  104. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/common.py +0 -0
  105. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v1/handle_failed_job.py +0 -0
  106. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/__init__.py +0 -0
  107. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_local/__init__.py +0 -0
  108. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_local/_local_config.py +0 -0
  109. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_local/_submit_setup.py +0 -0
  110. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_local/executor.py +0 -0
  111. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_local_experimental/__init__.py +0 -0
  112. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_local_experimental/_local_config.py +0 -0
  113. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_local_experimental/_submit_setup.py +0 -0
  114. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_local_experimental/executor.py +0 -0
  115. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_slurm/__init__.py +0 -0
  116. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_slurm/_submit_setup.py +0 -0
  117. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_slurm/get_slurm_config.py +0 -0
  118. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_slurm_ssh/__init__.py +0 -0
  119. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_slurm_ssh/_submit_setup.py +0 -0
  120. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/_slurm_ssh/get_slurm_config.py +0 -0
  121. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/deduplicate_list.py +0 -0
  122. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/handle_failed_job.py +0 -0
  123. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/merge_outputs.py +0 -0
  124. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/runner.py +0 -0
  125. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/runner_functions.py +0 -0
  126. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/runner_functions_low_level.py +0 -0
  127. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/task_interface.py +0 -0
  128. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/v2/v1_compat.py +0 -0
  129. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/runner/versions.py +0 -0
  130. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/__init__.py +0 -0
  131. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/_validators.py +0 -0
  132. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/user.py +0 -0
  133. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/__init__.py +0 -0
  134. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/applyworkflow.py +0 -0
  135. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/dataset.py +0 -0
  136. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/dumps.py +0 -0
  137. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/manifest.py +0 -0
  138. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/project.py +0 -0
  139. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/state.py +0 -0
  140. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/task.py +0 -0
  141. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/task_collection.py +0 -0
  142. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v1/workflow.py +0 -0
  143. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/__init__.py +0 -0
  144. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/dataset.py +0 -0
  145. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/dumps.py +0 -0
  146. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/job.py +0 -0
  147. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/manifest.py +0 -0
  148. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/project.py +0 -0
  149. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/status.py +0 -0
  150. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/task.py +0 -0
  151. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/task_collection.py +0 -0
  152. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/workflow.py +0 -0
  153. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/schemas/v2/workflowtask.py +0 -0
  154. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/app/security/__init__.py +0 -0
  155. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/data_migrations/README.md +0 -0
  156. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/gunicorn_fractal.py +0 -0
  157. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/images/__init__.py +0 -0
  158. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/images/models.py +0 -0
  159. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/images/tools.py +0 -0
  160. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/logger.py +0 -0
  161. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/main.py +0 -0
  162. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/README +0 -0
  163. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/env.py +0 -0
  164. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/script.py.mako +0 -0
  165. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py +0 -0
  166. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py +0 -0
  167. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/50a13d6138fd_initial_schema.py +0 -0
  168. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/5bf02391cfef_v2.py +0 -0
  169. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py +0 -0
  170. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py +0 -0
  171. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py +0 -0
  172. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py +0 -0
  173. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/97f444d47249_add_applyworkflow_project_dump.py +0 -0
  174. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/99ea79d9e5d2_add_dataset_history.py +0 -0
  175. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.py +0 -0
  176. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py +0 -0
  177. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py +0 -0
  178. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py +0 -0
  179. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py +0 -0
  180. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py +0 -0
  181. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/py.typed +0 -0
  182. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/ssh/__init__.py +0 -0
  183. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/syringe.py +0 -0
  184. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/__init__.py +0 -0
  185. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/utils.py +0 -0
  186. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v1/_TaskCollectPip.py +0 -0
  187. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v1/__init__.py +0 -0
  188. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v1/background_operations.py +0 -0
  189. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v1/endpoint_operations.py +0 -0
  190. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v1/get_collection_data.py +0 -0
  191. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v1/utils.py +0 -0
  192. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/_TaskCollectPip.py +0 -0
  193. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/__init__.py +0 -0
  194. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/_venv_pip.py +0 -0
  195. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/background_operations.py +0 -0
  196. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/endpoint_operations.py +0 -0
  197. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/tasks/v2/utils.py +0 -0
  198. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/urls.py +0 -0
  199. {fractal_server-2.3.1a0 → fractal_server-2.3.3}/fractal_server/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fractal-server
3
- Version: 2.3.1a0
3
+ Version: 2.3.3
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.3.3"
@@ -387,9 +387,7 @@ async def download_job_logs(
387
387
  # Create and return byte stream for zipped log folder
388
388
  PREFIX_ZIP = Path(job.working_dir).name
389
389
  zip_filename = f"{PREFIX_ZIP}_archive.zip"
390
- byte_stream = _zip_folder_to_byte_stream(
391
- folder=job.working_dir, zip_filename=zip_filename
392
- )
390
+ byte_stream = _zip_folder_to_byte_stream(folder=job.working_dir)
393
391
  return StreamingResponse(
394
392
  iter([byte_stream.getvalue()]),
395
393
  media_type="application/x-zip-compressed",
@@ -274,9 +274,7 @@ async def download_job_logs(
274
274
  # Create and return byte stream for zipped log folder
275
275
  PREFIX_ZIP = Path(job.working_dir).name
276
276
  zip_filename = f"{PREFIX_ZIP}_archive.zip"
277
- byte_stream = _zip_folder_to_byte_stream(
278
- folder=job.working_dir, zip_filename=zip_filename
279
- )
277
+ byte_stream = _zip_folder_to_byte_stream(folder=job.working_dir)
280
278
  return StreamingResponse(
281
279
  iter([byte_stream.getvalue()]),
282
280
  media_type="application/x-zip-compressed",
@@ -128,9 +128,7 @@ async def download_job_logs(
128
128
  # Create and return byte stream for zipped log folder
129
129
  PREFIX_ZIP = Path(job.working_dir).name
130
130
  zip_filename = f"{PREFIX_ZIP}_archive.zip"
131
- byte_stream = _zip_folder_to_byte_stream(
132
- folder=job.working_dir, zip_filename=zip_filename
133
- )
131
+ byte_stream = _zip_folder_to_byte_stream(folder=job.working_dir)
134
132
  return StreamingResponse(
135
133
  iter([byte_stream.getvalue()]),
136
134
  media_type="application/x-zip-compressed",
@@ -131,9 +131,7 @@ async def download_job_logs(
131
131
  # Create and return byte stream for zipped log folder
132
132
  PREFIX_ZIP = Path(job.working_dir).name
133
133
  zip_filename = f"{PREFIX_ZIP}_archive.zip"
134
- byte_stream = _zip_folder_to_byte_stream(
135
- folder=job.working_dir, zip_filename=zip_filename
136
- )
134
+ byte_stream = _zip_folder_to_byte_stream(folder=job.working_dir)
137
135
  return StreamingResponse(
138
136
  iter([byte_stream.getvalue()]),
139
137
  media_type="application/x-zip-compressed",
@@ -1,3 +1,4 @@
1
+ import os
1
2
  from io import BytesIO
2
3
  from pathlib import Path
3
4
  from typing import Union
@@ -25,19 +26,20 @@ def _write_shutdown_file(*, job: Union[ApplyWorkflow, JobV2]):
25
26
  f.write(f"Trigger executor shutdown for {job.id=}.")
26
27
 
27
28
 
28
- def _zip_folder_to_byte_stream(*, folder: str, zip_filename: str) -> BytesIO:
29
+ def _zip_folder_to_byte_stream(*, folder: str) -> BytesIO:
29
30
  """
30
31
  Get byte stream with the zipped log folder of a job.
31
32
 
32
33
  Args:
33
34
  folder: the folder to zip
34
- zip_filename: name of the zipped archive
35
35
  """
36
- working_dir_path = Path(folder)
37
36
 
38
37
  byte_stream = BytesIO()
39
38
  with ZipFile(byte_stream, mode="w", compression=ZIP_DEFLATED) as zipfile:
40
- for fpath in working_dir_path.glob("*"):
41
- zipfile.write(filename=str(fpath), arcname=str(fpath.name))
39
+ for root, dirs, files in os.walk(folder):
40
+ for file in files:
41
+ file_path = os.path.join(root, file)
42
+ archive_path = os.path.relpath(file_path, folder)
43
+ zipfile.write(file_path, archive_path)
42
44
 
43
45
  return byte_stream
@@ -497,7 +497,7 @@ class Settings(BaseSettings):
497
497
  [`clusterfutures`](https://github.com/sampsyo/clusterfutures/blob/master/cfut/__init__.py)).
498
498
  """
499
499
 
500
- FRACTAL_SLURM_SBATCH_SLEEP: int = 0
500
+ FRACTAL_SLURM_SBATCH_SLEEP: float = 0
501
501
  """
502
502
  Interval to wait (in seconds) between two subsequent `sbatch` calls, when
503
503
  running a task that produces multiple SLURM jobs.
@@ -286,7 +286,6 @@ class FractalSSH(object):
286
286
  folder: Absolute path to a folder that should be removed.
287
287
  safe_root: If `folder` is not a subfolder of the absolute
288
288
  `safe_root` path, raise an error.
289
- fractal_ssh:
290
289
  """
291
290
  invalid_characters = {" ", "\n", ";", "$", "`"}
292
291
 
@@ -9,12 +9,12 @@ def sanitize_string(value: str) -> str:
9
9
 
10
10
  Make the string lower-case, and replace any special character with an
11
11
  underscore, where special characters are:
12
- ```python repl
13
- >>> string.punctuation
14
- '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'
15
- >>> string.whitespace
16
- ' \t\n\r\x0b\x0c'
17
- ```
12
+
13
+
14
+ >>> string.punctuation
15
+ '!"#$%&\'()*+,-./:;<=>?@[\\\\]^_`{|}~'
16
+ >>> string.whitespace
17
+ ' \\t\\n\\r\\x0b\\x0c'
18
18
 
19
19
  Args:
20
20
  value: Input string
@@ -35,5 +35,11 @@ def slugify_task_name_for_source(task_name: str) -> str:
35
35
  from `fractal_server.string_tools.sanitize_string`, nor we can remove it.
36
36
  As 2.3.1, we are renaming it to `slugify_task_name_for_source`, to make
37
37
  it clear that it should not be used for other purposes.
38
+
39
+ Args:
40
+ task_name:
41
+
42
+ Return:
43
+ Slug-ified task name.
38
44
  """
39
45
  return task_name.replace(" ", "_").lower()
@@ -167,7 +167,7 @@ def background_collect_pip_ssh(
167
167
  / ".fractal"
168
168
  / f"{task_pkg.package_name}{package_version}"
169
169
  ).as_posix()
170
-
170
+ logger.debug(f"{package_env_dir=}")
171
171
  replacements = [
172
172
  ("__PACKAGE_NAME__", task_pkg.package_name),
173
173
  ("__PACKAGE_ENV_DIR__", package_env_dir),
@@ -197,10 +197,18 @@ def background_collect_pip_ssh(
197
197
  # long operations that do not use the db
198
198
  db.close()
199
199
 
200
+ # `remove_venv_folder_upon_failure` is set to True only if
201
+ # script 1 goes through, which means that the remote folder
202
+ # `package_env_dir` did not already exist. If this remote
203
+ # folder already existed, then script 1 fails and the boolean
204
+ # flag `remove_venv_folder_upon_failure` remains false.
205
+ remove_venv_folder_upon_failure = False
200
206
  stdout = _customize_and_run_template(
201
207
  script_filename="_1_create_venv.sh",
202
208
  **common_args,
203
209
  )
210
+ remove_venv_folder_upon_failure = True
211
+
204
212
  stdout = _customize_and_run_template(
205
213
  script_filename="_2_upgrade_pip.sh",
206
214
  **common_args,
@@ -294,6 +302,7 @@ def background_collect_pip_ssh(
294
302
 
295
303
  # Finalize (write metadata to DB)
296
304
  logger.debug("finalising - START")
305
+
297
306
  collection_state = db.get(CollectionStateV2, state_id)
298
307
  collection_state.data["log"] = log_file_path.open("r").read()
299
308
  collection_state.data["freeze"] = stdout_pip_freeze
@@ -312,16 +321,26 @@ def background_collect_pip_ssh(
312
321
  exception=e,
313
322
  db=db,
314
323
  )
315
- try:
316
- logger.info(f"Now delete remote folder {package_env_dir}")
317
- fractal_ssh.remove_folder(
318
- folder=package_env_dir,
319
- safe_root=settings.FRACTAL_SLURM_SSH_WORKING_BASE_DIR,
320
- )
321
- logger.info(f"Deleted remoted folder {package_env_dir}")
322
- except Exception as e:
323
- logger.error(
324
- f"Deleting remote folder failed.\n"
325
- f"Original error:\n{str(e)}"
326
- )
324
+ if remove_venv_folder_upon_failure:
325
+ try:
326
+ logger.info(
327
+ f"Now delete remote folder {package_env_dir}"
328
+ )
329
+ fractal_ssh.remove_folder(
330
+ folder=package_env_dir,
331
+ safe_root=settings.FRACTAL_SLURM_SSH_WORKING_BASE_DIR, # noqa: E501
332
+ )
333
+ logger.info(
334
+ f"Deleted remoted folder {package_env_dir}"
335
+ )
336
+ except Exception as e:
337
+ logger.error(
338
+ f"Removing remote folder failed.\n"
339
+ f"Original error:\n{str(e)}"
340
+ )
341
+ else:
342
+ logger.info(
343
+ "Not trying to remove remote folder "
344
+ f"{package_env_dir}."
345
+ )
327
346
  return
@@ -12,12 +12,12 @@ PYTHON=__PYTHON__
12
12
 
13
13
  TIME_START=$(date +%s)
14
14
 
15
-
16
- # Create main folder
15
+ # Check that package folder does not exist
17
16
  if [ -d "$PACKAGE_ENV_DIR" ]; then
18
17
  write_log "ERROR: Folder $PACKAGE_ENV_DIR already exists. Exit."
19
18
  exit 1
20
19
  fi
20
+
21
21
  write_log "START mkdir -p $PACKAGE_ENV_DIR"
22
22
  mkdir -p $PACKAGE_ENV_DIR
23
23
  write_log "END mkdir -p $PACKAGE_ENV_DIR"
@@ -7,10 +7,6 @@ write_log(){
7
7
 
8
8
  # Variables to be filled within fractal-server
9
9
  PACKAGE_ENV_DIR=__PACKAGE_ENV_DIR__
10
- PACKAGE_NAME=__PACKAGE_NAME__
11
- PACKAGE=__PACKAGE__
12
- PYTHON=__PYTHON__
13
- INSTALL_STRING=__INSTALL_STRING__
14
10
 
15
11
  TIME_START=$(date +%s)
16
12
 
@@ -8,12 +8,8 @@ write_log(){
8
8
 
9
9
  # Variables to be filled within fractal-server
10
10
  PACKAGE_ENV_DIR=__PACKAGE_ENV_DIR__
11
- PACKAGE_NAME=__PACKAGE_NAME__
12
- PACKAGE=__PACKAGE__
13
- PYTHON=__PYTHON__
14
11
  INSTALL_STRING=__INSTALL_STRING__
15
12
 
16
-
17
13
  TIME_START=$(date +%s)
18
14
 
19
15
  VENVPYTHON=${PACKAGE_ENV_DIR}/bin/python
@@ -9,12 +9,6 @@ write_log(){
9
9
 
10
10
  # Variables to be filled within fractal-server
11
11
  PACKAGE_ENV_DIR=__PACKAGE_ENV_DIR__
12
- PACKAGE_NAME=__PACKAGE_NAME__
13
- PACKAGE=__PACKAGE__
14
- PYTHON=__PYTHON__
15
- INSTALL_STRING=__INSTALL_STRING__
16
-
17
-
18
12
 
19
13
  VENVPYTHON=${PACKAGE_ENV_DIR}/bin/python
20
14
 
@@ -9,9 +9,7 @@ write_log(){
9
9
  # Variables to be filled within fractal-server
10
10
  PACKAGE_ENV_DIR=__PACKAGE_ENV_DIR__
11
11
  PACKAGE_NAME=__PACKAGE_NAME__
12
- PACKAGE=__PACKAGE__
13
- PYTHON=__PYTHON__
14
- INSTALL_STRING=__INSTALL_STRING__
12
+
15
13
 
16
14
 
17
15
  TIME_START=$(date +%s)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "fractal-server"
3
- version = "2.3.1a0"
3
+ version = "2.3.3"
4
4
  description = "Server component of the Fractal analytics platform"
5
5
  authors = [
6
6
  "Tommaso Comparin <tommaso.comparin@exact-lab.it>",
@@ -91,7 +91,7 @@ filterwarnings = [
91
91
  ]
92
92
 
93
93
  [tool.bumpver]
94
- current_version = "2.3.1a0"
94
+ current_version = "2.3.3"
95
95
  version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
96
96
  commit_message = "bump version {old_version} -> {new_version}"
97
97
  commit = true
@@ -1 +0,0 @@
1
- __VERSION__ = "2.3.1a0"
File without changes