Skip to content
Snippets Groups Projects

version 0.2.0

Merged dilawar requested to merge devel into main
Files
8
+ 11
7
@@ -44,7 +44,7 @@ def session(func):
@app.command("create-container")
@session
def create_remote_container(user_input: str, recreate: bool = False):
def create_remote_container(user_input, recreate: bool = False):
"""Run a pipeline"""
pipeline = bpipeline.user_input_to_pipeline(user_input)
res = bhelper.post_pipeline_task(
@@ -62,9 +62,7 @@ def create_remote_container(user_input: str, recreate: bool = False):
@app.command("list-container")
@session
def list_remote_container(
user_input: str, server: str = bconfig.g_server
) -> T.List[str]:
def list_remote_container(user_input, server: str = bconfig.g_server) -> T.List[str]:
"""List the remote server associated with the pipeline."""
pipeline = bpipeline.user_input_to_pipeline(user_input)
logger.debug(f"sha256 of `{pipeline.zipfile}` is `{pipeline.checksum}`")
@@ -80,7 +78,7 @@ def list_remote_container(
@app.command("logs")
@session
def stream_log(user_input: str, server: str = bconfig.g_server):
def stream_log(user_input, server: str = bconfig.g_server):
"""Stream logs for the most recent run of a given pipeline."""
pipeline = bpipeline.user_input_to_pipeline(user_input)
logger.info(f"Finding container for {user_input}, sha256sum={pipeline.checksum}")
@@ -97,7 +95,7 @@ def stream_log(user_input: str, server: str = bconfig.g_server):
@app.command("submit")
@session
def submit_pipeline(user_input: str, rerun: bool = False):
def submit_pipeline(user_input, rerun: bool = False):
"""Submit your pipelin (url, directory, zip_file).
Prepare the user directory to send to the server. User can also provide link
@@ -112,7 +110,7 @@ def submit_pipeline(user_input: str, rerun: bool = False):
@app.command("run")
@session
def run_pipeline(user_input: str, *, rerun: bool = False):
def run_user_input(user_input, *, rerun: bool = False):
"""Run a pipeline"""
create_remote_container(user_input, recreate=rerun)
containers = list_remote_container(user_input)
@@ -122,6 +120,12 @@ def run_pipeline(user_input: str, *, rerun: bool = False):
]
@app.command("checksum")
def checksum(user_input):
pipeline = bpipeline.user_input_to_pipeline(user_input)
print(pipeline.checksum)
@app.callback()
def main(verbose: bool = False, server: T.Optional[str] = None):
"""
Loading