latch 2.45.2.dev2__tar.gz → 2.45.2.dev4__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.
- {latch-2.45.2.dev2/latch.egg-info → latch-2.45.2.dev4}/PKG-INFO +1 -1
- {latch-2.45.2.dev2 → latch-2.45.2.dev4/latch.egg-info}/PKG-INFO +1 -1
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/docker_utils/__init__.py +63 -23
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/main.py +4 -10
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/nextflow/dependencies.py +2 -4
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/nextflow/workflow.py +41 -23
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/snakemake/config/utils.py +1 -4
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/setup.py +1 -1
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/LICENSE +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/MANIFEST.in +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/README.md +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/account.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/executions.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/functions/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/functions/messages.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/functions/operators.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/functions/secrets.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/_transfer/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/_transfer/download.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/_transfer/manager.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/_transfer/node.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/_transfer/progress.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/_transfer/remote_copy.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/_transfer/throttle.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/_transfer/upload.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/_transfer/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/path.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/ldata/type.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/registry/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/registry/project.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/registry/record.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/registry/table.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/registry/types.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/registry/upstream_types/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/registry/upstream_types/types.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/registry/upstream_types/values.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/registry/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/resources/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/resources/conditional.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/resources/dynamic.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/resources/launch_plan.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/resources/map_tasks.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/resources/reference_workflow.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/resources/tasks.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/resources/workflow.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/types/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/types/directory.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/types/file.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/types/glob.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/types/json.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/types/metadata.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/types/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/verified/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/verified/deseq2.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/verified/mafft.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/verified/pathway.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/verified/rnaseq.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch/verified/trim_galore.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch.egg-info/SOURCES.txt +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch.egg-info/dependency_links.txt +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch.egg-info/entry_points.txt +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch.egg-info/requires.txt +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch.egg-info/top_level.txt +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/auth/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/auth/csrf.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/auth/oauth2.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/auth/pkce.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/auth/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/centromere/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/centromere/ctx.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/centromere/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/click_utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/constants.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/exceptions/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/exceptions/cache.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/exceptions/errors.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/exceptions/handler.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/exceptions/traceback.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/menus.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/nextflow/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/nextflow/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/cp/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/cp/autocomplete.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/cp/glob.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/cp/main.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/cp/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/execute/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/execute/main.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/execute/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/get.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/get_executions.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/get_params.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/__pycache__/__init__.cpython-310.pyc +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/__pycache__/init.cpython-310.pyc +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/assemble_and_sort/.env +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/assemble_and_sort/LICENSE +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/assemble_and_sort/README.md +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/assemble_and_sort/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/assemble_and_sort/assemble.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/assemble_and_sort/sort.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/assemble_and_sort/system-requirements.txt +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/common/.dockerignore +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_conda/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_conda/conda_task.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_conda/environment.yaml +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_docker/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_docker/task.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_nfcore/Dockerfile +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_nfcore/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_nfcore/task.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_r/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_r/environment.R +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_r/r_task.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/.latch/latch_entrypoint +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/Dockerfile +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/Snakefile +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/config.yaml +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/environment.yaml +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/latch_metadata.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/scripts/plot-quals.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/version +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/init.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/template/LICENSE +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/template/README.md +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/template/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/template/task.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/launch.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/local_dev.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/local_dev_old.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/login.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/ls.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/mkdir.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/move.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/preview.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/register/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/register/constants.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/register/register.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/register/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/rm.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/stop_pod.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/sync.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/test_data/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/test_data/ls.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/test_data/remove.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/test_data/upload.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/test_data/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/workspace.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/snakemake/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/snakemake/config/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/snakemake/config/parser.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/snakemake/serialize.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/snakemake/serialize_utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/snakemake/single_task_snakemake.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/snakemake/utils.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/snakemake/workflow.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/tinyrequests.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/tui/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/utils/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/utils/path.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/workflow_config.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/pyproject.toml +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/setup.cfg +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/tests/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/tests/cp/__init__.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/tests/fixtures.py +0 -0
- {latch-2.45.2.dev2 → latch-2.45.2.dev4}/tests/test_ls.py +0 -0
|
@@ -78,24 +78,6 @@ def get_prologue(
|
|
|
78
78
|
def get_epilogue(wf_type: WorkflowType = WorkflowType.latchbiosdk) -> List[str]:
|
|
79
79
|
cmds: list[str] = []
|
|
80
80
|
|
|
81
|
-
if wf_type == WorkflowType.snakemake:
|
|
82
|
-
cmds += [
|
|
83
|
-
"",
|
|
84
|
-
"# Latch snakemake workflow entrypoint",
|
|
85
|
-
"# DO NOT CHANGE",
|
|
86
|
-
"",
|
|
87
|
-
"copy .latch/snakemake_jit_entrypoint.py /root/snakemake_jit_entrypoint.py",
|
|
88
|
-
]
|
|
89
|
-
elif wf_type == WorkflowType.nextflow:
|
|
90
|
-
cmds += [
|
|
91
|
-
"",
|
|
92
|
-
"# Latch nextflow workflow entrypoint",
|
|
93
|
-
"# DO NOT CHANGE",
|
|
94
|
-
"",
|
|
95
|
-
"copy .latch/bin/nextflow /root/nextflow",
|
|
96
|
-
"copy .latch/.nextflow /root/.nextflow",
|
|
97
|
-
]
|
|
98
|
-
|
|
99
81
|
cmds += [
|
|
100
82
|
"",
|
|
101
83
|
"# Latch workflow registration metadata",
|
|
@@ -324,14 +306,66 @@ def infer_commands(pkg_root: Path) -> List[DockerCmdBlock]:
|
|
|
324
306
|
return commands
|
|
325
307
|
|
|
326
308
|
|
|
309
|
+
def copy_file_commands(wf_type: WorkflowType) -> List[DockerCmdBlock]:
|
|
310
|
+
cmd = []
|
|
311
|
+
|
|
312
|
+
cmd += [
|
|
313
|
+
"",
|
|
314
|
+
"# Copy workflow data (use .dockerignore to skip files)",
|
|
315
|
+
"",
|
|
316
|
+
"copy . /root/",
|
|
317
|
+
]
|
|
318
|
+
|
|
319
|
+
if wf_type == WorkflowType.snakemake:
|
|
320
|
+
cmd += [
|
|
321
|
+
"",
|
|
322
|
+
"# Latch snakemake workflow entrypoint",
|
|
323
|
+
"# DO NOT CHANGE",
|
|
324
|
+
"",
|
|
325
|
+
"copy .latch/snakemake_jit_entrypoint.py /root/snakemake_jit_entrypoint.py",
|
|
326
|
+
]
|
|
327
|
+
elif wf_type == WorkflowType.nextflow:
|
|
328
|
+
cmd += [
|
|
329
|
+
"",
|
|
330
|
+
"# Latch nextflow workflow entrypoint",
|
|
331
|
+
"# DO NOT CHANGE",
|
|
332
|
+
"",
|
|
333
|
+
"run ln -s /root/.latch/bin/nextflow /root/nextflow",
|
|
334
|
+
"run ln -s /root/.latch/.nextflow /root/.nextflow",
|
|
335
|
+
]
|
|
336
|
+
|
|
337
|
+
return cmd
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
def generate_dockerignore(pkg_root: Path, *, wf_type: WorkflowType) -> None:
|
|
341
|
+
if wf_type != WorkflowType.nextflow:
|
|
342
|
+
return
|
|
343
|
+
|
|
344
|
+
dest = Path(pkg_root) / ".dockerignore"
|
|
345
|
+
if dest.exists() and not click.confirm(
|
|
346
|
+
f".dockerignore already exists at `{dest}`. Overwrite?"
|
|
347
|
+
):
|
|
348
|
+
return
|
|
349
|
+
|
|
350
|
+
with Path(".dockerignore").open("w") as f:
|
|
351
|
+
f.write(".git/\n")
|
|
352
|
+
f.write(".github/\n")
|
|
353
|
+
f.write(".nextflow*\n")
|
|
354
|
+
f.write("work/\n")
|
|
355
|
+
f.write("results/\n")
|
|
356
|
+
f.write(".nextflow.log*\n")
|
|
357
|
+
|
|
358
|
+
click.secho(f"Successfully generated .dockerignore `{dest}`", fg="green")
|
|
359
|
+
|
|
360
|
+
|
|
327
361
|
def generate_dockerfile(
|
|
328
|
-
pkg_root: Path,
|
|
362
|
+
pkg_root: Path, *, wf_type: WorkflowType = WorkflowType.latchbiosdk
|
|
329
363
|
) -> None:
|
|
330
364
|
"""Generate a best effort Dockerfile from files in the workflow directory.
|
|
331
365
|
|
|
332
366
|
Args:
|
|
333
367
|
pkg_root: A path to a workflow directory.
|
|
334
|
-
|
|
368
|
+
dest: The path to write the generated Dockerfile.
|
|
335
369
|
wf_type: The type of workflow (eg. snakemake) the Dockerfile is for
|
|
336
370
|
|
|
337
371
|
Example:
|
|
@@ -342,6 +376,11 @@ def generate_dockerfile(
|
|
|
342
376
|
# ├── Dockerfile
|
|
343
377
|
# └── ...
|
|
344
378
|
"""
|
|
379
|
+
dest = pkg_root / "Dockerfile"
|
|
380
|
+
if dest.exists() and not click.confirm(
|
|
381
|
+
f"Dockerfile already exists at `{dest}`. Overwrite?"
|
|
382
|
+
):
|
|
383
|
+
return
|
|
345
384
|
|
|
346
385
|
click.secho("Generating Dockerfile", bold=True)
|
|
347
386
|
try:
|
|
@@ -368,7 +407,7 @@ def generate_dockerfile(
|
|
|
368
407
|
)
|
|
369
408
|
click.echo()
|
|
370
409
|
|
|
371
|
-
with
|
|
410
|
+
with dest.open("w") as f:
|
|
372
411
|
f.write("\n".join(get_prologue(config, wf_type)) + "\n\n")
|
|
373
412
|
|
|
374
413
|
commands = infer_commands(pkg_root)
|
|
@@ -381,8 +420,7 @@ def generate_dockerfile(
|
|
|
381
420
|
|
|
382
421
|
block.write_block(f)
|
|
383
422
|
|
|
384
|
-
f.write("
|
|
385
|
-
f.write("copy . /root/\n\n")
|
|
423
|
+
f.write("\n".join(copy_file_commands(wf_type)) + "\n\n")
|
|
386
424
|
|
|
387
425
|
for block in commands:
|
|
388
426
|
if block.order != DockerCmdBlockOrder.postcopy:
|
|
@@ -392,6 +430,8 @@ def generate_dockerfile(
|
|
|
392
430
|
|
|
393
431
|
f.write("\n".join(get_epilogue(wf_type)) + "\n")
|
|
394
432
|
|
|
433
|
+
click.secho(f"Successfully generated dockerfile `{dest}`", fg="green")
|
|
434
|
+
|
|
395
435
|
|
|
396
436
|
def get_default_dockerfile(pkg_root: Path, *, wf_type: WorkflowType):
|
|
397
437
|
default_dockerfile = pkg_root / "Dockerfile"
|
|
@@ -217,14 +217,7 @@ def dockerfile(pkg_root: str, snakemake: bool = False, nextflow: bool = False):
|
|
|
217
217
|
)
|
|
218
218
|
raise click.exceptions.Exit(1)
|
|
219
219
|
|
|
220
|
-
from latch_cli.docker_utils import generate_dockerfile
|
|
221
|
-
|
|
222
|
-
source = Path(pkg_root)
|
|
223
|
-
dest = source / "Dockerfile"
|
|
224
|
-
if dest.exists() and not click.confirm(
|
|
225
|
-
f"Dockerfile already exists at `{dest}`. Overwrite?"
|
|
226
|
-
):
|
|
227
|
-
return
|
|
220
|
+
from latch_cli.docker_utils import generate_dockerfile, generate_dockerignore
|
|
228
221
|
|
|
229
222
|
workflow_type = WorkflowType.latchbiosdk
|
|
230
223
|
if snakemake is True:
|
|
@@ -232,8 +225,9 @@ def dockerfile(pkg_root: str, snakemake: bool = False, nextflow: bool = False):
|
|
|
232
225
|
elif nextflow is True:
|
|
233
226
|
workflow_type = WorkflowType.nextflow
|
|
234
227
|
|
|
235
|
-
|
|
236
|
-
|
|
228
|
+
source = Path(pkg_root)
|
|
229
|
+
generate_dockerfile(source, wf_type=workflow_type)
|
|
230
|
+
generate_dockerignore(source, wf_type=workflow_type)
|
|
237
231
|
|
|
238
232
|
|
|
239
233
|
@main.command("generate-metadata")
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import shutil
|
|
2
|
-
import subprocess
|
|
3
2
|
from concurrent.futures import ProcessPoolExecutor
|
|
4
3
|
from ctypes import c_int
|
|
5
4
|
from multiprocessing.managers import SyncManager
|
|
@@ -8,9 +7,9 @@ from urllib.parse import urljoin
|
|
|
8
7
|
|
|
9
8
|
import boto3
|
|
10
9
|
import click
|
|
10
|
+
from botocore.handlers import disable_signing
|
|
11
11
|
|
|
12
12
|
from latch_cli import tinyrequests
|
|
13
|
-
from latch_cli.utils import dedent
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
def _do_download(
|
|
@@ -35,6 +34,7 @@ def _do_download(
|
|
|
35
34
|
|
|
36
35
|
def download_nf_jars(pkg_root: Path):
|
|
37
36
|
s3_resource = boto3.resource("s3")
|
|
37
|
+
s3_resource.meta.client.meta.events.register("choose-signer.s3.*", disable_signing)
|
|
38
38
|
bucket = s3_resource.Bucket("latch-public")
|
|
39
39
|
|
|
40
40
|
subdir = "nextflow-v2/"
|
|
@@ -51,8 +51,6 @@ def download_nf_jars(pkg_root: Path):
|
|
|
51
51
|
"https://latch-public.s3.us-west-2.amazonaws.com/", obj.key
|
|
52
52
|
)
|
|
53
53
|
obj_path = pkg_root / ".latch" / obj.key[len(subdir) :]
|
|
54
|
-
print(obj_path)
|
|
55
|
-
|
|
56
54
|
exec.submit(_do_download, url, obj_path, len(objects), counter, lock)
|
|
57
55
|
|
|
58
56
|
click.echo("\x1b[0K", nl=False)
|
|
@@ -60,47 +60,56 @@ def initialize() -> str:
|
|
|
60
60
|
|
|
61
61
|
{preambles}
|
|
62
62
|
|
|
63
|
-
{
|
|
63
|
+
{samplesheet_funs}
|
|
64
64
|
|
|
65
65
|
@nextflow_runtime_task(cpu={cpu}, memory={memory})
|
|
66
66
|
def nextflow_runtime(pvc_name: str, {param_signature}) -> None:
|
|
67
67
|
try:
|
|
68
68
|
shared_dir = Path("/nf-workdir")
|
|
69
69
|
|
|
70
|
+
{samplesheet_constructors}
|
|
71
|
+
|
|
70
72
|
shutil.copytree(
|
|
71
73
|
Path("/root"),
|
|
72
74
|
shared_dir,
|
|
73
|
-
ignore=lambda src, names: ["latch", ".latch"],
|
|
75
|
+
ignore=lambda src, names: ["latch", ".latch", "nextflow", ".nextflow", "work", "results"],
|
|
74
76
|
ignore_dangling_symlinks=True,
|
|
75
77
|
dirs_exist_ok=True,
|
|
76
78
|
)
|
|
77
79
|
|
|
80
|
+
cmd = [
|
|
81
|
+
"/root/nextflow",
|
|
82
|
+
"run",
|
|
83
|
+
str(shared_dir / "{nf_script}"),
|
|
84
|
+
"-work-dir",
|
|
85
|
+
str(shared_dir),
|
|
86
|
+
"-profile",
|
|
87
|
+
"{execution_profile}",
|
|
88
|
+
"-process.executor",
|
|
89
|
+
"k8s",
|
|
90
|
+
{params_to_flags}
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
print("Launching Nextflow Runtime")
|
|
94
|
+
print(cmd, flush=True)
|
|
78
95
|
env = {{
|
|
79
96
|
**os.environ,
|
|
80
97
|
"NXF_HOME": "/root/.nextflow",
|
|
81
98
|
"K8_STORAGE_CLAIM_NAME": pvc_name,
|
|
82
99
|
}}
|
|
83
100
|
subprocess.run(
|
|
84
|
-
|
|
85
|
-
"/root/nextflow",
|
|
86
|
-
"run",
|
|
87
|
-
str(shared_dir / "{nf_script}"),
|
|
88
|
-
"-work-dir",
|
|
89
|
-
str(shared_dir),
|
|
90
|
-
"-profile",
|
|
91
|
-
"{execution_profile}",
|
|
92
|
-
"-process.executor",
|
|
93
|
-
"k8s",
|
|
94
|
-
{params_to_flags}
|
|
95
|
-
],
|
|
101
|
+
cmd,
|
|
96
102
|
env=env,
|
|
97
103
|
check=True,
|
|
104
|
+
cwd=str(shared_dir),
|
|
98
105
|
)
|
|
99
106
|
except subprocess.CalledProcessError:
|
|
100
107
|
remote = LPath(urljoins("{remote_output_dir}", _get_execution_name(), "nextflow.log"))
|
|
101
108
|
print()
|
|
102
109
|
print(f"Uploading .nextflow.log to {{remote.path}}")
|
|
103
|
-
remote.upload_from(
|
|
110
|
+
remote.upload_from(shared_dir / ".nextflow.log")
|
|
111
|
+
import time
|
|
112
|
+
time.sleep(10 * 60)
|
|
104
113
|
raise
|
|
105
114
|
finally:
|
|
106
115
|
token = os.environ.get("FLYTE_INTERNAL_EXECUTION_ID")
|
|
@@ -172,7 +181,8 @@ def generate_nextflow_workflow(
|
|
|
172
181
|
flags = []
|
|
173
182
|
defaults: List[Tuple[str, str]] = []
|
|
174
183
|
no_defaults: List[str] = []
|
|
175
|
-
preambles:
|
|
184
|
+
preambles: set[str] = set()
|
|
185
|
+
samplesheet_funs: List[str] = []
|
|
176
186
|
samplesheet_constructors: List[str] = []
|
|
177
187
|
for param_name, param in parameters.items():
|
|
178
188
|
sig = f"{param_name}: {type_repr(param.type)}"
|
|
@@ -195,7 +205,7 @@ def generate_nextflow_workflow(
|
|
|
195
205
|
no_defaults.append(sig)
|
|
196
206
|
|
|
197
207
|
if param.samplesheet:
|
|
198
|
-
|
|
208
|
+
samplesheet_funs.append(
|
|
199
209
|
reindent(
|
|
200
210
|
f"""
|
|
201
211
|
{param_name}_construct_samplesheet = metadata._nextflow_metadata.parameters[{repr(param_name)}].samplesheet_constructor
|
|
@@ -204,19 +214,26 @@ def generate_nextflow_workflow(
|
|
|
204
214
|
),
|
|
205
215
|
)
|
|
206
216
|
|
|
217
|
+
samplesheet_constructors.append(
|
|
218
|
+
reindent(
|
|
219
|
+
f"{param_name}_samplesheet ="
|
|
220
|
+
f" {param_name}_construct_samplesheet({param_name})",
|
|
221
|
+
2,
|
|
222
|
+
),
|
|
223
|
+
)
|
|
224
|
+
|
|
207
225
|
flags.append(
|
|
208
226
|
reindent(
|
|
209
|
-
f"*get_flag({repr(param_name)},"
|
|
210
|
-
|
|
211
|
-
4,
|
|
227
|
+
f"*get_flag({repr(param_name)}, {param_name}_samplesheet)",
|
|
228
|
+
2,
|
|
212
229
|
)
|
|
213
230
|
)
|
|
214
231
|
else:
|
|
215
232
|
flags.append(reindent(f"*get_flag({repr(param_name)}, {param_name})", 4))
|
|
216
233
|
|
|
217
234
|
preamble = get_preamble(param.type)
|
|
218
|
-
if len(preamble) > 0:
|
|
219
|
-
preambles.
|
|
235
|
+
if len(preamble) > 0 and preamble not in preambles:
|
|
236
|
+
preambles.add(preamble)
|
|
220
237
|
|
|
221
238
|
if metadata._nextflow_metadata.output_dir is None:
|
|
222
239
|
output_dir = "latch:///nextflow_outputs"
|
|
@@ -238,7 +255,8 @@ def generate_nextflow_workflow(
|
|
|
238
255
|
execution_profile=(
|
|
239
256
|
execution_profile if execution_profile is not None else "standard"
|
|
240
257
|
),
|
|
241
|
-
preambles="\n\n".join(preambles),
|
|
258
|
+
preambles="\n\n".join(list(preambles)),
|
|
259
|
+
samplesheet_funs="\n".join(samplesheet_funs),
|
|
242
260
|
samplesheet_constructors="\n".join(samplesheet_constructors),
|
|
243
261
|
cpu=resources.cpus,
|
|
244
262
|
memory=resources.memory,
|
|
@@ -221,10 +221,7 @@ def type_repr(t: Type, *, add_namespace: bool = False) -> str:
|
|
|
221
221
|
args = get_args(t)
|
|
222
222
|
|
|
223
223
|
if len(args) != 2 or args[1] is not type(None):
|
|
224
|
-
raise ValueError(
|
|
225
|
-
"Union types other than Optional are not yet supported in Snakemake"
|
|
226
|
-
" workflows."
|
|
227
|
-
)
|
|
224
|
+
raise ValueError("Union types other than Optional are not yet supported")
|
|
228
225
|
|
|
229
226
|
return f"typing.Optional[{type_repr(args[0], add_namespace=add_namespace)}]"
|
|
230
227
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/__pycache__/__init__.cpython-310.pyc
RENAMED
|
File without changes
|
{latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/__pycache__/init.cpython-310.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/assemble_and_sort/__init__.py
RENAMED
|
File without changes
|
{latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/assemble_and_sort/assemble.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_conda/environment.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/Dockerfile
RENAMED
|
File without changes
|
|
File without changes
|
{latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/config.yaml
RENAMED
|
File without changes
|
{latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/environment.yaml
RENAMED
|
File without changes
|
{latch-2.45.2.dev2 → latch-2.45.2.dev4}/latch_cli/services/init/example_snakemake/latch_metadata.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|