From a6c5326bee400fc5069ec38f1e0a375547d0b9fc Mon Sep 17 00:00:00 2001 From: Keith Suderman Date: Mon, 26 Jun 2023 16:29:30 -0400 Subject: [PATCH] Add dataset to history by name --- abm/lib/dataset.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/abm/lib/dataset.py b/abm/lib/dataset.py index ba9a987..103d78f 100644 --- a/abm/lib/dataset.py +++ b/abm/lib/dataset.py @@ -1,7 +1,7 @@ import json from bioblend.galaxy import dataset_collections -from common import connect, Context, print_json, _get_dataset_data, _make_dataset_element +from common import connect, Context, print_json, _get_dataset_data, _make_dataset_element, find_history from pprint import pprint from pathlib import Path @@ -147,6 +147,7 @@ def collection(context: Context, args: list): def import_from_config(context: Context, args: list): gi = None key = None + history = None kwargs = {} while len(args) > 0: arg = args.pop(0) @@ -178,6 +179,9 @@ def import_from_config(context: Context, args: list): if gi is None: gi = connect(context) + if history is not None: + history = find_history(gi, history) + response = gi.tools.put_url(url, history, **kwargs) print(json.dumps(response, indent=4))