hermes.commands.harvest.cff
===========================

.. py:module:: hermes.commands.harvest.cff


Attributes
----------

.. autoapisummary::

   hermes.commands.harvest.cff._CFF_VERSION
   hermes.commands.harvest.cff._log


Classes
-------

.. autoapisummary::

   hermes.commands.harvest.cff.CffHarvestSettings
   hermes.commands.harvest.cff.CffHarvestPlugin


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

.. py:data:: _CFF_VERSION
   :value: '1.2.0'


.. py:data:: _log

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

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


   Custom settings for CFF harvester.


.. py:class:: CffHarvestPlugin

   Bases: :py:obj:`hermes.commands.harvest.base.HermesHarvestPlugin`


   Base plugin that does harvesting.

   .. attribute:: operations

      The information recorded on the
      load operations executed by the plugin.

      :type: list[tuple[dict[str, str], dict[str, str], dict[str, str]]]

   TODO: describe the harvesting process and how this is mapped to this plugin.


   .. py:method:: __call__(command: hermes.commands.harvest.base.HermesHarvestCommand) -> tuple[hermes.model.SoftwareMetadata, dict]

      Execute the hermes harvest plugin `self`.

      :param command: The command being executed.
      :type command: HermesHarvestCommand

      :returns: The harvested metadata.
      :rtype: SoftwareMetadata



   .. py:method:: _load_cff_from_file(cff_data: str) -> Any


   .. py:method:: _patch_author_emails(cff: dict, codemeta: dict) -> dict


   .. py:method:: _patch_identifiers(cff: dict, codemeta: dict) -> dict


   .. py:method:: _convert_cff_to_codemeta(cff_data: str) -> Any


   .. py:method:: _validate(cff_file: pathlib.Path, cff_dict: dict) -> bool


   .. py:method:: _get_single_cff(path: pathlib.Path) -> Union[pathlib.Path, None]


