latch 2.40.4.dev2__tar.gz → 2.40.6__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.40.4.dev2/latch.egg-info → latch-2.40.6}/PKG-INFO +2 -2
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/types/directory.py +0 -6
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/types/file.py +0 -3
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/types/metadata.py +18 -83
- {latch-2.40.4.dev2 → latch-2.40.6/latch.egg-info}/PKG-INFO +2 -2
- {latch-2.40.4.dev2 → latch-2.40.6}/latch.egg-info/SOURCES.txt +9 -33
- {latch-2.40.4.dev2 → latch-2.40.6}/latch.egg-info/requires.txt +1 -1
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/auth/oauth2.py +9 -7
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/centromere/ctx.py +32 -82
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/click_utils.py +3 -10
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/docker_utils/__init__.py +13 -23
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/exceptions/handler.py +18 -12
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/main.py +18 -103
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/cp/autocomplete.py +4 -1
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/get_executions.py +10 -12
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/__pycache__/init.cpython-311.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/assemble_and_sort/__init__.py +0 -1
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/common/.dockerignore +0 -3
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_conda/conda_task.py +8 -6
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_nfcore/__init__.py +0 -1
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_r/r_task.py +8 -6
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/init.py +5 -26
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/local_dev_old.py +8 -7
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/login.py +1 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/move.py +0 -1
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/preview.py +1 -2
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/register/register.py +54 -96
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/workspace.py +9 -7
- latch-2.40.4.dev2/latch_cli/extras/snakemake/config.py → latch-2.40.6/latch_cli/snakemake/config/parser.py +132 -110
- {latch-2.40.4.dev2/latch_cli/extras/common → latch-2.40.6/latch_cli/snakemake}/config/utils.py +106 -23
- {latch-2.40.4.dev2/latch_cli/extras → latch-2.40.6/latch_cli}/snakemake/serialize.py +40 -9
- latch-2.40.4.dev2/latch_cli/extras/common/serialize.py → latch-2.40.6/latch_cli/snakemake/serialize_utils.py +10 -188
- latch-2.40.6/latch_cli/snakemake/utils.py +26 -0
- {latch-2.40.4.dev2/latch_cli/extras → latch-2.40.6/latch_cli}/snakemake/workflow.py +79 -4
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/utils/__init__.py +31 -10
- {latch-2.40.4.dev2 → latch-2.40.6}/setup.py +7 -3
- latch-2.40.4.dev2/latch_cli/extras/common/config/parser.py +0 -82
- latch-2.40.4.dev2/latch_cli/extras/common/utils.py +0 -72
- latch-2.40.4.dev2/latch_cli/extras/nextflow/build.py +0 -536
- latch-2.40.4.dev2/latch_cli/extras/nextflow/channel.py +0 -89
- latch-2.40.4.dev2/latch_cli/extras/nextflow/config.py +0 -162
- latch-2.40.4.dev2/latch_cli/extras/nextflow/dag.py +0 -320
- latch-2.40.4.dev2/latch_cli/extras/nextflow/file_persistence.py +0 -234
- latch-2.40.4.dev2/latch_cli/extras/nextflow/serialize.py +0 -60
- latch-2.40.4.dev2/latch_cli/extras/nextflow/tasks/adapters.py +0 -232
- latch-2.40.4.dev2/latch_cli/extras/nextflow/tasks/base.py +0 -193
- latch-2.40.4.dev2/latch_cli/extras/nextflow/tasks/conditional.py +0 -51
- latch-2.40.4.dev2/latch_cli/extras/nextflow/tasks/map.py +0 -180
- latch-2.40.4.dev2/latch_cli/extras/nextflow/tasks/merge.py +0 -111
- latch-2.40.4.dev2/latch_cli/extras/nextflow/tasks/operator.py +0 -234
- latch-2.40.4.dev2/latch_cli/extras/nextflow/tasks/process.py +0 -258
- latch-2.40.4.dev2/latch_cli/extras/nextflow/workflow.py +0 -101
- latch-2.40.4.dev2/latch_cli/extras/snakemake/utils.py +0 -33
- latch-2.40.4.dev2/latch_cli/services/execute/__init__.py +0 -0
- latch-2.40.4.dev2/latch_cli/services/init/example_nextflow/main.nf +0 -7
- latch-2.40.4.dev2/latch_cli/services/init/example_nextflow/nextflow.config +0 -4
- latch-2.40.4.dev2/latch_cli/services/init/example_nextflow/workflow.nf +0 -50
- latch-2.40.4.dev2/latch_cli/services/test_data/__init__.py +0 -0
- latch-2.40.4.dev2/latch_cli/tui/__init__.py +0 -0
- latch-2.40.4.dev2/latch_cli/utils/workflow.py +0 -84
- latch-2.40.4.dev2/tests/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/LICENSE +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/MANIFEST.in +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/README.md +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/account.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/executions.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/functions/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/functions/messages.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/functions/operators.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/functions/secrets.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/_transfer/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/_transfer/download.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/_transfer/manager.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/_transfer/node.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/_transfer/progress.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/_transfer/remote_copy.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/_transfer/throttle.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/_transfer/upload.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/_transfer/utils.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/path.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/ldata/type.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/registry/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/registry/project.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/registry/record.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/registry/table.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/registry/types.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/registry/upstream_types/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/registry/upstream_types/types.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/registry/upstream_types/values.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/registry/utils.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/resources/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/resources/conditional.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/resources/dynamic.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/resources/launch_plan.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/resources/map_tasks.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/resources/reference_workflow.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/resources/tasks.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/resources/workflow.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/types/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/types/glob.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/types/json.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/types/utils.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/utils.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/verified/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/verified/deseq2.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/verified/mafft.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/verified/pathway.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/verified/rnaseq.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch/verified/trim_galore.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch.egg-info/dependency_links.txt +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch.egg-info/entry_points.txt +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch.egg-info/top_level.txt +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/auth/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/auth/csrf.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/auth/pkce.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/auth/utils.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/centromere/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/centromere/utils.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/constants.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/exceptions/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/exceptions/cache.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/exceptions/errors.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/exceptions/traceback.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/menus.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/__init__.py +0 -0
- {latch-2.40.4.dev2/latch_cli/extras → latch-2.40.6/latch_cli/services/cp}/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/cp/glob.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/cp/main.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/cp/utils.py +3 -3
- {latch-2.40.4.dev2/latch_cli/extras/common → latch-2.40.6/latch_cli/services/execute}/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/execute/main.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/execute/utils.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/get.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/get_params.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/__pycache__/__init__.cpython-310.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/__pycache__/__init__.cpython-311.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/__pycache__/__init__.cpython-38.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/__pycache__/__init__.cpython-39.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/__pycache__/init.cpython-310.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/__pycache__/init.cpython-38.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/__pycache__/init.cpython-39.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/assemble_and_sort/.env +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/assemble_and_sort/LICENSE +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/assemble_and_sort/README.md +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/assemble_and_sort/__pycache__/__init__.cpython-310.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/assemble_and_sort/assemble.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/assemble_and_sort/sort.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/assemble_and_sort/system-requirements.txt +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_conda/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_conda/__pycache__/__init__.cpython-310.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_conda/environment.yaml +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_docker/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_docker/task.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_nf_integration/latch_metadata/__pycache__/__init__.cpython-311.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_nfcore/Dockerfile +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_nfcore/task.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_r/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_r/__pycache__/__init__.cpython-310.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_r/environment.R +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_snakemake/.latch/latch_entrypoint +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_snakemake/Dockerfile +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_snakemake/Snakefile +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_snakemake/config.yaml +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_snakemake/environment.yaml +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_snakemake/latch_metadata.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_snakemake/scripts/plot-quals.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/example_snakemake/version +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/template/LICENSE +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/template/README.md +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/template/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/template/__pycache__/__init__.cpython-310.pyc +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/init/template/task.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/launch.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/local_dev.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/ls.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/mkdir.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/register/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/register/constants.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/register/utils.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/rm.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/stop_pod.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/sync.py +0 -0
- {latch-2.40.4.dev2/latch_cli/extras/common/config → latch-2.40.6/latch_cli/services/test_data}/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/test_data/ls.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/test_data/remove.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/test_data/upload.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/services/test_data/utils.py +0 -0
- {latch-2.40.4.dev2/latch_cli/extras/nextflow → latch-2.40.6/latch_cli/snakemake}/__init__.py +0 -0
- {latch-2.40.4.dev2/latch_cli/extras/nextflow/tasks → latch-2.40.6/latch_cli/snakemake/config}/__init__.py +0 -0
- {latch-2.40.4.dev2/latch_cli/extras → latch-2.40.6/latch_cli}/snakemake/single_task_snakemake.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/tinyrequests.py +0 -0
- {latch-2.40.4.dev2/latch_cli/extras/snakemake → latch-2.40.6/latch_cli/tui}/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/utils/path.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/latch_cli/workflow_config.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/pyproject.toml +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/setup.cfg +0 -0
- {latch-2.40.4.dev2/latch_cli/services/cp → latch-2.40.6/tests}/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/tests/cp/__init__.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/tests/fixtures.py +0 -0
- {latch-2.40.4.dev2 → latch-2.40.6}/tests/test_ls.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: latch
|
|
3
|
-
Version: 2.40.
|
|
3
|
+
Version: 2.40.6
|
|
4
4
|
Summary: The Latch SDK
|
|
5
5
|
Author-email: kenny@latch.bio
|
|
6
6
|
Classifier: Programming Language :: Python :: 3.8
|
|
@@ -18,7 +18,7 @@ Requires-Dist: paramiko>=3.2.0
|
|
|
18
18
|
Requires-Dist: scp>=0.14.0
|
|
19
19
|
Requires-Dist: boto3>=1.26.0
|
|
20
20
|
Requires-Dist: tqdm>=4.63.0
|
|
21
|
-
Requires-Dist: lytekit==0.15.
|
|
21
|
+
Requires-Dist: lytekit==0.15.6
|
|
22
22
|
Requires-Dist: lytekitplugins-pods==0.6.2
|
|
23
23
|
Requires-Dist: typing-extensions==4.7.1
|
|
24
24
|
Requires-Dist: apscheduler==3.9.1
|
|
@@ -141,9 +141,6 @@ class LatchDir(FlyteDirectory):
|
|
|
141
141
|
|
|
142
142
|
super().__init__(self.path, downloader, self._remote_directory)
|
|
143
143
|
|
|
144
|
-
def __hash__(self) -> int:
|
|
145
|
-
return hash(self.path)
|
|
146
|
-
|
|
147
144
|
def _idempotent_set_path(self):
|
|
148
145
|
if self._path_generated:
|
|
149
146
|
return
|
|
@@ -271,9 +268,6 @@ LatchOutputDir = Annotated[
|
|
|
271
268
|
{"output": True},
|
|
272
269
|
),
|
|
273
270
|
]
|
|
274
|
-
|
|
275
|
-
LatchOutputDir.__name__ = "LatchOutputDir"
|
|
276
|
-
|
|
277
271
|
"""A LatchDir tagged as the output of some workflow.
|
|
278
272
|
|
|
279
273
|
The Latch Console uses this metadata to avoid checking for existence of the
|
|
@@ -3,28 +3,16 @@ from dataclasses import Field, asdict, dataclass, field
|
|
|
3
3
|
from enum import Enum
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from textwrap import indent
|
|
6
|
-
from typing import
|
|
7
|
-
Any,
|
|
8
|
-
ClassVar,
|
|
9
|
-
Collection,
|
|
10
|
-
Dict,
|
|
11
|
-
Generic,
|
|
12
|
-
List,
|
|
13
|
-
Optional,
|
|
14
|
-
Protocol,
|
|
15
|
-
Tuple,
|
|
16
|
-
Type,
|
|
17
|
-
TypeVar,
|
|
18
|
-
Union,
|
|
19
|
-
)
|
|
6
|
+
from typing import Any, ClassVar, Dict, List, Optional, Protocol, Tuple, Type, Union
|
|
20
7
|
|
|
21
8
|
import click
|
|
22
9
|
import yaml
|
|
23
10
|
from typing_extensions import TypeAlias
|
|
24
11
|
|
|
12
|
+
from latch_cli.snakemake.config.utils import validate_snakemake_type
|
|
25
13
|
from latch_cli.utils import identifier_suffix_from_str
|
|
26
14
|
|
|
27
|
-
from .directory import LatchDir
|
|
15
|
+
from .directory import LatchDir
|
|
28
16
|
from .file import LatchFile
|
|
29
17
|
|
|
30
18
|
|
|
@@ -400,33 +388,31 @@ class _IsDataclass(Protocol):
|
|
|
400
388
|
|
|
401
389
|
|
|
402
390
|
ParameterType: TypeAlias = Union[
|
|
403
|
-
None,
|
|
404
|
-
int,
|
|
405
|
-
float,
|
|
406
|
-
str,
|
|
407
|
-
bool,
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
391
|
+
Type[None],
|
|
392
|
+
Type[int],
|
|
393
|
+
Type[float],
|
|
394
|
+
Type[str],
|
|
395
|
+
Type[bool],
|
|
396
|
+
Type[Enum],
|
|
397
|
+
Type[_IsDataclass],
|
|
398
|
+
Type[List["ParameterType"]],
|
|
399
|
+
Type[LatchFile],
|
|
400
|
+
Type[LatchDir],
|
|
413
401
|
]
|
|
414
402
|
|
|
415
403
|
|
|
416
|
-
T = TypeVar("T", bound=ParameterType)
|
|
417
|
-
|
|
418
|
-
|
|
419
404
|
@dataclass
|
|
420
|
-
class SnakemakeParameter(
|
|
421
|
-
type: Optional[
|
|
405
|
+
class SnakemakeParameter(LatchParameter):
|
|
406
|
+
type: Optional[ParameterType] = None
|
|
422
407
|
"""
|
|
423
408
|
The python type of the parameter.
|
|
424
409
|
"""
|
|
425
|
-
|
|
410
|
+
# todo(ayush): needs to be typed properly
|
|
411
|
+
default: Optional[Any] = None
|
|
426
412
|
|
|
427
413
|
|
|
428
414
|
@dataclass
|
|
429
|
-
class SnakemakeFileParameter(SnakemakeParameter
|
|
415
|
+
class SnakemakeFileParameter(SnakemakeParameter):
|
|
430
416
|
"""
|
|
431
417
|
Deprecated: use `file_metadata` keyword in `SnakemakeMetadata` instead
|
|
432
418
|
"""
|
|
@@ -470,29 +456,6 @@ class SnakemakeFileMetadata:
|
|
|
470
456
|
"""
|
|
471
457
|
|
|
472
458
|
|
|
473
|
-
@dataclass
|
|
474
|
-
class NextflowParameter(Generic[T], LatchParameter):
|
|
475
|
-
type: Optional[Type[T]] = None
|
|
476
|
-
"""
|
|
477
|
-
The python type of the parameter.
|
|
478
|
-
"""
|
|
479
|
-
default: Optional[T] = None
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
@dataclass
|
|
483
|
-
class NextflowFileParameter(NextflowParameter[Union[LatchFile, LatchDir]]):
|
|
484
|
-
path: Optional[Path] = None
|
|
485
|
-
"""
|
|
486
|
-
The path where the file passed to this parameter will be copied.
|
|
487
|
-
"""
|
|
488
|
-
|
|
489
|
-
_download: bool = field(default=True, init=False)
|
|
490
|
-
|
|
491
|
-
def __post_init__(self):
|
|
492
|
-
if self.type is LatchOutputDir:
|
|
493
|
-
self._download = False
|
|
494
|
-
|
|
495
|
-
|
|
496
459
|
@dataclass
|
|
497
460
|
class LatchMetadata:
|
|
498
461
|
"""Class for organizing workflow metadata
|
|
@@ -608,10 +571,6 @@ class DockerMetadata:
|
|
|
608
571
|
"""
|
|
609
572
|
The name of the Latch Secret that contains the password for the private repository
|
|
610
573
|
"""
|
|
611
|
-
server: Optional[str] = None
|
|
612
|
-
"""
|
|
613
|
-
The name of a docker server to login to, if relevant (eg. registry.gitlab.com)
|
|
614
|
-
"""
|
|
615
574
|
|
|
616
575
|
|
|
617
576
|
@dataclass
|
|
@@ -669,7 +628,6 @@ class SnakemakeMetadata(LatchMetadata):
|
|
|
669
628
|
"""
|
|
670
629
|
|
|
671
630
|
def validate(self):
|
|
672
|
-
from latch_cli.extras.snakemake.config import validate_snakemake_type
|
|
673
631
|
|
|
674
632
|
for name, param in self.parameters.items():
|
|
675
633
|
if param.default is None:
|
|
@@ -693,26 +651,3 @@ class SnakemakeMetadata(LatchMetadata):
|
|
|
693
651
|
|
|
694
652
|
|
|
695
653
|
_snakemake_metadata: Optional[SnakemakeMetadata] = None
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
@dataclass
|
|
699
|
-
class NextflowMetadata(LatchMetadata):
|
|
700
|
-
name: Optional[str] = None
|
|
701
|
-
parameters: Dict[str, NextflowParameter] = field(default_factory=dict)
|
|
702
|
-
output_directory: Optional[LatchDir] = None
|
|
703
|
-
docker_metadata: Optional[DockerMetadata] = None
|
|
704
|
-
|
|
705
|
-
def __post_init__(self):
|
|
706
|
-
if self.name is None:
|
|
707
|
-
self.name = f"nf_{identifier_suffix_from_str(self.display_name.lower())}"
|
|
708
|
-
else:
|
|
709
|
-
self.name = identifier_suffix_from_str(self.name)
|
|
710
|
-
|
|
711
|
-
if self.output_directory is None:
|
|
712
|
-
self.output_directory = LatchDir("latch:///Nextflow Outputs/")
|
|
713
|
-
|
|
714
|
-
global _nextflow_metadata
|
|
715
|
-
_nextflow_metadata = self
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
_nextflow_metadata: Optional[NextflowMetadata] = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: latch
|
|
3
|
-
Version: 2.40.
|
|
3
|
+
Version: 2.40.6
|
|
4
4
|
Summary: The Latch SDK
|
|
5
5
|
Author-email: kenny@latch.bio
|
|
6
6
|
Classifier: Programming Language :: Python :: 3.8
|
|
@@ -18,7 +18,7 @@ Requires-Dist: paramiko>=3.2.0
|
|
|
18
18
|
Requires-Dist: scp>=0.14.0
|
|
19
19
|
Requires-Dist: boto3>=1.26.0
|
|
20
20
|
Requires-Dist: tqdm>=4.63.0
|
|
21
|
-
Requires-Dist: lytekit==0.15.
|
|
21
|
+
Requires-Dist: lytekit==0.15.6
|
|
22
22
|
Requires-Dist: lytekitplugins-pods==0.6.2
|
|
23
23
|
Requires-Dist: typing-extensions==4.7.1
|
|
24
24
|
Requires-Dist: apscheduler==3.9.1
|
|
@@ -80,35 +80,6 @@ latch_cli/exceptions/cache.py
|
|
|
80
80
|
latch_cli/exceptions/errors.py
|
|
81
81
|
latch_cli/exceptions/handler.py
|
|
82
82
|
latch_cli/exceptions/traceback.py
|
|
83
|
-
latch_cli/extras/__init__.py
|
|
84
|
-
latch_cli/extras/common/__init__.py
|
|
85
|
-
latch_cli/extras/common/serialize.py
|
|
86
|
-
latch_cli/extras/common/utils.py
|
|
87
|
-
latch_cli/extras/common/config/__init__.py
|
|
88
|
-
latch_cli/extras/common/config/parser.py
|
|
89
|
-
latch_cli/extras/common/config/utils.py
|
|
90
|
-
latch_cli/extras/nextflow/__init__.py
|
|
91
|
-
latch_cli/extras/nextflow/build.py
|
|
92
|
-
latch_cli/extras/nextflow/channel.py
|
|
93
|
-
latch_cli/extras/nextflow/config.py
|
|
94
|
-
latch_cli/extras/nextflow/dag.py
|
|
95
|
-
latch_cli/extras/nextflow/file_persistence.py
|
|
96
|
-
latch_cli/extras/nextflow/serialize.py
|
|
97
|
-
latch_cli/extras/nextflow/workflow.py
|
|
98
|
-
latch_cli/extras/nextflow/tasks/__init__.py
|
|
99
|
-
latch_cli/extras/nextflow/tasks/adapters.py
|
|
100
|
-
latch_cli/extras/nextflow/tasks/base.py
|
|
101
|
-
latch_cli/extras/nextflow/tasks/conditional.py
|
|
102
|
-
latch_cli/extras/nextflow/tasks/map.py
|
|
103
|
-
latch_cli/extras/nextflow/tasks/merge.py
|
|
104
|
-
latch_cli/extras/nextflow/tasks/operator.py
|
|
105
|
-
latch_cli/extras/nextflow/tasks/process.py
|
|
106
|
-
latch_cli/extras/snakemake/__init__.py
|
|
107
|
-
latch_cli/extras/snakemake/config.py
|
|
108
|
-
latch_cli/extras/snakemake/serialize.py
|
|
109
|
-
latch_cli/extras/snakemake/single_task_snakemake.py
|
|
110
|
-
latch_cli/extras/snakemake/utils.py
|
|
111
|
-
latch_cli/extras/snakemake/workflow.py
|
|
112
83
|
latch_cli/services/__init__.py
|
|
113
84
|
latch_cli/services/get.py
|
|
114
85
|
latch_cli/services/get_executions.py
|
|
@@ -158,9 +129,6 @@ latch_cli/services/init/example_conda/environment.yaml
|
|
|
158
129
|
latch_cli/services/init/example_conda/__pycache__/__init__.cpython-310.pyc
|
|
159
130
|
latch_cli/services/init/example_docker/__init__.py
|
|
160
131
|
latch_cli/services/init/example_docker/task.py
|
|
161
|
-
latch_cli/services/init/example_nextflow/main.nf
|
|
162
|
-
latch_cli/services/init/example_nextflow/nextflow.config
|
|
163
|
-
latch_cli/services/init/example_nextflow/workflow.nf
|
|
164
132
|
latch_cli/services/init/example_nf_integration/latch_metadata/__pycache__/__init__.cpython-311.pyc
|
|
165
133
|
latch_cli/services/init/example_nfcore/Dockerfile
|
|
166
134
|
latch_cli/services/init/example_nfcore/__init__.py
|
|
@@ -191,10 +159,18 @@ latch_cli/services/test_data/ls.py
|
|
|
191
159
|
latch_cli/services/test_data/remove.py
|
|
192
160
|
latch_cli/services/test_data/upload.py
|
|
193
161
|
latch_cli/services/test_data/utils.py
|
|
162
|
+
latch_cli/snakemake/__init__.py
|
|
163
|
+
latch_cli/snakemake/serialize.py
|
|
164
|
+
latch_cli/snakemake/serialize_utils.py
|
|
165
|
+
latch_cli/snakemake/single_task_snakemake.py
|
|
166
|
+
latch_cli/snakemake/utils.py
|
|
167
|
+
latch_cli/snakemake/workflow.py
|
|
168
|
+
latch_cli/snakemake/config/__init__.py
|
|
169
|
+
latch_cli/snakemake/config/parser.py
|
|
170
|
+
latch_cli/snakemake/config/utils.py
|
|
194
171
|
latch_cli/tui/__init__.py
|
|
195
172
|
latch_cli/utils/__init__.py
|
|
196
173
|
latch_cli/utils/path.py
|
|
197
|
-
latch_cli/utils/workflow.py
|
|
198
174
|
tests/__init__.py
|
|
199
175
|
tests/fixtures.py
|
|
200
176
|
tests/test_ls.py
|
|
@@ -164,13 +164,15 @@ class OAuth2:
|
|
|
164
164
|
"""
|
|
165
165
|
|
|
166
166
|
token_url = self.authz_server_host + "/oauth/token"
|
|
167
|
-
token_body: bytes = json.dumps(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
167
|
+
token_body: bytes = json.dumps(
|
|
168
|
+
{
|
|
169
|
+
"grant_type": "authorization_code",
|
|
170
|
+
"client_id": self.client_id,
|
|
171
|
+
"code_verifier": self.pkce.verifier,
|
|
172
|
+
"code": auth_code,
|
|
173
|
+
"redirect_uri": self.redirect_url,
|
|
174
|
+
}
|
|
175
|
+
).encode("utf-8")
|
|
174
176
|
token_request = urllib.request.Request(token_url, token_body)
|
|
175
177
|
token_request.add_header("Content-Type", "application/json")
|
|
176
178
|
with urllib.request.urlopen(
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import os
|
|
2
1
|
import re
|
|
3
2
|
import sys
|
|
4
|
-
import time
|
|
5
3
|
import traceback
|
|
6
4
|
from dataclasses import dataclass
|
|
7
5
|
from pathlib import Path
|
|
8
6
|
from textwrap import dedent
|
|
9
|
-
from typing import Dict, Optional, Tuple
|
|
7
|
+
from typing import Dict, Optional, Tuple
|
|
10
8
|
|
|
11
9
|
import click
|
|
12
10
|
import docker
|
|
@@ -53,7 +51,7 @@ class _CentromereCtx:
|
|
|
53
51
|
dkr_repo: Optional[str] = None
|
|
54
52
|
dkr_client: Optional[docker.APIClient] = None
|
|
55
53
|
ssh_client: Optional[paramiko.SSHClient] = None
|
|
56
|
-
pkg_root: Path # root
|
|
54
|
+
pkg_root: Optional[Path] = None # root
|
|
57
55
|
disable_auto_version: bool = False
|
|
58
56
|
image_full = None
|
|
59
57
|
version = None
|
|
@@ -61,7 +59,6 @@ class _CentromereCtx:
|
|
|
61
59
|
default_container: _Container
|
|
62
60
|
workflow_type: WorkflowType
|
|
63
61
|
snakefile: Optional[Path]
|
|
64
|
-
nf_script: Optional[Path]
|
|
65
62
|
|
|
66
63
|
latch_register_api_url = config.api.workflow.register
|
|
67
64
|
latch_image_api_url = config.api.workflow.upload_image
|
|
@@ -83,37 +80,26 @@ class _CentromereCtx:
|
|
|
83
80
|
disable_auto_version: bool = False,
|
|
84
81
|
remote: bool = False,
|
|
85
82
|
snakefile: Optional[Path] = None,
|
|
86
|
-
nf_script: Optional[Path] = None,
|
|
87
83
|
use_new_centromere: bool = False,
|
|
88
84
|
):
|
|
89
85
|
self.use_new_centromere = use_new_centromere
|
|
90
86
|
self.remote = remote
|
|
91
87
|
self.disable_auto_version = disable_auto_version
|
|
92
|
-
self.pkg_root = pkg_root.resolve()
|
|
93
88
|
|
|
94
89
|
try:
|
|
95
90
|
self.token = retrieve_or_login()
|
|
96
91
|
self.account_id = current_workspace()
|
|
97
92
|
|
|
98
93
|
self.dkr_repo = config.dkr_repo
|
|
94
|
+
self.pkg_root = pkg_root.resolve()
|
|
99
95
|
|
|
100
|
-
if snakefile
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
" register command."
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
if snakefile is not None:
|
|
96
|
+
if snakefile is None:
|
|
97
|
+
self.workflow_type = WorkflowType.latchbiosdk
|
|
98
|
+
else:
|
|
107
99
|
self.workflow_type = WorkflowType.snakemake
|
|
108
100
|
self.snakefile = snakefile
|
|
109
|
-
elif nf_script is not None:
|
|
110
|
-
self.workflow_type = WorkflowType.nextflow
|
|
111
|
-
self.nf_script = nf_script
|
|
112
|
-
else:
|
|
113
|
-
self.workflow_type = WorkflowType.latchbiosdk
|
|
114
101
|
|
|
115
102
|
self.container_map: Dict[str, _Container] = {}
|
|
116
|
-
|
|
117
103
|
if self.workflow_type == WorkflowType.latchbiosdk:
|
|
118
104
|
_import_flyte_objects([self.pkg_root])
|
|
119
105
|
for entity in FlyteEntities.entities:
|
|
@@ -121,40 +107,36 @@ class _CentromereCtx:
|
|
|
121
107
|
self.workflow_name = entity.name
|
|
122
108
|
|
|
123
109
|
if isinstance(entity, PythonTask):
|
|
124
|
-
|
|
125
|
-
entity, "dockerfile_path"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if dockerfile_path is not None:
|
|
110
|
+
if (
|
|
111
|
+
hasattr(entity, "dockerfile_path")
|
|
112
|
+
and entity.dockerfile_path is not None
|
|
113
|
+
):
|
|
129
114
|
self.container_map[entity.name] = _Container(
|
|
130
|
-
dockerfile=dockerfile_path,
|
|
115
|
+
dockerfile=entity.dockerfile_path,
|
|
131
116
|
image_name=self.task_image_name(entity.name),
|
|
132
|
-
pkg_dir=dockerfile_path.parent,
|
|
117
|
+
pkg_dir=entity.dockerfile_path.parent,
|
|
133
118
|
)
|
|
134
|
-
|
|
135
119
|
if not hasattr(self, "workflow_name"):
|
|
136
120
|
click.secho(
|
|
137
121
|
dedent("""
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"""),
|
|
122
|
+
Unable to locate workflow code. If you
|
|
123
|
+
are a registering a Snakemake project,
|
|
124
|
+
make sure to pass the Snakefile path with
|
|
125
|
+
the --snakefile flag."""),
|
|
143
126
|
fg="red",
|
|
144
127
|
)
|
|
145
128
|
raise click.exceptions.Exit(1)
|
|
146
|
-
|
|
147
|
-
elif self.workflow_type == WorkflowType.snakemake:
|
|
129
|
+
else:
|
|
148
130
|
assert snakefile is not None
|
|
149
131
|
|
|
150
132
|
import latch.types.metadata as metadata
|
|
151
133
|
|
|
152
|
-
from ..
|
|
134
|
+
from ..services.register.utils import import_module_by_path
|
|
135
|
+
from ..snakemake.serialize import (
|
|
153
136
|
get_snakemake_metadata_example,
|
|
154
137
|
snakemake_workflow_extractor,
|
|
155
138
|
)
|
|
156
|
-
from ..
|
|
157
|
-
from ..services.register.utils import import_module_by_path
|
|
139
|
+
from ..snakemake.utils import load_snakemake_metadata
|
|
158
140
|
|
|
159
141
|
meta_file = load_snakemake_metadata(pkg_root)
|
|
160
142
|
if meta_file is not None:
|
|
@@ -169,17 +151,18 @@ class _CentromereCtx:
|
|
|
169
151
|
except (ImportError, FileNotFoundError):
|
|
170
152
|
traceback.print_exc()
|
|
171
153
|
click.secho(
|
|
172
|
-
"\n\n\
|
|
173
|
-
"
|
|
154
|
+
"\n\n\n"
|
|
155
|
+
+ "The above error occured when reading "
|
|
156
|
+
+ "the Snakefile to extract workflow metadata.",
|
|
174
157
|
bold=True,
|
|
175
158
|
fg="red",
|
|
176
159
|
)
|
|
177
160
|
click.secho(
|
|
178
|
-
"\nIt is possible to avoid including the Snakefile
|
|
179
|
-
" registration by providing a
|
|
180
|
-
" the workflow root.\nThis
|
|
181
|
-
"
|
|
182
|
-
" locally.",
|
|
161
|
+
"\nIt is possible to avoid including the Snakefile"
|
|
162
|
+
" prior to registration by providing a"
|
|
163
|
+
" `latch_metadata.py` file in the workflow root.\nThis"
|
|
164
|
+
" way it is not necessary to install dependencies or"
|
|
165
|
+
" ensure that Snakemake inputs locally.",
|
|
183
166
|
fg="red",
|
|
184
167
|
)
|
|
185
168
|
click.secho("\nExample ", fg="red", nl=False)
|
|
@@ -224,14 +207,15 @@ class _CentromereCtx:
|
|
|
224
207
|
elif system == "Darwin":
|
|
225
208
|
res = subprocess.run(["open", new_meta]).returncode
|
|
226
209
|
elif system == "Windows":
|
|
210
|
+
import os
|
|
211
|
+
|
|
227
212
|
res = os.system(str(new_meta.resolve()))
|
|
228
213
|
else:
|
|
229
214
|
res = None
|
|
230
215
|
|
|
231
216
|
if res is not None and res != 0:
|
|
232
217
|
click.secho("Failed to open file", fg="red")
|
|
233
|
-
|
|
234
|
-
raise click.exceptions.Exit(1)
|
|
218
|
+
sys.exit(1)
|
|
235
219
|
|
|
236
220
|
if metadata._snakemake_metadata is None:
|
|
237
221
|
click.secho(
|
|
@@ -248,34 +232,6 @@ class _CentromereCtx:
|
|
|
248
232
|
# name for snakemake
|
|
249
233
|
self.workflow_name = f"{metadata._snakemake_metadata.name}_jit_register"
|
|
250
234
|
|
|
251
|
-
else:
|
|
252
|
-
assert nf_script is not None
|
|
253
|
-
|
|
254
|
-
import latch.types.metadata as metadata
|
|
255
|
-
|
|
256
|
-
from ..services.register.utils import import_module_by_path
|
|
257
|
-
|
|
258
|
-
meta = pkg_root / "latch_metadata" / "__init__.py"
|
|
259
|
-
if meta.exists():
|
|
260
|
-
click.echo(f"Using metadata file {click.style(meta, italic=True)}")
|
|
261
|
-
import_module_by_path(meta)
|
|
262
|
-
|
|
263
|
-
if metadata._nextflow_metadata is None:
|
|
264
|
-
click.secho(
|
|
265
|
-
dedent(
|
|
266
|
-
"Make sure a `latch_metadata` package exists in the"
|
|
267
|
-
" nextflow project root."
|
|
268
|
-
"\nYou can generate this package with the"
|
|
269
|
-
"`latch generate-metadata --nextflow <pkg_root>` command.",
|
|
270
|
-
),
|
|
271
|
-
fg="red",
|
|
272
|
-
)
|
|
273
|
-
raise click.exceptions.Exit(1)
|
|
274
|
-
|
|
275
|
-
self.workflow_name = metadata._nextflow_metadata.name
|
|
276
|
-
|
|
277
|
-
assert self.workflow_name is not None
|
|
278
|
-
|
|
279
235
|
version_file = self.pkg_root / "version"
|
|
280
236
|
try:
|
|
281
237
|
self.version = version_file.read_text()
|
|
@@ -290,11 +246,7 @@ class _CentromereCtx:
|
|
|
290
246
|
if not self.disable_auto_version:
|
|
291
247
|
hash = hash_directory(self.pkg_root)
|
|
292
248
|
self.version = f"{self.version}-{hash[:6]}"
|
|
293
|
-
|
|
294
|
-
if os.environ.get("LATCH_NEW_VERSION_ALWAYS") is not None:
|
|
295
|
-
self.version = f"{self.version}-{int(time.monotonic())}"
|
|
296
|
-
|
|
297
|
-
click.echo()
|
|
249
|
+
click.echo(f" {self.version}\n")
|
|
298
250
|
|
|
299
251
|
if self.nucleus_check_version(self.version, self.workflow_name):
|
|
300
252
|
click.secho(
|
|
@@ -372,8 +324,6 @@ class _CentromereCtx:
|
|
|
372
324
|
|
|
373
325
|
from ..utils import identifier_suffix_from_str
|
|
374
326
|
|
|
375
|
-
assert self.workflow_name is not None
|
|
376
|
-
|
|
377
327
|
wf_name = identifier_suffix_from_str(self.workflow_name).lower()
|
|
378
328
|
wf_name = docker_image_name_illegal_pat.sub("_", wf_name)
|
|
379
329
|
|
|
@@ -110,9 +110,6 @@ class AnsiCodes:
|
|
|
110
110
|
bold = "\x1b[1m"
|
|
111
111
|
reset_bold = "\x1b[22m"
|
|
112
112
|
|
|
113
|
-
italic = "\x1b[3m"
|
|
114
|
-
reset_italic = "\x1b[23m"
|
|
115
|
-
|
|
116
113
|
underline = "\x1b[4m"
|
|
117
114
|
no_underline = "\x1b[24m"
|
|
118
115
|
|
|
@@ -122,17 +119,13 @@ class AnsiCodes:
|
|
|
122
119
|
url_end = "\x1b]8;;\x1b\\"
|
|
123
120
|
|
|
124
121
|
|
|
125
|
-
def
|
|
126
|
-
return f"{AnsiCodes.italic}{s}{AnsiCodes.reset_italic}"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
def bold(s: object) -> str:
|
|
122
|
+
def bold(s: str) -> str:
|
|
130
123
|
return f"{AnsiCodes.bold}{s}{AnsiCodes.reset_bold}"
|
|
131
124
|
|
|
132
125
|
|
|
133
|
-
def underline(s:
|
|
126
|
+
def underline(s: str) -> str:
|
|
134
127
|
return f"{AnsiCodes.underline}{s}{AnsiCodes.no_underline}"
|
|
135
128
|
|
|
136
129
|
|
|
137
|
-
def color(s:
|
|
130
|
+
def color(s: str, *, color: str = AnsiCodes.color):
|
|
138
131
|
return f"{color}{s}{AnsiCodes.reset_color}"
|
|
@@ -9,7 +9,6 @@ from typing import List
|
|
|
9
9
|
import click
|
|
10
10
|
import yaml
|
|
11
11
|
|
|
12
|
-
from latch_cli.click_utils import color
|
|
13
12
|
from latch_cli.constants import latch_constants
|
|
14
13
|
from latch_cli.utils import WorkflowType
|
|
15
14
|
from latch_cli.workflow_config import LatchWorkflowConfig, create_and_write_config
|
|
@@ -38,12 +37,9 @@ def get_prologue(
|
|
|
38
37
|
) -> List[str]:
|
|
39
38
|
if wf_type == WorkflowType.snakemake:
|
|
40
39
|
library_name = '"latch[snakemake]"'
|
|
41
|
-
elif wf_type == WorkflowType.nextflow:
|
|
42
|
-
library_name = '"latch[nextflow]"'
|
|
43
40
|
else:
|
|
44
41
|
library_name = "latch"
|
|
45
|
-
|
|
46
|
-
directives = [
|
|
42
|
+
return [
|
|
47
43
|
"# DO NOT CHANGE",
|
|
48
44
|
f"from {config.base_image}",
|
|
49
45
|
"",
|
|
@@ -72,11 +68,6 @@ def get_prologue(
|
|
|
72
68
|
f"run pip install {library_name}=={config.latch_version}",
|
|
73
69
|
"run mkdir /opt/latch",
|
|
74
70
|
]
|
|
75
|
-
if wf_type == WorkflowType.nextflow:
|
|
76
|
-
directives.append(
|
|
77
|
-
"run apt-get update && apt-get install -y default-jre-headless"
|
|
78
|
-
)
|
|
79
|
-
return directives
|
|
80
71
|
|
|
81
72
|
|
|
82
73
|
def get_epilogue(wf_type: WorkflowType = WorkflowType.latchbiosdk) -> List[str]:
|
|
@@ -87,19 +78,8 @@ def get_epilogue(wf_type: WorkflowType = WorkflowType.latchbiosdk) -> List[str]:
|
|
|
87
78
|
"",
|
|
88
79
|
"# Latch snakemake workflow entrypoint",
|
|
89
80
|
"# DO NOT CHANGE",
|
|
90
|
-
"",
|
|
91
81
|
"copy .latch/snakemake_jit_entrypoint.py /root/snakemake_jit_entrypoint.py",
|
|
92
82
|
]
|
|
93
|
-
elif wf_type == WorkflowType.nextflow:
|
|
94
|
-
cmds += [
|
|
95
|
-
"",
|
|
96
|
-
"# Latch nextflow workflow entrypoint",
|
|
97
|
-
"# DO NOT CHANGE",
|
|
98
|
-
"",
|
|
99
|
-
"copy .latch/bin/nextflow /root/nextflow",
|
|
100
|
-
"copy .latch/.nextflow /root/.nextflow",
|
|
101
|
-
"copy .latch/nf_entrypoint.py /root/nf_entrypoint.py",
|
|
102
|
-
]
|
|
103
83
|
|
|
104
84
|
cmds += [
|
|
105
85
|
"",
|
|
@@ -359,8 +339,18 @@ def generate_dockerfile(
|
|
|
359
339
|
with (pkg_root / latch_constants.pkg_config).open("r") as f:
|
|
360
340
|
config = LatchWorkflowConfig(**json.load(f))
|
|
361
341
|
|
|
362
|
-
click.echo(
|
|
363
|
-
|
|
342
|
+
click.echo(
|
|
343
|
+
" ".join([
|
|
344
|
+
click.style("Base image:", fg="bright_blue"),
|
|
345
|
+
config.base_image,
|
|
346
|
+
])
|
|
347
|
+
)
|
|
348
|
+
click.echo(
|
|
349
|
+
" ".join([
|
|
350
|
+
click.style("Latch SDK version:", fg="bright_blue"),
|
|
351
|
+
config.latch_version,
|
|
352
|
+
])
|
|
353
|
+
)
|
|
364
354
|
click.echo()
|
|
365
355
|
|
|
366
356
|
with outfile.open("w") as f:
|