From 7d10c02838bf62dfc208d71857a798fc2f1eaf85 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 1 Feb 2024 13:10:17 +0100 Subject: [PATCH 1/2] Fix workflow_edit --- planemo/commands/cmd_workflow_edit.py | 2 +- planemo/runnable_resolve.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/planemo/commands/cmd_workflow_edit.py b/planemo/commands/cmd_workflow_edit.py index 8392040a3..94e3f54a7 100644 --- a/planemo/commands/cmd_workflow_edit.py +++ b/planemo/commands/cmd_workflow_edit.py @@ -18,7 +18,7 @@ def cli(ctx, workflow_identifier, output=None, force=False, **kwds): """Open a synchronized Galaxy workflow editor.""" assert is_galaxy_engine(**kwds) - runnable = for_runnable_identifier(ctx, workflow_identifier, kwds.get("profile")) + runnable = for_runnable_identifier(ctx, workflow_identifier, kwds) kwds["workflows_from_path"] = True diff --git a/planemo/runnable_resolve.py b/planemo/runnable_resolve.py index 13094114c..ca8c9793b 100644 --- a/planemo/runnable_resolve.py +++ b/planemo/runnable_resolve.py @@ -1,4 +1,8 @@ import os +from typing import ( + Any, + Dict, +) import requests @@ -15,7 +19,7 @@ ) -def for_runnable_identifier(ctx, runnable_identifier, kwds): +def for_runnable_identifier(ctx, runnable_identifier, kwds: Dict[str, Any]): """Convert URI, path, or alias into Runnable.""" # could be a URI, path, or alias current_profile = kwds.get("profile") @@ -33,7 +37,7 @@ def for_runnable_identifier(ctx, runnable_identifier, kwds): return runnable -def for_runnable_identifiers(ctx, runnable_identifiers, kwds): +def for_runnable_identifiers(ctx, runnable_identifiers, kwds: Dict[str, Any]): """Convert lists of URIs, paths, and/or aliases into Runnables.""" runnables = [] for r in runnable_identifiers: From 5a5ce75a96b60a73bac60da6f58b505fec0f9c4e Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 1 Feb 2024 13:29:44 +0100 Subject: [PATCH 2/2] Adjust to new workflow editor entry point --- planemo/commands/cmd_workflow_edit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planemo/commands/cmd_workflow_edit.py b/planemo/commands/cmd_workflow_edit.py index 94e3f54a7..5bb29be0e 100644 --- a/planemo/commands/cmd_workflow_edit.py +++ b/planemo/commands/cmd_workflow_edit.py @@ -25,7 +25,7 @@ def cli(ctx, workflow_identifier, output=None, force=False, **kwds): with engine_context(ctx, **kwds) as galaxy_engine: with galaxy_engine.ensure_runnables_served([runnable]) as config: workflow_id = config.workflow_id_for_runnable(runnable) - url = f"{config.galaxy_url}/workflow/editor?id={workflow_id}" + url = f"{config.galaxy_url}/workflows/edit?id={workflow_id}" click.launch(url) if kwds["engine"] != "external_galaxy": sleep_for_serve()