medkit.tools
============

.. py:module:: medkit.tools


Submodules
----------

.. toctree::
   :maxdepth: 1

   /reference/api/medkit/tools/_save_prov_to_dot/index
   /reference/api/medkit/tools/e3c_corpus/index
   /reference/api/medkit/tools/hf_utils/index
   /reference/api/medkit/tools/mtsamples/index


Functions
---------

.. autoapisummary::

   medkit.tools.save_prov_to_dot


Package Contents
----------------

.. py:function:: 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 :class:`~medkit.core.ProvTracer`
   for visualization.

   :Parameters:

       **prov_tracer** : ProvTracer
           Provenance tracer holding the provenance information to save.

       **file** : str or Path
           Path to the .dot file.

       **data_item_formatters** : dict 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_formatter** : Callable, optional
           Callback function returning the text to display for each operation.
           If none provided, the operation name is used.

       **max_sub_prov_depth** : int, optional
           When there are nested provenance tracers for some operations, how
           deep should we go when displaying their contents.

       **show_attr_links** : bool, 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).














   ..
       !! processed by numpydoc !!

