latch 2.40.4.dev7__tar.gz → 2.40.4.dev8__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.dev7/latch.egg-info → latch-2.40.4.dev8}/PKG-INFO +1 -1
- {latch-2.40.4.dev7 → latch-2.40.4.dev8/latch.egg-info}/PKG-INFO +1 -1
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/common/utils.py +15 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/build.py +1 -1
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/file_persistence.py +7 -2
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/tasks/base.py +6 -2
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/tasks/operator.py +2 -2
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/tasks/process.py +17 -49
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/workflow.py +18 -1
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/__pycache__/__init__.cpython-310.pyc +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/__pycache__/init.cpython-310.pyc +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/setup.py +1 -1
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/LICENSE +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/MANIFEST.in +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/README.md +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/account.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/executions.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/functions/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/functions/messages.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/functions/operators.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/functions/secrets.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/_transfer/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/_transfer/download.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/_transfer/manager.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/_transfer/node.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/_transfer/progress.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/_transfer/remote_copy.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/_transfer/throttle.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/_transfer/upload.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/_transfer/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/path.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/ldata/type.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/registry/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/registry/project.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/registry/record.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/registry/table.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/registry/types.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/registry/upstream_types/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/registry/upstream_types/types.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/registry/upstream_types/values.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/registry/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/resources/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/resources/conditional.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/resources/dynamic.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/resources/launch_plan.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/resources/map_tasks.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/resources/reference_workflow.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/resources/tasks.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/resources/workflow.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/types/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/types/directory.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/types/file.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/types/glob.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/types/json.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/types/metadata.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/types/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/verified/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/verified/deseq2.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/verified/mafft.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/verified/pathway.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/verified/rnaseq.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch/verified/trim_galore.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch.egg-info/SOURCES.txt +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch.egg-info/dependency_links.txt +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch.egg-info/entry_points.txt +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch.egg-info/requires.txt +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch.egg-info/top_level.txt +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/auth/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/auth/csrf.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/auth/oauth2.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/auth/pkce.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/auth/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/centromere/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/centromere/ctx.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/centromere/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/click_utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/constants.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/docker_utils/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/exceptions/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/exceptions/cache.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/exceptions/errors.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/exceptions/handler.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/exceptions/traceback.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/common/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/common/config/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/common/config/parser.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/common/config/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/common/serialize.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/channel.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/config.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/dag.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/serialize.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/tasks/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/tasks/adapters.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/tasks/conditional.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/tasks/map.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/nextflow/tasks/merge.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/snakemake/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/snakemake/config.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/snakemake/serialize.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/snakemake/single_task_snakemake.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/snakemake/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/extras/snakemake/workflow.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/main.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/menus.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/cp/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/cp/autocomplete.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/cp/glob.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/cp/main.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/cp/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/execute/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/execute/main.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/execute/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/get.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/get_executions.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/get_params.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/assemble_and_sort/.env +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/assemble_and_sort/LICENSE +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/assemble_and_sort/README.md +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/assemble_and_sort/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/assemble_and_sort/assemble.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/assemble_and_sort/sort.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/assemble_and_sort/system-requirements.txt +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/common/.dockerignore +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_conda/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_conda/conda_task.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_conda/environment.yaml +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_docker/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_docker/task.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_nextflow/main.nf +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_nextflow/nextflow.config +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_nextflow/workflow.nf +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_nfcore/Dockerfile +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_nfcore/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_nfcore/task.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_r/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_r/environment.R +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_r/r_task.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/.latch/latch_entrypoint +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/Dockerfile +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/Snakefile +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/config.yaml +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/environment.yaml +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/latch_metadata.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/scripts/plot-quals.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/version +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/init.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/template/LICENSE +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/template/README.md +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/template/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/template/task.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/launch.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/local_dev.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/local_dev_old.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/login.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/ls.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/mkdir.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/move.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/preview.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/register/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/register/constants.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/register/register.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/register/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/rm.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/stop_pod.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/sync.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/test_data/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/test_data/ls.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/test_data/remove.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/test_data/upload.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/test_data/utils.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/workspace.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/tinyrequests.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/tui/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/utils/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/utils/path.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/utils/workflow.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/workflow_config.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/pyproject.toml +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/setup.cfg +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/tests/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/tests/cp/__init__.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/tests/fixtures.py +0 -0
- {latch-2.40.4.dev7 → latch-2.40.4.dev8}/tests/test_ls.py +0 -0
|
@@ -50,6 +50,21 @@ def is_downloadable_blob_type(typ: Type):
|
|
|
50
50
|
return True
|
|
51
51
|
|
|
52
52
|
|
|
53
|
+
def is_output_dir(typ: Type) -> bool:
|
|
54
|
+
if typ is LatchOutputDir:
|
|
55
|
+
return True
|
|
56
|
+
|
|
57
|
+
origin = get_origin(typ)
|
|
58
|
+
if origin is Union:
|
|
59
|
+
return all([
|
|
60
|
+
is_output_dir(sub_typ)
|
|
61
|
+
for sub_typ in get_args(typ)
|
|
62
|
+
if sub_typ is not type(None)
|
|
63
|
+
])
|
|
64
|
+
|
|
65
|
+
return False
|
|
66
|
+
|
|
67
|
+
|
|
53
68
|
def type_repr(t: Type, *, add_namespace: bool = False) -> str:
|
|
54
69
|
if get_origin(t) == Annotated:
|
|
55
70
|
return type_repr(get_args(t)[0])
|
|
@@ -221,7 +221,11 @@ def _upload(local: Path, remote: str):
|
|
|
221
221
|
|
|
222
222
|
|
|
223
223
|
# todo(ayush): use crc or something to avoid reuploading unchanged files
|
|
224
|
-
def upload_files(
|
|
224
|
+
def upload_files(
|
|
225
|
+
channels: Dict[str, List[JSONValue]],
|
|
226
|
+
outdir: LatchDir,
|
|
227
|
+
publish_dir: Optional[LatchDir] = None,
|
|
228
|
+
):
|
|
225
229
|
path_data: List[PathData] = []
|
|
226
230
|
for channel in channels.values():
|
|
227
231
|
if type(channel) == dict and "value" in channel:
|
|
@@ -254,7 +258,8 @@ def upload_files(channels: Dict[str, List[JSONValue]], outdir: LatchDir):
|
|
|
254
258
|
|
|
255
259
|
for file in published_files:
|
|
256
260
|
relative_path = Path(file).relative_to(Path.home())
|
|
257
|
-
|
|
261
|
+
dir = publish_dir.remote_path if publish_dir is not None else remote_parent
|
|
262
|
+
local_to_remote[file] = urljoins(dir, str(relative_path))
|
|
258
263
|
|
|
259
264
|
for local, remote in local_to_remote.items():
|
|
260
265
|
_upload(local, remote)
|
|
@@ -48,7 +48,7 @@ class NextflowBaseTask(PythonAutoContainerTask[Pod]):
|
|
|
48
48
|
nf_task_type: NFTaskType,
|
|
49
49
|
# ayush: 0.5/1 is too small and stuff starts taking a while to run
|
|
50
50
|
cpu: float = 1,
|
|
51
|
-
|
|
51
|
+
memory_gib: float = 2,
|
|
52
52
|
storage_gib: int = 500,
|
|
53
53
|
):
|
|
54
54
|
self.id = id
|
|
@@ -73,13 +73,17 @@ class NextflowBaseTask(PythonAutoContainerTask[Pod]):
|
|
|
73
73
|
|
|
74
74
|
self.branches = branches
|
|
75
75
|
|
|
76
|
+
self.cpu = cpu
|
|
77
|
+
self.memory_gib = memory_gib
|
|
78
|
+
self.storage_gib = storage_gib
|
|
79
|
+
|
|
76
80
|
super().__init__(
|
|
77
81
|
task_type=SdkTaskType.SIDECAR_TASK,
|
|
78
82
|
task_type_version=2,
|
|
79
83
|
name=f"{name}_{id}",
|
|
80
84
|
interface=interface,
|
|
81
85
|
task_config=custom_task(
|
|
82
|
-
cpu=cpu, memory=
|
|
86
|
+
cpu=cpu, memory=memory_gib, storage_gib=storage_gib
|
|
83
87
|
).keywords["task_config"],
|
|
84
88
|
task_resolver=NextflowBaseTaskResolver(),
|
|
85
89
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import json
|
|
2
2
|
from pathlib import Path
|
|
3
|
-
from typing import
|
|
3
|
+
from typing import Dict, List, Mapping, Type
|
|
4
4
|
|
|
5
5
|
from latch.types.directory import LatchDir
|
|
6
6
|
from latch.types.file import LatchFile
|
|
@@ -39,7 +39,7 @@ class NextflowOperatorTask(NextflowBaseTask):
|
|
|
39
39
|
wf,
|
|
40
40
|
NFTaskType.Operator,
|
|
41
41
|
cpu=4,
|
|
42
|
-
|
|
42
|
+
memory_gib=8,
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
def get_fn_interface(self):
|
|
@@ -27,9 +27,17 @@ class NextflowProcessTask(NextflowBaseTask):
|
|
|
27
27
|
execution_profile: Optional[str],
|
|
28
28
|
wf: NextflowWorkflow,
|
|
29
29
|
cpu: Optional[int] = None,
|
|
30
|
-
|
|
30
|
+
memory_bytes: Optional[int] = None,
|
|
31
31
|
storage_gib: int = 500,
|
|
32
32
|
):
|
|
33
|
+
if cpu is None:
|
|
34
|
+
cpu = 4
|
|
35
|
+
|
|
36
|
+
if memory_bytes is None:
|
|
37
|
+
memory_gib = 16
|
|
38
|
+
else:
|
|
39
|
+
memory_gib = memory_bytes // (1024**3)
|
|
40
|
+
|
|
33
41
|
super().__init__(
|
|
34
42
|
inputs,
|
|
35
43
|
outputs,
|
|
@@ -38,6 +46,9 @@ class NextflowProcessTask(NextflowBaseTask):
|
|
|
38
46
|
{},
|
|
39
47
|
wf,
|
|
40
48
|
NFTaskType.Process,
|
|
49
|
+
cpu=cpu,
|
|
50
|
+
memory_gib=memory_gib,
|
|
51
|
+
storage_gib=storage_gib,
|
|
41
52
|
)
|
|
42
53
|
|
|
43
54
|
self.wf_inputs = {}
|
|
@@ -108,19 +119,6 @@ class NextflowProcessTask(NextflowBaseTask):
|
|
|
108
119
|
else:
|
|
109
120
|
wf_paths["{k}"] = Path("/root") / "{k}"
|
|
110
121
|
|
|
111
|
-
""",
|
|
112
|
-
0,
|
|
113
|
-
)
|
|
114
|
-
elif is_blob_type(typ):
|
|
115
|
-
code_block += reindent(
|
|
116
|
-
f"""
|
|
117
|
-
if {k} is not None:
|
|
118
|
-
if not {pre_execute}:
|
|
119
|
-
{k}_p = Path("/root/").resolve() # superhack
|
|
120
|
-
wf_paths["{k}"] = {k}_p
|
|
121
|
-
else:
|
|
122
|
-
wf_paths["{k}"] = Path("/root") / "{k}"
|
|
123
|
-
|
|
124
122
|
""",
|
|
125
123
|
0,
|
|
126
124
|
)
|
|
@@ -225,15 +223,15 @@ class NextflowProcessTask(NextflowBaseTask):
|
|
|
225
223
|
|
|
226
224
|
def allocate_cpu({input_name}: {type_repr(input_t)}) -> int:
|
|
227
225
|
res = _read_resources()
|
|
228
|
-
return max(1, res['cpu_cores']) if res.get('cpu_cores') is not None else
|
|
226
|
+
return max(1, res['cpu_cores']) if res.get('cpu_cores') is not None else {self.cpu}
|
|
229
227
|
|
|
230
228
|
def allocate_memory({input_name}: {type_repr(input_t)}) -> int:
|
|
231
229
|
res = _read_resources()
|
|
232
|
-
return max(1, res['memory_bytes'] // 1024**3) if res.get('memory_bytes') is not None else
|
|
230
|
+
return max(1, res['memory_bytes'] // 1024**3) if res.get('memory_bytes') is not None else {self.memory_gib}
|
|
233
231
|
|
|
234
232
|
def allocate_disk({input_name}: {type_repr(input_t)}) -> int:
|
|
235
233
|
res = _read_resources()
|
|
236
|
-
return max(1, res['disk_bytes'] // 1024**3) if res.get('disk_bytes') is not None else
|
|
234
|
+
return max(1, res['disk_bytes'] // 1024**3) if res.get('disk_bytes') is not None else {self.storage_gib}
|
|
237
235
|
|
|
238
236
|
def get_resources({input_name}: {type_repr(input_t)}):
|
|
239
237
|
""")
|
|
@@ -283,37 +281,6 @@ class NextflowProcessTask(NextflowBaseTask):
|
|
|
283
281
|
0,
|
|
284
282
|
).replace("||return|str||", return_str)
|
|
285
283
|
|
|
286
|
-
def get_fn_return_stmt(self):
|
|
287
|
-
results: List[str] = []
|
|
288
|
-
|
|
289
|
-
res_type = list(self._python_outputs.values())[0]
|
|
290
|
-
|
|
291
|
-
if res_type is None:
|
|
292
|
-
return " return None"
|
|
293
|
-
|
|
294
|
-
assert is_dataclass(res_type)
|
|
295
|
-
|
|
296
|
-
for field in fields(res_type):
|
|
297
|
-
results.append(
|
|
298
|
-
reindent(
|
|
299
|
-
rf"""
|
|
300
|
-
{field.name}=out_channels.get(f"{field.name}")
|
|
301
|
-
""",
|
|
302
|
-
2,
|
|
303
|
-
).rstrip()
|
|
304
|
-
)
|
|
305
|
-
|
|
306
|
-
return_str = ",\n".join(results)
|
|
307
|
-
|
|
308
|
-
return reindent(
|
|
309
|
-
rf"""
|
|
310
|
-
return {res_type.__name__}(
|
|
311
|
-
||return|str||
|
|
312
|
-
)
|
|
313
|
-
""",
|
|
314
|
-
0,
|
|
315
|
-
).replace("||return|str||", return_str)
|
|
316
|
-
|
|
317
284
|
def get_fn_code(self, nf_script_path_in_container: Path):
|
|
318
285
|
code_block = dedent(self.get_fn_interface(nf_script_path_in_container))
|
|
319
286
|
|
|
@@ -333,7 +300,8 @@ class NextflowProcessTask(NextflowBaseTask):
|
|
|
333
300
|
|
|
334
301
|
print(out_channels)
|
|
335
302
|
|
|
336
|
-
|
|
303
|
+
publish_dir = {self.wf.publish_dir_param}
|
|
304
|
+
upload_files(out_channels, LatchDir({repr(self.wf.output_directory.remote_path)}), publish_dir)
|
|
337
305
|
|
|
338
306
|
out_channels = {{k: json.dumps(v) for k, v in out_channels.items()}}
|
|
339
307
|
|
|
@@ -15,7 +15,11 @@ from flytekit.core.workflow import (
|
|
|
15
15
|
from flytekit.exceptions import scopes as exception_scopes
|
|
16
16
|
|
|
17
17
|
from latch.types import metadata
|
|
18
|
-
from latch_cli.extras.common.utils import
|
|
18
|
+
from latch_cli.extras.common.utils import (
|
|
19
|
+
is_blob_type,
|
|
20
|
+
is_downloadable_blob_type,
|
|
21
|
+
is_output_dir,
|
|
22
|
+
)
|
|
19
23
|
|
|
20
24
|
from .dag import DAG
|
|
21
25
|
|
|
@@ -33,6 +37,9 @@ from .dag import DAG
|
|
|
33
37
|
|
|
34
38
|
|
|
35
39
|
def _get_flags_to_params(key: str, t: Type, flags: Dict[str, str]):
|
|
40
|
+
if is_output_dir(t):
|
|
41
|
+
return
|
|
42
|
+
|
|
36
43
|
if is_blob_type(t):
|
|
37
44
|
flags[f"--{key}"] = f"wf_paths['wf_{key}']"
|
|
38
45
|
elif is_dataclass(t):
|
|
@@ -87,6 +94,16 @@ class NextflowWorkflow(WorkflowBase, ClassStorageTaskResolver):
|
|
|
87
94
|
if is_downloadable_blob_type(v.type)
|
|
88
95
|
}
|
|
89
96
|
|
|
97
|
+
self.publish_dir_param = None
|
|
98
|
+
for k, v in metadata._nextflow_metadata.parameters.items():
|
|
99
|
+
if is_output_dir(v.type):
|
|
100
|
+
if self.publish_dir_param is not None:
|
|
101
|
+
click.secho(
|
|
102
|
+
"Only one LatchOutputDir parameter is allowed.", fg="red"
|
|
103
|
+
)
|
|
104
|
+
raise click.exceptions.Exit(1)
|
|
105
|
+
self.publish_dir_param = f"wf_{k}"
|
|
106
|
+
|
|
90
107
|
name = metadata._nextflow_metadata.name
|
|
91
108
|
assert name is not None
|
|
92
109
|
|
{latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/__pycache__/__init__.cpython-310.pyc
RENAMED
|
Binary file
|
{latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/__pycache__/init.cpython-310.pyc
RENAMED
|
Binary file
|
|
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
|
|
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.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/assemble_and_sort/__init__.py
RENAMED
|
File without changes
|
{latch-2.40.4.dev7 → latch-2.40.4.dev8}/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.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_conda/environment.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_nextflow/nextflow.config
RENAMED
|
File without changes
|
{latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_nextflow/workflow.nf
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
|
{latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/Dockerfile
RENAMED
|
File without changes
|
|
File without changes
|
{latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/config.yaml
RENAMED
|
File without changes
|
{latch-2.40.4.dev7 → latch-2.40.4.dev8}/latch_cli/services/init/example_snakemake/environment.yaml
RENAMED
|
File without changes
|
{latch-2.40.4.dev7 → latch-2.40.4.dev8}/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
|