medkit.core._prov_graph#
Classes#
Module Contents#
- class medkit.core._prov_graph.ProvNode#
- data_item_id: str#
- operation_id: str | None#
- source_ids: list[str]#
- derived_ids: list[str]#
- to_dict() dict[str, Any] #
- class medkit.core._prov_graph.ProvGraph(nodes: list[ProvNode] | None = None, sub_graphs_by_op_id: dict[str, ProvGraph] | None = None)#
-
- add_node(data_item_id: str, operation_id: str, source_ids: list[str])#
Create a node describing how a data item was created.
- Parameters:
- data_item_id: str
Identifier of the data item that was created.
- operation_id: str
Identifier of the operation that created the data item.
- source_ids: list of str
Identifier of pre-existing data items from which the data item was derived (if any). If these source data items don’t have corresponding nodes, “stub” nodes (nodes with no operation_id and no source_ids) are created. It allows us to know how a data item was used even if we don’t know how it was created.
- has_node(data_item_id: str) bool #
- has_sub_graph(operation_id: str) bool #
- check_sanity()#
- to_dict() dict[str, Any] #