Skip to content

Commit

Permalink
Merge pull request #1408 from mvdbeek/pretty_print_test_init
Browse files Browse the repository at this point in the history
pretty-print workflow and use correct version of linked workflow
  • Loading branch information
mvdbeek authored Nov 15, 2023
2 parents 86a9fcc + 093a246 commit c36a2fa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions planemo/galaxy/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,9 @@ def get_workflow_from_invocation_id(invocation_id, galaxy_url, galaxy_api_key):
workflow_id = user_gi.invocations.show_invocation(invocation_id)["workflow_id"]
workflow = user_gi.workflows._get(workflow_id, params={"instance": "true"})
workflow_name = "-".join(workflow["name"].split())
user_gi.workflows.export_workflow_to_local_path(
use_default_filename=False, file_local_path=f"./{workflow_name}.ga", workflow_id=workflow["id"]
)

export_dict = user_gi.workflows.export_workflow_dict(workflow_id=workflow["id"], version=workflow["version"])
with open(f"{workflow_name}.ga", "w") as workflow_out:
json.dump(export_dict, workflow_out, indent=4)
return workflow_name


Expand Down

0 comments on commit c36a2fa

Please sign in to comment.