medkit.tools._save_prov_to_dot#
Functions#
  | 
Save provenance to a DOT graph file.  | 
Module Contents#
- medkit.tools._save_prov_to_dot.save_prov_to_dot(prov_tracer: medkit.core.ProvTracer, file: str | pathlib.Path, data_item_formatters: dict[type, Callable[[Any], str]] | None = None, op_formatter: Callable[[medkit.core.OperationDescription], str] | None = None, max_sub_prov_depth: int | None = None, show_attr_links: bool = True)#
 Save provenance to a DOT graph file.
Generate a graphviz-compatible .dot file from a
ProvTracerfor visualization.- Parameters:
 - prov_tracerProvTracer
 Provenance tracer holding the provenance information to save.
- filestr or Path
 Path to the .dot file.
- data_item_formattersdict of type to Callable, optional
 Dict mapping data items types with callback functions returning the text to display for each data item of this type. Some default formatters are available for common data item such as text annotations. Use data_item_formatters to override them or to add support for other types.
- op_formatterCallable, optional
 Callback function returning the text to display for each operation. If none provided, the operation name is used.
- max_sub_prov_depthint, optional
 When there are nested provenance tracers for some operations, how deep should we go when displaying their contents.
- show_attr_linksbool, default=True
 Whether to show links between attributes and the data items they are attached to (not strictly provenance but can make things easier to understand).