latch 2.41.3.dev1__tar.gz → 2.41.3.dev2__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 (184) hide show
  1. {latch-2.41.3.dev1/latch.egg-info → latch-2.41.3.dev2}/PKG-INFO +1 -1
  2. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/resources/tasks.py +40 -36
  3. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/types/directory.py +2 -0
  4. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/types/metadata.py +31 -0
  5. {latch-2.41.3.dev1 → latch-2.41.3.dev2/latch.egg-info}/PKG-INFO +1 -1
  6. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch.egg-info/SOURCES.txt +1 -11
  7. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/centromere/ctx.py +1 -1
  8. latch-2.41.3.dev2/latch_cli/nextflow/utils.py +27 -0
  9. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/nextflow/workflow.py +78 -25
  10. latch-2.41.3.dev2/latch_cli/services/init/__pycache__/__init__.cpython-310.pyc +0 -0
  11. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/__pycache__/init.cpython-310.pyc +0 -0
  12. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/setup.py +1 -1
  13. latch-2.41.3.dev1/latch_cli/services/init/__pycache__/__init__.cpython-310.pyc +0 -0
  14. latch-2.41.3.dev1/latch_cli/services/init/__pycache__/__init__.cpython-311.pyc +0 -0
  15. latch-2.41.3.dev1/latch_cli/services/init/__pycache__/__init__.cpython-38.pyc +0 -0
  16. latch-2.41.3.dev1/latch_cli/services/init/__pycache__/__init__.cpython-39.pyc +0 -0
  17. latch-2.41.3.dev1/latch_cli/services/init/__pycache__/init.cpython-311.pyc +0 -0
  18. latch-2.41.3.dev1/latch_cli/services/init/__pycache__/init.cpython-38.pyc +0 -0
  19. latch-2.41.3.dev1/latch_cli/services/init/__pycache__/init.cpython-39.pyc +0 -0
  20. latch-2.41.3.dev1/latch_cli/services/init/assemble_and_sort/__pycache__/__init__.cpython-310.pyc +0 -0
  21. latch-2.41.3.dev1/latch_cli/services/init/example_conda/__pycache__/__init__.cpython-310.pyc +0 -0
  22. latch-2.41.3.dev1/latch_cli/services/init/example_nf_integration/latch_metadata/__pycache__/__init__.cpython-311.pyc +0 -0
  23. latch-2.41.3.dev1/latch_cli/services/init/example_r/__pycache__/__init__.cpython-310.pyc +0 -0
  24. latch-2.41.3.dev1/latch_cli/services/init/template/__pycache__/__init__.cpython-310.pyc +0 -0
  25. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/LICENSE +0 -0
  26. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/MANIFEST.in +0 -0
  27. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/README.md +0 -0
  28. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/__init__.py +0 -0
  29. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/account.py +0 -0
  30. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/executions.py +0 -0
  31. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/functions/__init__.py +0 -0
  32. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/functions/messages.py +0 -0
  33. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/functions/operators.py +0 -0
  34. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/functions/secrets.py +0 -0
  35. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/__init__.py +0 -0
  36. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/_transfer/__init__.py +0 -0
  37. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/_transfer/download.py +0 -0
  38. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/_transfer/manager.py +0 -0
  39. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/_transfer/node.py +0 -0
  40. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/_transfer/progress.py +0 -0
  41. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/_transfer/remote_copy.py +0 -0
  42. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/_transfer/throttle.py +0 -0
  43. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/_transfer/upload.py +0 -0
  44. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/_transfer/utils.py +0 -0
  45. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/path.py +0 -0
  46. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/ldata/type.py +0 -0
  47. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/registry/__init__.py +0 -0
  48. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/registry/project.py +0 -0
  49. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/registry/record.py +0 -0
  50. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/registry/table.py +0 -0
  51. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/registry/types.py +0 -0
  52. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/registry/upstream_types/__init__.py +0 -0
  53. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/registry/upstream_types/types.py +0 -0
  54. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/registry/upstream_types/values.py +0 -0
  55. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/registry/utils.py +0 -0
  56. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/resources/__init__.py +0 -0
  57. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/resources/conditional.py +0 -0
  58. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/resources/dynamic.py +0 -0
  59. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/resources/launch_plan.py +0 -0
  60. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/resources/map_tasks.py +0 -0
  61. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/resources/reference_workflow.py +0 -0
  62. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/resources/workflow.py +0 -0
  63. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/types/__init__.py +0 -0
  64. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/types/file.py +0 -0
  65. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/types/glob.py +0 -0
  66. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/types/json.py +0 -0
  67. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/types/utils.py +0 -0
  68. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/utils.py +0 -0
  69. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/verified/__init__.py +0 -0
  70. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/verified/deseq2.py +0 -0
  71. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/verified/mafft.py +0 -0
  72. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/verified/pathway.py +0 -0
  73. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/verified/rnaseq.py +0 -0
  74. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch/verified/trim_galore.py +0 -0
  75. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch.egg-info/dependency_links.txt +0 -0
  76. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch.egg-info/entry_points.txt +0 -0
  77. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch.egg-info/requires.txt +0 -0
  78. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch.egg-info/top_level.txt +0 -0
  79. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/__init__.py +0 -0
  80. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/auth/__init__.py +0 -0
  81. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/auth/csrf.py +0 -0
  82. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/auth/oauth2.py +0 -0
  83. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/auth/pkce.py +0 -0
  84. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/auth/utils.py +0 -0
  85. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/centromere/__init__.py +0 -0
  86. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/centromere/utils.py +0 -0
  87. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/click_utils.py +0 -0
  88. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/constants.py +0 -0
  89. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/docker_utils/__init__.py +0 -0
  90. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/exceptions/__init__.py +0 -0
  91. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/exceptions/cache.py +0 -0
  92. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/exceptions/errors.py +0 -0
  93. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/exceptions/handler.py +0 -0
  94. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/exceptions/traceback.py +0 -0
  95. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/main.py +0 -0
  96. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/menus.py +0 -0
  97. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/nextflow/__init__.py +0 -0
  98. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/nextflow/dependencies.py +0 -0
  99. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/__init__.py +0 -0
  100. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/cp/__init__.py +0 -0
  101. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/cp/autocomplete.py +0 -0
  102. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/cp/glob.py +0 -0
  103. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/cp/main.py +0 -0
  104. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/cp/utils.py +0 -0
  105. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/execute/__init__.py +0 -0
  106. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/execute/main.py +0 -0
  107. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/execute/utils.py +0 -0
  108. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/get.py +0 -0
  109. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/get_executions.py +0 -0
  110. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/get_params.py +0 -0
  111. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/__init__.py +0 -0
  112. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/assemble_and_sort/.env +0 -0
  113. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/assemble_and_sort/LICENSE +0 -0
  114. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/assemble_and_sort/README.md +0 -0
  115. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/assemble_and_sort/__init__.py +0 -0
  116. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/assemble_and_sort/assemble.py +0 -0
  117. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/assemble_and_sort/sort.py +0 -0
  118. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/assemble_and_sort/system-requirements.txt +0 -0
  119. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/common/.dockerignore +0 -0
  120. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_conda/__init__.py +0 -0
  121. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_conda/conda_task.py +0 -0
  122. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_conda/environment.yaml +0 -0
  123. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_docker/__init__.py +0 -0
  124. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_docker/task.py +0 -0
  125. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_nfcore/Dockerfile +0 -0
  126. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_nfcore/__init__.py +0 -0
  127. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_nfcore/task.py +0 -0
  128. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_r/__init__.py +0 -0
  129. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_r/environment.R +0 -0
  130. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_r/r_task.py +0 -0
  131. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_snakemake/.latch/latch_entrypoint +0 -0
  132. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_snakemake/Dockerfile +0 -0
  133. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_snakemake/Snakefile +0 -0
  134. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_snakemake/config.yaml +0 -0
  135. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_snakemake/environment.yaml +0 -0
  136. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_snakemake/latch_metadata.py +0 -0
  137. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_snakemake/scripts/plot-quals.py +0 -0
  138. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/example_snakemake/version +0 -0
  139. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/init.py +0 -0
  140. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/template/LICENSE +0 -0
  141. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/template/README.md +0 -0
  142. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/template/__init__.py +0 -0
  143. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/init/template/task.py +0 -0
  144. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/launch.py +0 -0
  145. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/local_dev.py +0 -0
  146. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/local_dev_old.py +0 -0
  147. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/login.py +0 -0
  148. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/ls.py +0 -0
  149. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/mkdir.py +0 -0
  150. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/move.py +0 -0
  151. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/preview.py +0 -0
  152. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/register/__init__.py +0 -0
  153. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/register/constants.py +0 -0
  154. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/register/register.py +0 -0
  155. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/register/utils.py +0 -0
  156. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/rm.py +0 -0
  157. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/stop_pod.py +0 -0
  158. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/sync.py +0 -0
  159. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/test_data/__init__.py +0 -0
  160. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/test_data/ls.py +0 -0
  161. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/test_data/remove.py +0 -0
  162. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/test_data/upload.py +0 -0
  163. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/test_data/utils.py +0 -0
  164. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/services/workspace.py +0 -0
  165. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/snakemake/__init__.py +0 -0
  166. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/snakemake/config/__init__.py +0 -0
  167. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/snakemake/config/parser.py +0 -0
  168. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/snakemake/config/utils.py +0 -0
  169. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/snakemake/serialize.py +0 -0
  170. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/snakemake/serialize_utils.py +0 -0
  171. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/snakemake/single_task_snakemake.py +0 -0
  172. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/snakemake/utils.py +0 -0
  173. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/snakemake/workflow.py +0 -0
  174. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/tinyrequests.py +0 -0
  175. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/tui/__init__.py +0 -0
  176. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/utils/__init__.py +0 -0
  177. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/utils/path.py +0 -0
  178. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/latch_cli/workflow_config.py +0 -0
  179. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/pyproject.toml +0 -0
  180. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/setup.cfg +0 -0
  181. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/tests/__init__.py +0 -0
  182. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/tests/cp/__init__.py +0 -0
  183. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/tests/fixtures.py +0 -0
  184. {latch-2.41.3.dev1 → latch-2.41.3.dev2}/tests/test_ls.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: latch
3
- Version: 2.41.3.dev1
3
+ Version: 2.41.3.dev2
4
4
  Summary: The Latch SDK
5
5
  Author-email: kenny@latch.bio
6
6
  Classifier: Programming Language :: Python :: 3.8
@@ -182,40 +182,6 @@ def _get_small_pod() -> Pod:
182
182
  )
183
183
 
184
184
 
185
- def _get_nextflow_runtime_pod() -> Pod:
186
- primary_container = V1Container(name="primary")
187
- resources = V1ResourceRequirements(
188
- requests={"cpu": "2", "memory": "4Gi", "ephemeral-storage": "100Gi"},
189
- limits={"cpu": "2", "memory": "4Gi", "ephemeral-storage": "100Gi"},
190
- )
191
- primary_container.resources = resources
192
- volume_mounts = [V1VolumeMount(mount_path="/nf-workdir", name="nextflow-workdir")]
193
- primary_container.volume_mounts = volume_mounts
194
-
195
- return Pod(
196
- annotations={
197
- "io.kubernetes.cri-o.userns-mode": (
198
- "private:uidmapping=0:1048576:65536;gidmapping=0:1048576:65536"
199
- )
200
- },
201
- pod_spec=V1PodSpec(
202
- runtime_class_name="sysbox-runc",
203
- service_account_name="rahul-test",
204
- containers=[primary_container],
205
- volumes=[
206
- V1Volume(
207
- name="nextflow-workdir",
208
- persistent_volume_claim=V1PersistentVolumeClaimVolumeSource(
209
- # this value will be injected by flytepropeller
210
- claim_name="nextflow-pvc-placeholder"
211
- ),
212
- )
213
- ],
214
- ),
215
- primary_container_name="primary",
216
- )
217
-
218
-
219
185
  large_gpu_task = functools.partial(task, task_config=_get_large_gpu_pod())
220
186
  """This task will get scheduled on a large GPU-enabled node.
221
187
 
@@ -351,8 +317,6 @@ small_task = functools.partial(task, task_config=_get_small_pod())
351
317
  - False
352
318
  """
353
319
 
354
- nextflow_runtime_task = functools.partial(task, task_config=_get_nextflow_runtime_pod())
355
-
356
320
 
357
321
  def custom_memory_optimized_task(cpu: int, memory: int):
358
322
  """Returns a custom task configuration requesting
@@ -530,3 +494,43 @@ def custom_task(
530
494
  return functools.partial(
531
495
  task, task_config=_custom_task_config(cpu, memory, storage_gib), timeout=timeout
532
496
  )
497
+
498
+
499
+ def nextflow_runtime_task(cpu: int, memory: int):
500
+ primary_container = V1Container(name="primary")
501
+ resources = V1ResourceRequirements(
502
+ requests={
503
+ "cpu": str(cpu),
504
+ "memory": f"{memory}Gi",
505
+ "ephemeral-storage": "20Gi",
506
+ },
507
+ limits={"cpu": str(cpu), "memory": f"{memory}Gi", "ephemeral-storage": "20Gi"},
508
+ )
509
+ primary_container.resources = resources
510
+ volume_mounts = [V1VolumeMount(mount_path="/nf-workdir", name="nextflow-workdir")]
511
+ primary_container.volume_mounts = volume_mounts
512
+
513
+ task_config = Pod(
514
+ annotations={
515
+ "io.kubernetes.cri-o.userns-mode": (
516
+ "private:uidmapping=0:1048576:65536;gidmapping=0:1048576:65536"
517
+ )
518
+ },
519
+ pod_spec=V1PodSpec(
520
+ runtime_class_name="sysbox-runc",
521
+ service_account_name="rahul-test",
522
+ containers=[primary_container],
523
+ volumes=[
524
+ V1Volume(
525
+ name="nextflow-workdir",
526
+ persistent_volume_claim=V1PersistentVolumeClaimVolumeSource(
527
+ # this value will be injected by flytepropeller
528
+ claim_name="nextflow-pvc-placeholder"
529
+ ),
530
+ )
531
+ ],
532
+ ),
533
+ primary_container_name="primary",
534
+ )
535
+
536
+ return functools.partial(task, task_config=task_config)
@@ -114,8 +114,10 @@ class LatchDir(FlyteDirectory):
114
114
  self._path_generated = False
115
115
 
116
116
  if is_valid_url(self.path) and remote_path is None:
117
+ self._raw_remote_path = path
117
118
  self._remote_directory = self.path
118
119
  else:
120
+ self._raw_remote_path = remote_path
119
121
  self._remote_directory = None if remote_path is None else str(remote_path)
120
122
 
121
123
  if kwargs.get("downloader") is not None:
@@ -483,6 +483,21 @@ class NextflowParameter(Generic[T], LatchParameter):
483
483
  self.type = Annotated[self.type, "samplesheet"]
484
484
 
485
485
 
486
+ @dataclass(frozen=True)
487
+ class NextflowRuntimeResources:
488
+ """Resources for Nextflow runtime tasks"""
489
+
490
+ cpus: Optional[int] = 4
491
+ """
492
+ Number of CPUs required for the task
493
+ """
494
+ memory: Optional[str] = 8
495
+ """
496
+ Memory required for the task (e.g. "1 GB")
497
+ """
498
+ storage_gib: Optional[int] = 100
499
+
500
+
486
501
  @dataclass
487
502
  class LatchMetadata:
488
503
  """Class for organizing workflow metadata
@@ -683,7 +698,23 @@ _snakemake_metadata: Optional[SnakemakeMetadata] = None
683
698
  @dataclass
684
699
  class NextflowMetadata(LatchMetadata):
685
700
  name: Optional[str] = None
701
+ """
702
+ Name of the workflow
703
+ """
686
704
  parameters: Dict[str, NextflowParameter] = field(default_factory=dict)
705
+ """
706
+ A dictionary mapping parameter names (strings) to `NextflowParameter` objects
707
+ """
708
+ runtime_resources: NextflowRuntimeResources = field(
709
+ default_factory=NextflowRuntimeResources
710
+ )
711
+ """
712
+ Resources (cpu/memory/storage) for Nextflow runtime task
713
+ """
714
+ output_dir: Optional[LatchDir] = None
715
+ """
716
+ Directory to dump Nextflow logs
717
+ """
687
718
 
688
719
  def __post_init__(self):
689
720
  if self.name is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: latch
3
- Version: 2.41.3.dev1
3
+ Version: 2.41.3.dev2
4
4
  Summary: The Latch SDK
5
5
  Author-email: kenny@latch.bio
6
6
  Classifier: Programming Language :: Python :: 3.8
@@ -82,6 +82,7 @@ latch_cli/exceptions/handler.py
82
82
  latch_cli/exceptions/traceback.py
83
83
  latch_cli/nextflow/__init__.py
84
84
  latch_cli/nextflow/dependencies.py
85
+ latch_cli/nextflow/utils.py
85
86
  latch_cli/nextflow/workflow.py
86
87
  latch_cli/services/__init__.py
87
88
  latch_cli/services/get.py
@@ -110,13 +111,7 @@ latch_cli/services/execute/utils.py
110
111
  latch_cli/services/init/__init__.py
111
112
  latch_cli/services/init/init.py
112
113
  latch_cli/services/init/__pycache__/__init__.cpython-310.pyc
113
- latch_cli/services/init/__pycache__/__init__.cpython-311.pyc
114
- latch_cli/services/init/__pycache__/__init__.cpython-38.pyc
115
- latch_cli/services/init/__pycache__/__init__.cpython-39.pyc
116
114
  latch_cli/services/init/__pycache__/init.cpython-310.pyc
117
- latch_cli/services/init/__pycache__/init.cpython-311.pyc
118
- latch_cli/services/init/__pycache__/init.cpython-38.pyc
119
- latch_cli/services/init/__pycache__/init.cpython-39.pyc
120
115
  latch_cli/services/init/assemble_and_sort/.env
121
116
  latch_cli/services/init/assemble_and_sort/LICENSE
122
117
  latch_cli/services/init/assemble_and_sort/README.md
@@ -124,22 +119,18 @@ latch_cli/services/init/assemble_and_sort/__init__.py
124
119
  latch_cli/services/init/assemble_and_sort/assemble.py
125
120
  latch_cli/services/init/assemble_and_sort/sort.py
126
121
  latch_cli/services/init/assemble_and_sort/system-requirements.txt
127
- latch_cli/services/init/assemble_and_sort/__pycache__/__init__.cpython-310.pyc
128
122
  latch_cli/services/init/common/.dockerignore
129
123
  latch_cli/services/init/example_conda/__init__.py
130
124
  latch_cli/services/init/example_conda/conda_task.py
131
125
  latch_cli/services/init/example_conda/environment.yaml
132
- latch_cli/services/init/example_conda/__pycache__/__init__.cpython-310.pyc
133
126
  latch_cli/services/init/example_docker/__init__.py
134
127
  latch_cli/services/init/example_docker/task.py
135
- latch_cli/services/init/example_nf_integration/latch_metadata/__pycache__/__init__.cpython-311.pyc
136
128
  latch_cli/services/init/example_nfcore/Dockerfile
137
129
  latch_cli/services/init/example_nfcore/__init__.py
138
130
  latch_cli/services/init/example_nfcore/task.py
139
131
  latch_cli/services/init/example_r/__init__.py
140
132
  latch_cli/services/init/example_r/environment.R
141
133
  latch_cli/services/init/example_r/r_task.py
142
- latch_cli/services/init/example_r/__pycache__/__init__.cpython-310.pyc
143
134
  latch_cli/services/init/example_snakemake/Dockerfile
144
135
  latch_cli/services/init/example_snakemake/Snakefile
145
136
  latch_cli/services/init/example_snakemake/config.yaml
@@ -152,7 +143,6 @@ latch_cli/services/init/template/LICENSE
152
143
  latch_cli/services/init/template/README.md
153
144
  latch_cli/services/init/template/__init__.py
154
145
  latch_cli/services/init/template/task.py
155
- latch_cli/services/init/template/__pycache__/__init__.cpython-310.pyc
156
146
  latch_cli/services/register/__init__.py
157
147
  latch_cli/services/register/constants.py
158
148
  latch_cli/services/register/register.py
@@ -258,7 +258,7 @@ class _CentromereCtx:
258
258
  click.secho(
259
259
  dedent("""
260
260
  Failed to register Nextflow workflow.
261
- Make sure the project root contains a `wf/__init__.py`
261
+ Make sure the project root contains a `latch_metadata/__init__.py`
262
262
  with a `NextflowMetadata` object defined.
263
263
  """),
264
264
  fg="red",
@@ -0,0 +1,27 @@
1
+ import os
2
+ from typing import Optional
3
+
4
+ import gql
5
+ from latch_sdk_gql.execute import execute
6
+
7
+
8
+ def _get_execution_name() -> Optional[str]:
9
+ token = os.environ.get("FLYTE_INTERNAL_EXECUTION_ID", None)
10
+ if token is None:
11
+ return None
12
+
13
+ res = execute(
14
+ gql.gql("""
15
+ query executionCreatorsByToken($token: String!) {
16
+ executionCreatorByToken(token: $token) {
17
+ flytedbId
18
+ info {
19
+ displayName
20
+ }
21
+ }
22
+ }
23
+ """),
24
+ {"token": token},
25
+ )["executionCreatorByToken"]
26
+
27
+ return res["info"]["displayName"]
@@ -2,7 +2,7 @@ import re
2
2
  from dataclasses import fields, is_dataclass
3
3
  from enum import Enum
4
4
  from pathlib import Path
5
- from typing import Any, List, Optional, Tuple, Type, TypeVar
5
+ from typing import Any, List, Optional, Tuple
6
6
 
7
7
  import click
8
8
 
@@ -11,27 +11,34 @@ from latch.types.directory import LatchDir
11
11
  from latch.types.file import LatchFile
12
12
  from latch_cli.snakemake.config.utils import get_preamble, type_repr
13
13
  from latch_cli.snakemake.utils import reindent
14
- from latch_cli.utils import identifier_from_str
14
+ from latch_cli.utils import identifier_from_str, urljoins
15
15
 
16
16
  template = """\
17
+ from dataclasses import dataclass
17
18
  from enum import Enum
18
19
  import os
19
20
  import subprocess
20
21
  import requests
22
+ import shutil
21
23
  from pathlib import Path
22
24
  import typing
23
25
  import typing_extensions
24
26
 
25
27
  from latch.resources.workflow import workflow
26
- from latch.resources.tasks import nextflow_runtime_task, small_task
28
+ from latch.resources.tasks import nextflow_runtime_task, custom_task
27
29
  from latch.types.file import LatchFile
28
30
  from latch.types.directory import LatchDir, LatchOutputDir
31
+ from latch.ldata.path import LPath
29
32
  from latch_cli.nextflow.workflow import get_flag
33
+ from latch_cli.nextflow.utils import _get_execution_name
34
+ from latch_cli.utils import urljoins
30
35
  from latch.types import metadata
31
36
  from flytekit.core.annotation import FlyteAnnotation
32
37
 
38
+ import latch_metadata
33
39
 
34
- @small_task
40
+
41
+ @custom_task(cpu=0.25, memory=0.5, storage_gib=1)
35
42
  def initialize() -> str:
36
43
  token = os.environ.get("FLYTE_INTERNAL_EXECUTION_ID")
37
44
  if token is None:
@@ -42,36 +49,70 @@ def initialize() -> str:
42
49
  resp = requests.post(
43
50
  "http://nf-dispatcher-service.flyte.svc.cluster.local/provision-storage",
44
51
  headers=headers,
52
+ json={{
53
+ "storage_gib": {storage_gib},
54
+ }}
45
55
  )
46
56
  resp.raise_for_status()
47
- print("Done.")
48
57
  return resp.json()["name"]
49
58
 
50
59
 
51
60
  {preambles}
52
61
 
53
62
 
54
- @nextflow_runtime_task
63
+ @nextflow_runtime_task(cpu={cpu}, memory={memory})
55
64
  def nextflow_runtime(pvc_name: str, {param_signature}) -> None:
56
- env = {{
57
- **os.environ,
58
- "NXF_HOME": "/root/.nextflow",
59
- "K8_STORAGE_CLAIM_NAME": pvc_name,
60
- }}
61
- subprocess.run(
62
- [
63
- "/root/.latch/bin/nextflow",
64
- "run",
65
- "{script_dir}",
66
- "-work-dir",
67
- "/nf-workdir",
68
- "-profile",
69
- "{execution_profile}",
65
+ try:
66
+ shared_dir = Path("/nf-workdir")
67
+
68
+ shutil.copytree(
69
+ Path("/root"),
70
+ shared_dir,
71
+ ignore=lambda src, names: ["latch", ".latch"],
72
+ ignore_dangling_symlinks=True,
73
+ dirs_exist_ok=True,
74
+ )
75
+
76
+ env = {{
77
+ **os.environ,
78
+ "NXF_HOME": "/root/.nextflow",
79
+ "K8_STORAGE_CLAIM_NAME": pvc_name,
80
+ }}
81
+ subprocess.run(
82
+ [
83
+ "/root/.latch/bin/nextflow",
84
+ "run",
85
+ str(shared_dir / "{nf_script}"),
86
+ "-work-dir",
87
+ str(shared_dir),
88
+ "-profile",
89
+ "{execution_profile}",
70
90
  {params_to_flags}
71
- ],
72
- env=env,
73
- check=True,
74
- )
91
+ ],
92
+ env=env,
93
+ check=True,
94
+ )
95
+ except subprocess.CalledProcessError:
96
+ remote = LPath(urljoins("{remote_output_dir}", _get_execution_name(), "nextflow.log"))
97
+ print(f"Uploading .nextflow.log to {{remote.path}}")
98
+ remote.upload_from(Path("/root/.nextflow.log"))
99
+ raise
100
+ finally:
101
+ token = os.environ.get("FLYTE_INTERNAL_EXECUTION_ID")
102
+ if token is None:
103
+ raise RuntimeError("failed to get execution token")
104
+
105
+ headers = {{"Authorization": f"Latch-Execution-Token {{token}}"}}
106
+ resp = requests.post(
107
+ "http://nf-dispatcher-service.flyte.svc.cluster.local/finalize",
108
+ headers=headers,
109
+ json={{
110
+ "pvc_name": pvc_name,
111
+ }}
112
+ )
113
+ if resp.status_code != 200:
114
+ print("Failed to finalize workflow:", resp.status_code)
115
+
75
116
 
76
117
 
77
118
  @workflow(metadata._nextflow_metadata)
@@ -119,7 +160,9 @@ def generate_nextflow_workflow(
119
160
  ):
120
161
  assert metadata._nextflow_metadata is not None
121
162
 
163
+ wf_name = metadata._nextflow_metadata.name
122
164
  parameters = metadata._nextflow_metadata.parameters
165
+ resources = metadata._nextflow_metadata.runtime_resources
123
166
 
124
167
  flags = []
125
168
  for param_name, param in parameters.items():
@@ -142,9 +185,15 @@ def generate_nextflow_workflow(
142
185
  if len(preamble) > 0:
143
186
  preambles.append(preamble)
144
187
 
188
+ if metadata._nextflow_metadata.output_dir is None:
189
+ output_dir = "latch:///nextflow_outputs"
190
+ else:
191
+ output_dir = metadata._nextflow_metadata.output_dir._raw_remote_path
192
+ output_dir = urljoins(output_dir, wf_name)
193
+
145
194
  entrypoint = template.format(
146
195
  workflow_func_name=identifier_from_str(workflow_name),
147
- script_dir=nf_script.resolve().relative_to(pkg_root.resolve()),
196
+ nf_script=nf_script.resolve().relative_to(pkg_root.resolve()),
148
197
  param_signature_with_defaults=", ".join(
149
198
  no_defaults + [f"{name}={val}" for name, val in defaults]
150
199
  ),
@@ -157,6 +206,10 @@ def generate_nextflow_workflow(
157
206
  execution_profile if execution_profile is not None else "standard"
158
207
  ),
159
208
  preambles="\n\n".join(preambles),
209
+ cpu=resources.cpus,
210
+ memory=resources.memory,
211
+ storage_gib=resources.storage_gib,
212
+ remote_output_dir=output_dir,
160
213
  )
161
214
 
162
215
  entrypoint_path = pkg_root / "wf" / "entrypoint.py"
@@ -13,7 +13,7 @@ if cur_ver < (3, 8) or cur_ver > (3, 11):
13
13
 
14
14
  setup(
15
15
  name="latch",
16
- version="v2.41.3.dev1",
16
+ version="v2.41.3.dev2",
17
17
  author_email="kenny@latch.bio",
18
18
  description="The Latch SDK",
19
19
  packages=find_packages(),
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes