medkit.tools#

APIs#

For accessing these APIs, you may use import like this:

from medkit.tools import <api_to_import>

Functions:

save_prov_to_dot(prov_tracer, file[, ...])

Generate a graphviz-compatible .dot file from a ProvTracer for visualization.

save_prov_to_dot(prov_tracer, file, data_item_formatters=None, op_formatter=None, max_sub_prov_depth=None, show_attr_links=True)[source]#

Generate a graphviz-compatible .dot file from a ProvTracer for visualization.

Parameters
  • prov_tracer (ProvTracer) – Provenance tracer holding the provenance information to save.

  • file (Union[str, Path]) – Path to the .dot file.

  • data_item_formatters (Optional[Dict[Type, Callable[[Any], str]]]) – 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 (Optional[Callable[[OperationDescription], str]]) – Callback function returning the text to display for each operation. If none provided, the operation name is used.

  • max_sub_prov_depth (Optional[int]) – When there are nested provenance tracers for some operations, how deep should we go when displaying their contents.

  • show_attr_links (bool) – Whether to show links between attributes and the data items they are attached to (not strictly provenance but can make things easier to understand).

Subpackages / Submodules#

medkit.tools.e3c_corpus

This module aims to provide facilities for accessing data from e3c corpus.

medkit.tools.hf_utils

This module needs extra-dependencies not installed as core dependencies of medkit.

medkit.tools.mtsamples

This module aims to provide facilities for accessing some examples of mtsamples files available on this repository: https://github.com/neurazlab/mtsamplesFR