medkit.core.operation
=====================

.. py:module:: medkit.core.operation


Classes
-------

.. autoapisummary::

   medkit.core.operation.Operation
   medkit.core.operation.DocOperation


Module Contents
---------------

.. py:class:: Operation(uid: str | None = None, name: str | None = None, **kwargs)

   Bases: :py:obj:`abc.ABC`


   
   Abstract class for all annotator modules.


   :Parameters:

       **uid: str, optional**
           Operation identifier

       **name: str, optional**
           Operation name (defaults to class name)

       **kwargs:**
           All other arguments of the child init useful to describe the operation













   .. rubric:: Examples

   In the `__init__` function of your annotator, use:

   >>> init_args = locals()
   >>> init_args.pop("self")
   >>> super().__init__(**init_args)

   ..
       !! processed by numpydoc !!

   .. py:attribute:: uid
      :type:  str


   .. py:attribute:: _description
      :type:  medkit.core.operation_desc.OperationDescription | None
      :value: None



   .. py:attribute:: _prov_tracer
      :type:  medkit.core.prov_tracer.ProvTracer | None
      :value: None



   .. py:method:: set_prov_tracer(prov_tracer: medkit.core.prov_tracer.ProvTracer)

      
      Enable provenance tracing.


      :Parameters:

          **prov_tracer: ProvTracer**
              The provenance tracer used to trace the provenance.














      ..
          !! processed by numpydoc !!


   .. py:property:: description
      :type: medkit.core.operation_desc.OperationDescription


      
      Contains all the operation init parameters.
















      ..
          !! processed by numpydoc !!


   .. py:method:: check_sanity() -> bool


.. py:class:: DocOperation(uid: str | None = None, name: str | None = None, **kwargs)

   Bases: :py:obj:`Operation`


   
   Abstract operation directly executed on text documents.

   It uses a list of documents as input for running the operation and creates
   annotations that are directly appended to these documents.















   ..
       !! processed by numpydoc !!

   .. py:method:: run(docs: list[medkit.core.document.Document]) -> None
      :abstractmethod:



