Merge pull request #10334 from simonbray/staging-with-id

Allow 'planemo run' to stage in existing datasets without reuploading
This commit is contained in:
John Chilton
2020-09-30 10:03:29 -04:00
committed by GitHub
+6 -1
View File
@@ -171,6 +171,8 @@ def galactic_job_json(
return replacement_record(value)
def replacement_file(value):
if value.get('galaxy_id'):
return {"src": "hda", "id": value['galaxy_id']}
file_path = value.get("location", None) or value.get("path", None)
# format to match output definitions in tool, where did filetype come from?
filetype = value.get("filetype", None) or value.get("format", None)
@@ -278,6 +280,8 @@ def galactic_job_json(
return collection_element_identifiers
def replacement_collection(value):
if value.get('galaxy_id'):
return {"src": "hdca", "id": value['galaxy_id']}
assert "collection_type" in value
collection_type = value["collection_type"]
elements = to_elements(value, collection_type)
@@ -328,9 +332,10 @@ def _ensure_file_exists(file_path):
class FileLiteralTarget:
def __init__(self, contents, **kwargs):
def __init__(self, contents, path=None, **kwargs):
self.contents = contents
self.properties = kwargs
self.path = path
def __str__(self):
return "FileLiteralTarget[path={}] with {}".format(self.path, self.properties)