Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset import #225

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion abm/lib/dataset.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))

Expand Down