hermes.commands.curate.base
===========================

.. py:module:: hermes.commands.curate.base


Classes
-------

.. autoapisummary::

   hermes.commands.curate.base.HermesCuratePlugin
   hermes.commands.curate.base.CurateSettings
   hermes.commands.curate.base.HermesCurateCommand


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

.. py:class:: HermesCuratePlugin

   Bases: :py:obj:`hermes.commands.base.HermesPlugin`


   Base plugin for curate plugins.


   .. py:method:: __call__(command: HermesCurateCommand, metadata: hermes.model.SoftwareMetadata) -> hermes.model.SoftwareMetadata

      Execute the hermes curate plugin `self`.

      :param command: The command being executed.
      :type command: HermesCurateCommand
      :param metadata: The metadata to be curated.
      :type metadata: SoftwareMetadata

      :returns: The curated metadata.
      :rtype: SoftwareMetadata



.. py:class:: CurateSettings(/, **data: Any)

   Bases: :py:obj:`pydantic.BaseModel`


   Generic deposition settings.

   .. attribute:: plugin

      The plugin to be executed.

      :type: str


.. py:class:: HermesCurateCommand(parser: argparse.ArgumentParser)

   Bases: :py:obj:`hermes.commands.base.HermesCommand`


   Curate the unified metadata before deposition.

   .. attribute:: args

      The namespace that was returned by the command line parser when reading the arguments.

      :type: Namespace

   .. attribute:: command_name

      (class attribute) The name of the command.

      :type: str

   .. attribute:: settings_class

      (class attribute) The settings class for general curate settings.

      :type: type


   .. py:method:: __call__(args: argparse.Namespace) -> None

      Execute the hermes command `self`.

      :param args: The namespace that was returned by the command line parser when reading the arguments.
      :type args: Namespace

      :rtype: None

      :raises HermesValidationError: If the results of the process step couldn't be loaded.
      :raises MisconfigurationError: If the curation plugin wasn't found.
      :raises HermesPluginRunError: If something went wrong in the plugin run.



   .. py:method:: load_prov_doc() -> Optional[hermes.model.provenance.ld_prov.ld_prov_list]

      Loads the provenance document of the process step.

      :returns: The loaded provenance document or None if the load failed.
      :rtype: ld_prov_list | None



