This module contains classes to represent workflow files in a VHIST workflow step. Workflow files can represent any type of data used in or created by a workflow step, e.g. the source code of your python script or program, important config files, input data, generated outputs, log files or other VHIST files. We categorize workflow files into two classes: input files and output files. Input files are all types of files used as input into the workflow. Output files are files generated by your script or program.
You can embed workflow files directly into a VHIST file. This is especially useful for small files, such as logfiles, configuration files or scripts. Larger files are usually only mentioned in the VHIST file (with information about the file size and md5 checksum), as large files inflate the VHIST file’s size immensely.
Attribute Name | Description |
---|---|
filename | The name of the file (relative or absolute). |
purpose | States if the file is an input file or an output file. This attribute excepts a FilePurpose object. |
description | A description of the file’s role within the workflow step. |
comment | An additional comment about the file. |
filetype | The type of the file in the form of a MIME type or MIME type-like descriptor. Examples are images/png or binary/ecat7. If you do not specify a filetype (set filetype to None), pyvhist will automatically try to derive a mimetype based on the files extension. |
md5file | A file, which contains the md5 checksum of a file. Useful only if you do not embed the workflow file inside the VHIST file and already calculated the checksum of the file for some reason. |
isPreviewWs | Either True or False. If set to True, the file will be displayed as a preview image for the workflow step. Do not use this option directly. Instead use the previews attribute of VhistSection. |
isPreview | Either True or False. If set to True, the file will be displayed as a preview image for the latest preceeding file, which was not a preview itself. Do not use this option directly. Instead use the previews attribute of VhistFile. |
isThumbnail | Do not use this option. |
isThumbnailOnly | Do not use this option. |
optional | Constitutes if the file is optional or not. Set this option to True if the file might not exist. |
automd5 | Either True or False. You can set this option to False if you do not embed this file and do not want VHIST to calculate a checksum for the file (for example because the file is too big or you supplied your own md5 sum with the md5file option. |
embed | Either True or False. If this option is True, the file will be embedded into the VHIST file. Otherwise, the file will only be mentioned in the VHIST file. |
compress | Either True or False. If compress is set to True, the file will be compressed using the flate compression method and embedded in compressed form. |
The purpose of the file. Either input or output
Creates the VhistFile object with purpose set to Input File. All other arguments behave just like the arguments of the VhistFile constructor.
Creates the VhistFile object with purpose set to Output File. All other arguments behave just like the arguments of the VhistFile constructor.
This class represents a vhist workflow file. Each instance of this class can be included in one workflow step (see VhistSection).
Returns whether the file is an input file or not.
Returns whether the file is an output file or not.
The name of the file, including the path
Whether the file is an input or output file
The description of the file
The comment of the file
The filetype of the file
The md5 file of the file
The isPreviewWs property of the file
The isPreview property of the file
The isThumbnail property of the file
The isThumbnailOnly property of the file
The optional property of the file
The automd5 property of the file
The embed property of the file
The compress property of the file
A dictionary of key-value pairs