fractal-server 2.6.0a1__tar.gz → 2.6.2__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 (221) hide show
  1. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/PKG-INFO +1 -1
  2. fractal_server-2.6.2/fractal_server/__init__.py +1 -0
  3. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/security.py +0 -6
  4. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/_validators.py +7 -2
  5. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/user_settings.py +12 -6
  6. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/task_collection.py +5 -4
  7. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/config.py +0 -19
  8. fractal_server-2.6.2/fractal_server/migrations/versions/94a47ea2d3ff_remove_cache_dir_slurm_user_and_slurm_.py +52 -0
  9. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/ssh/_fabric.py +14 -14
  10. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/string_tools.py +2 -0
  11. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/pyproject.toml +2 -2
  12. fractal_server-2.6.0a1/fractal_server/__init__.py +0 -1
  13. fractal_server-2.6.0a1/fractal_server/data_migrations/2_6_0.py +0 -49
  14. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/LICENSE +0 -0
  15. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/README.md +0 -0
  16. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/__main__.py +0 -0
  17. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/alembic.ini +0 -0
  18. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/__init__.py +0 -0
  19. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/db/__init__.py +0 -0
  20. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/__init__.py +0 -0
  21. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/linkusergroup.py +0 -0
  22. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/linkuserproject.py +0 -0
  23. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/user_settings.py +0 -0
  24. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v1/__init__.py +0 -0
  25. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v1/dataset.py +0 -0
  26. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v1/job.py +0 -0
  27. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v1/project.py +0 -0
  28. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v1/state.py +0 -0
  29. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v1/task.py +0 -0
  30. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v1/workflow.py +0 -0
  31. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v2/__init__.py +0 -0
  32. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v2/collection_state.py +0 -0
  33. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v2/dataset.py +0 -0
  34. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v2/job.py +0 -0
  35. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v2/project.py +0 -0
  36. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v2/task.py +0 -0
  37. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v2/workflow.py +0 -0
  38. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/models/v2/workflowtask.py +0 -0
  39. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/__init__.py +0 -0
  40. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/admin/__init__.py +0 -0
  41. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/admin/v1.py +0 -0
  42. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/admin/v2.py +0 -0
  43. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/__init__.py +0 -0
  44. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v1/__init__.py +0 -0
  45. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v1/_aux_functions.py +0 -0
  46. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v1/dataset.py +0 -0
  47. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v1/job.py +0 -0
  48. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v1/project.py +0 -0
  49. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v1/task.py +0 -0
  50. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v1/task_collection.py +0 -0
  51. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v1/workflow.py +0 -0
  52. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v1/workflowtask.py +0 -0
  53. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/__init__.py +0 -0
  54. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/_aux_functions.py +0 -0
  55. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/dataset.py +0 -0
  56. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/images.py +0 -0
  57. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/job.py +0 -0
  58. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/project.py +0 -0
  59. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/status.py +0 -0
  60. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/submit.py +0 -0
  61. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/task.py +0 -0
  62. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/task_collection.py +0 -0
  63. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/task_collection_custom.py +0 -0
  64. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/workflow.py +0 -0
  65. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/api/v2/workflowtask.py +0 -0
  66. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/__init__.py +0 -0
  67. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/_aux_auth.py +0 -0
  68. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/current_user.py +0 -0
  69. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/group.py +0 -0
  70. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/group_names.py +0 -0
  71. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/login.py +0 -0
  72. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/oauth.py +0 -0
  73. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/register.py +0 -0
  74. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/router.py +0 -0
  75. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/auth/users.py +0 -0
  76. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/aux/__init__.py +0 -0
  77. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/aux/_job.py +0 -0
  78. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/aux/_runner.py +0 -0
  79. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/routes/aux/validate_user_settings.py +0 -0
  80. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/.gitignore +0 -0
  81. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/__init__.py +0 -0
  82. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/async_wrap.py +0 -0
  83. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/components.py +0 -0
  84. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/compress_folder.py +0 -0
  85. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/exceptions.py +0 -0
  86. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/__init__.py +0 -0
  87. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/__init__.py +0 -0
  88. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/_batching.py +0 -0
  89. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/_slurm_config.py +0 -0
  90. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/remote.py +0 -0
  91. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/ssh/__init__.py +0 -0
  92. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/ssh/_executor_wait_thread.py +0 -0
  93. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/ssh/_slurm_job.py +0 -0
  94. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/ssh/executor.py +0 -0
  95. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/sudo/__init__.py +0 -0
  96. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/sudo/_check_jobs_status.py +0 -0
  97. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/sudo/_executor_wait_thread.py +0 -0
  98. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/sudo/_subprocess_run_as_user.py +0 -0
  99. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/executors/slurm/sudo/executor.py +0 -0
  100. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/extract_archive.py +0 -0
  101. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/filenames.py +0 -0
  102. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/run_subprocess.py +0 -0
  103. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/set_start_and_last_task_index.py +0 -0
  104. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/shutdown.py +0 -0
  105. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/task_files.py +0 -0
  106. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/__init__.py +0 -0
  107. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/_common.py +0 -0
  108. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/_local/__init__.py +0 -0
  109. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/_local/_local_config.py +0 -0
  110. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/_local/_submit_setup.py +0 -0
  111. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/_local/executor.py +0 -0
  112. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/_slurm/__init__.py +0 -0
  113. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/_slurm/_submit_setup.py +0 -0
  114. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/_slurm/get_slurm_config.py +0 -0
  115. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/common.py +0 -0
  116. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v1/handle_failed_job.py +0 -0
  117. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/__init__.py +0 -0
  118. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_local/__init__.py +0 -0
  119. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_local/_local_config.py +0 -0
  120. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_local/_submit_setup.py +0 -0
  121. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_local/executor.py +0 -0
  122. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_local_experimental/__init__.py +0 -0
  123. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_local_experimental/_local_config.py +0 -0
  124. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_local_experimental/_submit_setup.py +0 -0
  125. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_local_experimental/executor.py +0 -0
  126. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_slurm_common/__init__.py +0 -0
  127. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_slurm_common/get_slurm_config.py +0 -0
  128. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_slurm_ssh/__init__.py +0 -0
  129. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_slurm_ssh/_submit_setup.py +0 -0
  130. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_slurm_sudo/__init__.py +0 -0
  131. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/_slurm_sudo/_submit_setup.py +0 -0
  132. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/deduplicate_list.py +0 -0
  133. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/handle_failed_job.py +0 -0
  134. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/merge_outputs.py +0 -0
  135. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/runner.py +0 -0
  136. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/runner_functions.py +0 -0
  137. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/runner_functions_low_level.py +0 -0
  138. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/v2/task_interface.py +0 -0
  139. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/runner/versions.py +0 -0
  140. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/__init__.py +0 -0
  141. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/user.py +0 -0
  142. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/user_group.py +0 -0
  143. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/__init__.py +0 -0
  144. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/applyworkflow.py +0 -0
  145. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/dataset.py +0 -0
  146. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/dumps.py +0 -0
  147. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/manifest.py +0 -0
  148. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/project.py +0 -0
  149. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/state.py +0 -0
  150. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/task.py +0 -0
  151. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/task_collection.py +0 -0
  152. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v1/workflow.py +0 -0
  153. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/__init__.py +0 -0
  154. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/dataset.py +0 -0
  155. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/dumps.py +0 -0
  156. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/job.py +0 -0
  157. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/manifest.py +0 -0
  158. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/project.py +0 -0
  159. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/status.py +0 -0
  160. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/task.py +0 -0
  161. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/workflow.py +0 -0
  162. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/schemas/v2/workflowtask.py +0 -0
  163. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/security/__init__.py +0 -0
  164. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/app/user_settings.py +0 -0
  165. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/data_migrations/README.md +0 -0
  166. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/data_migrations/tools.py +0 -0
  167. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/gunicorn_fractal.py +0 -0
  168. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/images/__init__.py +0 -0
  169. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/images/models.py +0 -0
  170. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/images/tools.py +0 -0
  171. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/logger.py +0 -0
  172. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/main.py +0 -0
  173. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/README +0 -0
  174. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/env.py +0 -0
  175. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/naming_convention.py +0 -0
  176. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/script.py.mako +0 -0
  177. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/091b01f51f88_add_usergroup_and_linkusergroup_table.py +0 -0
  178. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/4c308bcaea2b_add_task_args_schema_and_task_args_.py +0 -0
  179. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/4cedeb448a53_workflowtask_foreign_keys_not_nullables.py +0 -0
  180. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/501961cfcd85_remove_link_between_v1_and_v2_tasks_.py +0 -0
  181. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/50a13d6138fd_initial_schema.py +0 -0
  182. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/5bf02391cfef_v2.py +0 -0
  183. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/70e77f1c38b0_add_applyworkflow_first_task_index_and_.py +0 -0
  184. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/71eefd1dd202_add_slurm_accounts.py +0 -0
  185. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/84bf0fffde30_add_dumps_to_applyworkflow.py +0 -0
  186. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/8f79bd162e35_add_docs_info_and_docs_link_to_task_.py +0 -0
  187. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/97f444d47249_add_applyworkflow_project_dump.py +0 -0
  188. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/99ea79d9e5d2_add_dataset_history.py +0 -0
  189. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/9c5ae74c9b98_add_user_settings_table.py +0 -0
  190. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/9fd26a2b0de4_add_workflow_timestamp_created.py +0 -0
  191. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/a7f4d6137b53_add_workflow_dump_to_applyworkflow.py +0 -0
  192. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/d4fe3708d309_make_applyworkflow_workflow_dump_non_.py +0 -0
  193. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/e75cac726012_make_applyworkflow_start_timestamp_not_.py +0 -0
  194. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/efa89c30e0a4_add_project_timestamp_created.py +0 -0
  195. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/migrations/versions/f384e1c0cf5d_drop_task_default_args_columns.py +0 -0
  196. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/py.typed +0 -0
  197. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/ssh/__init__.py +0 -0
  198. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/syringe.py +0 -0
  199. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/__init__.py +0 -0
  200. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/utils.py +0 -0
  201. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v1/_TaskCollectPip.py +0 -0
  202. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v1/__init__.py +0 -0
  203. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v1/background_operations.py +0 -0
  204. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v1/endpoint_operations.py +0 -0
  205. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v1/get_collection_data.py +0 -0
  206. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v1/utils.py +0 -0
  207. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/_TaskCollectPip.py +0 -0
  208. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/__init__.py +0 -0
  209. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/_venv_pip.py +0 -0
  210. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/background_operations.py +0 -0
  211. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/background_operations_ssh.py +0 -0
  212. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/endpoint_operations.py +0 -0
  213. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/templates/_1_create_venv.sh +0 -0
  214. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/templates/_2_upgrade_pip.sh +0 -0
  215. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/templates/_3_pip_install.sh +0 -0
  216. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/templates/_4_pip_freeze.sh +0 -0
  217. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/templates/_5_pip_show.sh +0 -0
  218. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/tasks/v2/utils.py +0 -0
  219. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/urls.py +0 -0
  220. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/utils.py +0 -0
  221. {fractal_server-2.6.0a1 → fractal_server-2.6.2}/fractal_server/zip_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fractal-server
3
- Version: 2.6.0a1
3
+ Version: 2.6.2
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.6.2"
@@ -15,7 +15,6 @@ from typing import Optional
15
15
  from pydantic import EmailStr
16
16
  from sqlalchemy import Column
17
17
  from sqlalchemy.types import DateTime
18
- from sqlalchemy.types import JSON
19
18
  from sqlmodel import Field
20
19
  from sqlmodel import Relationship
21
20
  from sqlmodel import SQLModel
@@ -93,11 +92,6 @@ class UserOAuth(SQLModel, table=True):
93
92
  is_superuser: bool = Field(False, nullable=False)
94
93
  is_verified: bool = Field(False, nullable=False)
95
94
 
96
- slurm_user: Optional[str]
97
- slurm_accounts: list[str] = Field(
98
- sa_column=Column(JSON, server_default="[]", nullable=False)
99
- )
100
- cache_dir: Optional[str]
101
95
  username: Optional[str]
102
96
 
103
97
  oauth_accounts: list["OAuthAccount"] = Relationship(
@@ -69,14 +69,19 @@ def valint(attribute: str, min_val: int = 1):
69
69
  return val
70
70
 
71
71
 
72
- def val_absolute_path(attribute: str):
72
+ def val_absolute_path(attribute: str, accept_none: bool = False):
73
73
  """
74
74
  Check that a string attribute is an absolute path
75
75
  """
76
76
 
77
77
  def val(string: Optional[str]) -> str:
78
78
  if string is None:
79
- raise ValueError(f"String attribute '{attribute}' cannot be None")
79
+ if accept_none:
80
+ return string
81
+ else:
82
+ raise ValueError(
83
+ f"String attribute '{attribute}' cannot be None"
84
+ )
80
85
  s = string.strip()
81
86
  if not s:
82
87
  raise ValueError(f"String attribute '{attribute}' cannot be empty")
@@ -47,23 +47,25 @@ class UserSettingsUpdate(BaseModel, extra=Extra.forbid):
47
47
  slurm_accounts: Optional[list[StrictStr]] = None
48
48
  cache_dir: Optional[str] = None
49
49
 
50
- _ssh_host = validator("ssh_host", allow_reuse=True)(valstr("ssh_host"))
50
+ _ssh_host = validator("ssh_host", allow_reuse=True)(
51
+ valstr("ssh_host", accept_none=True)
52
+ )
51
53
  _ssh_username = validator("ssh_username", allow_reuse=True)(
52
- valstr("ssh_username")
54
+ valstr("ssh_username", accept_none=True)
53
55
  )
54
56
  _ssh_private_key_path = validator(
55
57
  "ssh_private_key_path", allow_reuse=True
56
- )(val_absolute_path("ssh_private_key_path"))
58
+ )(val_absolute_path("ssh_private_key_path", accept_none=True))
57
59
 
58
60
  _ssh_tasks_dir = validator("ssh_tasks_dir", allow_reuse=True)(
59
- val_absolute_path("ssh_tasks_dir")
61
+ val_absolute_path("ssh_tasks_dir", accept_none=True)
60
62
  )
61
63
  _ssh_jobs_dir = validator("ssh_jobs_dir", allow_reuse=True)(
62
- val_absolute_path("ssh_jobs_dir")
64
+ val_absolute_path("ssh_jobs_dir", accept_none=True)
63
65
  )
64
66
 
65
67
  _slurm_user = validator("slurm_user", allow_reuse=True)(
66
- valstr("slurm_user")
68
+ valstr("slurm_user", accept_none=True)
67
69
  )
68
70
 
69
71
  @validator("slurm_accounts")
@@ -76,6 +78,8 @@ class UserSettingsUpdate(BaseModel, extra=Extra.forbid):
76
78
 
77
79
  @validator("cache_dir")
78
80
  def cache_dir_validator(cls, value):
81
+ if value is None:
82
+ return None
79
83
  validate_cmd(value)
80
84
  return val_absolute_path("cache_dir")(value)
81
85
 
@@ -90,5 +94,7 @@ class UserSettingsUpdateStrict(BaseModel, extra=Extra.forbid):
90
94
 
91
95
  @validator("cache_dir")
92
96
  def cache_dir_validator(cls, value):
97
+ if value is None:
98
+ return value
93
99
  validate_cmd(value)
94
100
  return val_absolute_path("cache_dir")(value)
@@ -13,6 +13,7 @@ from .._validators import valdictkeys
13
13
  from .._validators import valstr
14
14
  from fractal_server.app.schemas._validators import valutc
15
15
  from fractal_server.app.schemas.v2 import ManifestV2
16
+ from fractal_server.string_tools import validate_cmd
16
17
 
17
18
 
18
19
  class CollectionStatusV2(str, Enum):
@@ -144,13 +145,13 @@ class TaskCollectCustomV2(BaseModel):
144
145
  return values
145
146
 
146
147
  @validator("package_name")
147
- def package_name_prevent_injection(cls, value: str):
148
+ def package_name_validator(cls, value: str):
148
149
  """
149
- Remove all whitespace characters, and reject values containing `;`.
150
+ Remove all whitespace characters, then check for invalid code.
150
151
  """
151
152
  if value is not None:
152
- if ";" in value:
153
- raise ValueError(f"Invalid package_name: {value}")
153
+ validate_cmd(value)
154
+ value = valstr("package_name")(value)
154
155
  value = value.replace(" ", "")
155
156
  return value
156
157
 
@@ -512,25 +512,6 @@ class Settings(BaseSettings):
512
512
  `JobExecutionError`.
513
513
  """
514
514
 
515
- FRACTAL_SLURM_SSH_HOST: Optional[str] = None
516
- """
517
- SSH-reachable host where a SLURM client is available.
518
- """
519
- FRACTAL_SLURM_SSH_USER: Optional[str] = None
520
- """
521
- User on `FRACTAL_SLURM_SSH_HOST`.
522
- """
523
- FRACTAL_SLURM_SSH_PRIVATE_KEY_PATH: Optional[str] = None
524
- """
525
- Private key for connecting to `FRACTAL_SLURM_SSH_HOST` as
526
- `FRACTAL_SLURM_SSH_USER`.
527
- """
528
- # FIXME SSH: Split this into two folders (for tasks and for jobs)
529
- FRACTAL_SLURM_SSH_WORKING_BASE_DIR: Optional[str] = None
530
- """
531
- Remote folder on `FRACTAL_SLURM_SSH_HOST`.
532
- """
533
-
534
515
  FRACTAL_API_SUBMIT_RATE_LIMIT: int = 2
535
516
  """
536
517
  Interval to wait (in seconds) to be allowed to call again
@@ -0,0 +1,52 @@
1
+ """remove cache_dir slurm_user and slurm_accounts from user
2
+
3
+ Revision ID: 94a47ea2d3ff
4
+ Revises: 9c5ae74c9b98
5
+ Create Date: 2024-09-25 09:33:18.014831
6
+
7
+ """
8
+ import sqlalchemy as sa
9
+ from alembic import op
10
+ from sqlalchemy.dialects import postgresql
11
+
12
+ # revision identifiers, used by Alembic.
13
+ revision = "94a47ea2d3ff"
14
+ down_revision = "9c5ae74c9b98"
15
+ branch_labels = None
16
+ depends_on = None
17
+
18
+
19
+ def upgrade() -> None:
20
+ # ### commands auto generated by Alembic - please adjust! ###
21
+ with op.batch_alter_table("user_oauth", schema=None) as batch_op:
22
+ batch_op.drop_column("slurm_user")
23
+ batch_op.drop_column("slurm_accounts")
24
+ batch_op.drop_column("cache_dir")
25
+
26
+ # ### end Alembic commands ###
27
+
28
+
29
+ def downgrade() -> None:
30
+ # ### commands auto generated by Alembic - please adjust! ###
31
+ with op.batch_alter_table("user_oauth", schema=None) as batch_op:
32
+ batch_op.add_column(
33
+ sa.Column(
34
+ "cache_dir", sa.VARCHAR(), autoincrement=False, nullable=True
35
+ )
36
+ )
37
+ batch_op.add_column(
38
+ sa.Column(
39
+ "slurm_accounts",
40
+ postgresql.JSON(astext_type=sa.Text()),
41
+ server_default=sa.text("'[]'::json"),
42
+ autoincrement=False,
43
+ nullable=False,
44
+ )
45
+ )
46
+ batch_op.add_column(
47
+ sa.Column(
48
+ "slurm_user", sa.VARCHAR(), autoincrement=False, nullable=True
49
+ )
50
+ )
51
+
52
+ # ### end Alembic commands ###
@@ -305,21 +305,21 @@ class FractalSSH(object):
305
305
  safe_root: If `folder` is not a subfolder of the absolute
306
306
  `safe_root` path, raise an error.
307
307
  """
308
- invalid_characters = {" ", "\n", ";", "$", "`"}
309
-
310
- if (
311
- not isinstance(folder, str)
312
- or not isinstance(safe_root, str)
313
- or len(invalid_characters.intersection(folder)) > 0
314
- or len(invalid_characters.intersection(safe_root)) > 0
315
- or not Path(folder).is_absolute()
316
- or not Path(safe_root).is_absolute()
317
- or not Path(folder).resolve().is_relative_to(safe_root)
308
+ validate_cmd(folder)
309
+ validate_cmd(safe_root)
310
+
311
+ if " " in folder:
312
+ raise ValueError(f"folder='{folder}' includes whitespace.")
313
+ elif " " in safe_root:
314
+ raise ValueError(f"safe_root='{safe_root}' includes whitespace.")
315
+ elif not Path(folder).is_absolute():
316
+ raise ValueError(f"{folder=} is not an absolute path.")
317
+ elif not Path(safe_root).is_absolute():
318
+ raise ValueError(f"{safe_root=} is not an absolute path.")
319
+ elif not (
320
+ Path(folder).resolve().is_relative_to(Path(safe_root).resolve())
318
321
  ):
319
- raise ValueError(
320
- f"{folder=} argument is invalid or it is not "
321
- f"relative to {safe_root=}."
322
- )
322
+ raise ValueError(f"{folder=} is not a subfolder of {safe_root=}.")
323
323
  else:
324
324
  cmd = f"rm -r {folder}"
325
325
  self.run_command(cmd=cmd)
@@ -60,6 +60,8 @@ def validate_cmd(command: str, allow_char: Optional[str] = None):
60
60
  command: command to validate.
61
61
  allow_char: chars to accept among the forbidden ones
62
62
  """
63
+ if not isinstance(command, str):
64
+ raise ValueError(f"{command=} is not a string.")
63
65
  forbidden = set(__NOT_ALLOWED_FOR_COMMANDS__)
64
66
  if allow_char is not None:
65
67
  forbidden = forbidden - set(allow_char)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "fractal-server"
3
- version = "2.6.0a1"
3
+ version = "2.6.2"
4
4
  description = "Server component of the Fractal analytics platform"
5
5
  authors = [
6
6
  "Tommaso Comparin <tommaso.comparin@exact-lab.it>",
@@ -92,7 +92,7 @@ filterwarnings = [
92
92
  ]
93
93
 
94
94
  [tool.bumpver]
95
- current_version = "2.6.0a1"
95
+ current_version = "2.6.2"
96
96
  version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
97
97
  commit_message = "bump version {old_version} -> {new_version}"
98
98
  commit = true
@@ -1 +0,0 @@
1
- __VERSION__ = "2.6.0a1"
@@ -1,49 +0,0 @@
1
- import logging
2
-
3
- from sqlalchemy import select
4
-
5
- from fractal_server.app.db import get_sync_db
6
- from fractal_server.app.models import UserOAuth
7
- from fractal_server.app.models import UserSettings
8
- from fractal_server.config import get_settings
9
- from fractal_server.data_migrations.tools import _check_current_version
10
- from fractal_server.syringe import Inject
11
-
12
-
13
- def fix_db():
14
- logger = logging.getLogger("fix_db")
15
- logger.warning("START execution of fix_db function")
16
- _check_current_version("2.6.0")
17
-
18
- global_settings = Inject(get_settings)
19
-
20
- with next(get_sync_db()) as db:
21
- users = db.execute(select(UserOAuth)).scalars().unique().all()
22
- for user in sorted(users, key=lambda x: x.id):
23
- logger.warning(f"START handling user {user.id}: '{user.email}'")
24
- user_settings = UserSettings(
25
- # SSH
26
- ssh_host=global_settings.FRACTAL_SLURM_SSH_HOST,
27
- ssh_username=global_settings.FRACTAL_SLURM_SSH_USER,
28
- ssh_private_key_path=(
29
- global_settings.FRACTAL_SLURM_SSH_PRIVATE_KEY_PATH
30
- ),
31
- ssh_tasks_dir=(
32
- global_settings.FRACTAL_SLURM_SSH_WORKING_BASE_DIR
33
- ),
34
- ssh_jobs_dir=(
35
- global_settings.FRACTAL_SLURM_SSH_WORKING_BASE_DIR
36
- ),
37
- # SUDO
38
- slurm_user=user.slurm_user,
39
- slurm_accounts=user.slurm_accounts,
40
- cache_dir=user.cache_dir,
41
- )
42
- user.settings = user_settings
43
- db.add(user)
44
- db.commit()
45
- db.refresh(user)
46
- logger.warning(f"New user {user.id} settings:\n{user.settings}")
47
- logger.warning(f"END handling user {user.id}: '{user.email}'")
48
-
49
- logger.warning("END of execution of fix_db function")
File without changes