cwltool.cwlprov.writablebagfile
Stores class definition of ResearchObject and WritableBagFile.
Classes
Writes files in research object. |
Functions
|
Write the bag file into our research object. |
|
Begin the per-activity log. |
|
Close the Research Object, optionally saving to specified folder. |
|
Pack CWL description to generate re-runnable CWL object in RO. |
|
Generate the new job object with RO specific relative paths. |
Module Contents
- class cwltool.cwlprov.writablebagfile.WritableBagFile(research_object, rel_path)
Bases:
io.FileIO
Writes files in research object.
- Parameters:
research_object (cwltool.cwlprov.ro.ResearchObject)
rel_path (str)
- research_object
- rel_path
- hashes
- close()
Flush and close this stream.
Finalize checksums and manifests.
- Return type:
None
- cwltool.cwlprov.writablebagfile.write_bag_file(research_object, path, encoding=ENCODING)
Write the bag file into our research object.
- Parameters:
research_object (cwltool.cwlprov.ro.ResearchObject)
path (str)
encoding (Optional[str])
- Return type:
Union[io.TextIOWrapper, WritableBagFile]
- cwltool.cwlprov.writablebagfile.open_log_file_for_activity(research_object, uuid_uri)
Begin the per-activity log.
- Parameters:
research_object (cwltool.cwlprov.ro.ResearchObject)
uuid_uri (str)
- Return type:
Union[io.TextIOWrapper, WritableBagFile]
- cwltool.cwlprov.writablebagfile.close_ro(research_object, save_to=None)
Close the Research Object, optionally saving to specified folder.
Closing will remove any temporary files used by this research object. After calling this method, this ResearchObject instance can no longer be used, except for no-op calls to .close().
The ‘saveTo’ folder should not exist - if it does, it will be deleted.
It is safe to call this function multiple times without the ‘saveTo’ argument, e.g. within a try..finally block to ensure the temporary files of this Research Object are removed.
- Parameters:
research_object (cwltool.cwlprov.ro.ResearchObject)
save_to (Optional[str])
- Return type:
None
- cwltool.cwlprov.writablebagfile.packed_workflow(research_object, packed)
Pack CWL description to generate re-runnable CWL object in RO.
- Parameters:
research_object (cwltool.cwlprov.ro.ResearchObject)
packed (str)
- Return type:
None
- cwltool.cwlprov.writablebagfile.create_job(research_object, builder_job, is_output=False)
Generate the new job object with RO specific relative paths.
- Parameters:
research_object (cwltool.cwlprov.ro.ResearchObject)
builder_job (cwltool.utils.CWLObjectType)
is_output (bool)
- Return type:
cwltool.utils.CWLObjectType