Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removals in 3.0.0 #309

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions latch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,3 @@
A commandline toolchain to define and register serverless workflows with the
Latch platform.
"""

from latch.functions.messages import message
from latch.functions.operators import (
combine,
group_tuple,
inner_join,
latch_filter,
left_join,
outer_join,
right_join,
)
from latch.resources.conditional import create_conditional_section
from latch.resources.map_tasks import map_task
from latch.resources.reference_workflow import workflow_reference
from latch.resources.tasks import (
custom_task,
custom_memory_optimized_task,
large_gpu_task,
large_task,
medium_task,
small_gpu_task,
small_task,
)
from latch.resources.workflow import workflow
188 changes: 0 additions & 188 deletions latch/functions/operators.py

This file was deleted.

16 changes: 0 additions & 16 deletions latch/types/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +0,0 @@
from latch.types.directory import LatchDir, LatchOutputDir
from latch.types.file import LatchFile, LatchOutputFile
from latch.types.glob import file_glob
from latch.types.metadata import (
Fork,
ForkBranch,
LatchAppearanceType,
LatchAuthor,
LatchMetadata,
LatchParameter,
LatchRule,
Params,
Section,
Spoiler,
Text,
)
5 changes: 0 additions & 5 deletions latch/verified/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
from latch.verified.deseq2 import deseq2_wf
from latch.verified.mafft import mafft
from latch.verified.pathway import gene_ontology_pathway_analysis
from latch.verified.rnaseq import rnaseq
from latch.verified.trim_galore import trim_galore
112 changes: 1 addition & 111 deletions latch_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,55 +410,7 @@ def pad_styled(x: str, l: int, align_right=False):
)


@main.command("launch")
@click.argument("params_file", nargs=1, type=click.Path(exists=True))
@click.option(
"--version",
default=None,
help="The version of the workflow to launch. Defaults to latest.",
)
def launch(params_file: Path, version: Union[str, None] = None):
"""Launch a workflow using a python parameter map."""

crash_handler.message = f"Unable to launch workflow"
crash_handler.pkg_root = str(Path.cwd())

from latch_cli.services.launch import launch

wf_name = launch(params_file, version)
if version is None:
version = "latest"

click.secho(
f"Successfully launched workflow named {wf_name} with version {version}.",
fg="green",
)


@main.command("get-params")
@click.argument("wf_name", nargs=1)
@click.option(
"--version",
default=None,
help="The version of the workflow. Defaults to latest.",
)
def get_params(wf_name: Union[str, None], version: Union[str, None] = None):
"""Generate a python parameter map for a workflow."""
crash_handler.message = "Unable to generate param map for workflow"
crash_handler.pkg_root = str(Path.cwd())

from latch_cli.services.get_params import get_params

get_params(wf_name, version)
if version is None:
version = "latest"
click.secho(
f"Successfully generated python param map named {wf_name}.params.py with"
f" version {version}\n Run `latch launch {wf_name}.params.py` to launch it.",
fg="green",
)


# todo(ayush): rewrite with gql
@main.command("get-wf")
@click.option(
"--name",
Expand Down Expand Up @@ -504,68 +456,6 @@ def open_remote_file(remote_file: str):
click.secho(f"Successfully opened {remote_file}.", fg="green")


@main.command("rm")
@click.argument("remote_path", nargs=1, type=str)
def rm(remote_path: str):
"""Deletes a remote entity."""
crash_handler.message = f"Unable to delete {remote_path}"
crash_handler.pkg_root = str(Path.cwd())

from latch_cli.services.deprecated.rm import rm

click.secho(
f"Warning: `latch rm` is deprecated and will be removed soon.", fg="yellow"
)
rm(remote_path)
click.secho(f"Successfully deleted {remote_path}.", fg="green")


@main.command("mkdir")
@click.argument("remote_directory", nargs=1, type=str)
def mkdir(remote_directory: str):
"""Creates a new remote directory."""
crash_handler.message = f"Unable to create directory {remote_directory}"
crash_handler.pkg_root = str(Path.cwd())

from latch_cli.services.deprecated.mkdir import mkdir

click.secho(
f"Warning: `latch mkdir` is deprecated and will be removed soon.",
fg="yellow",
)
mkdir(remote_directory)
click.secho(f"Successfully created directory {remote_directory}.", fg="green")


@main.command("touch")
@click.argument("remote_file", nargs=1, type=str)
def touch(remote_file: str):
"""Creates an empty text file."""
crash_handler.message = f"Unable to create {remote_file}"
crash_handler.pkg_root = str(Path.cwd())

from latch_cli.services.deprecated.touch import touch

click.secho(
f"Warning: `latch touch` is deprecated and will be removed soon.",
fg="yellow",
)
touch(remote_file)
click.secho(f"Successfully touched {remote_file}.", fg="green")


@main.command("exec")
@click.argument("task_name", nargs=1, type=str)
def execute(task_name: str):
"""Drops the user into an interactive shell from within a task."""
crash_handler.message = f"Unable to exec into {task_name}"
crash_handler.pkg_root = str(Path.cwd())

from latch_cli.services.execute import execute

execute(task_name)


@main.command("preview")
@click.argument("pkg_root", nargs=1, type=click.Path(exists=True, path_type=Path))
def preview(pkg_root: Path):
Expand Down
3 changes: 0 additions & 3 deletions latch_cli/services/deprecated/__init__.py

This file was deleted.

Loading