workflow.processing_tree_io#
The pydidas.workflow.processing_tree_io package includes importers/exporters for the WorkflowTree in different formats as well as a registry metaclass to handle actual imports/exports.
- class pydidas.workflow.processing_tree_io.ProcessingTreeIoBase#
Base class for WorkflowTree exporters.
This class defines the format_name and extensions attributes for all ProcessingTreeIo classes.
- class pydidas.workflow.processing_tree_io.ProcessingTreeIoMeta(clsname, bases, attrs)#
Metaclass for WorkflowTree exporters and importers which holds the registry with all associated file extensions for exporting WorkflowTrees.
- classmethod export_to_file(filename: Path | str, tree: WWorkflowTree, **kwargs: dict)#
Call the export_to_file method associated with extension of the filename.
- Parameters:
filename (Union[Path, str]) – The full filename and path.
tree (pydidas.workflow.WorkflowTree) – The instance of the WorkflowTree
kwargs (dict) – Any kwargs which should be passed to the udnerlying exporter.
- classmethod import_from_file(filename: Path | str) WWorkflowTree #
Call the concrete import_from_file method in the subclass registered to the extension of the filename.
- Parameters:
filename (Union[Path, str]) – The full filename and path.
- Returns:
The new WorkflowTree instance.
- Return type:
pydidas.workflow.WorkflowTree