We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b806a0 commit 7d6c437Copy full SHA for 7d6c437
cwltool/provenance.py
@@ -554,6 +554,16 @@ def declare_artefact(self, value):
554
{provM.PROV_TYPE: WFPROV["Artifact"],
555
provM.PROV_VALUE: str(value)})
556
557
+ elif isinstance(value, bytes):
558
+ # If we got here then we must be in Python 3
559
+ byte_s = io.BytesIO(value)
560
+ data_file = self.research_object.add_data_file(byte_s)
561
+ # FIXME: Don't naively assume add_data_file uses hash in filename!
562
+ data_id = "data:%s" % posixpath.split(data_file)[1]
563
+ return self.document.entity(data_id,
564
+ {provM.PROV_TYPE: WFPROV["Artifact"],
565
+ provM.PROV_VALUE: str(value)})
566
+
567
elif isinstance(value, dict):
568
# Base case - we found a File we need to update
569
if value.get("class") == "File":
0 commit comments