Skip to content

Commit

Permalink
Merge pull request #1427 from mvdbeek/fix_workflow_edit
Browse files Browse the repository at this point in the history
Fix workflow_edit
  • Loading branch information
mvdbeek authored Feb 1, 2024
2 parents 2ccbf59 + 5a5ce75 commit 10479b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions planemo/commands/cmd_workflow_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
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

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()
8 changes: 6 additions & 2 deletions planemo/runnable_resolve.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import os
from typing import (
Any,
Dict,
)

import requests

Expand All @@ -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")
Expand All @@ -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:
Expand Down

0 comments on commit 10479b4

Please sign in to comment.