hermes.commands.deposit.rodare
==============================

.. py:module:: hermes.commands.deposit.rodare


Classes
-------

.. autoapisummary::

   hermes.commands.deposit.rodare.RodareDepositSettings
   hermes.commands.deposit.rodare.RodareClient
   hermes.commands.deposit.rodare.RodareResolver
   hermes.commands.deposit.rodare.RodareDepositPlugin


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

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

   Bases: :py:obj:`hermes.commands.deposit.invenio.InvenioDepositSettings`


   Settings for Rodare deposit plugin.

   This extends the base class by the Robis publication identifier that is required
   when creating deposits on Rodare.

   The ``site_url`` is overridden as it will be the same for all users.


   .. py:attribute:: site_url
      :type:  str
      :value: 'https://rodare.hzdr.de'



   .. py:attribute:: robis_pub_id
      :type:  str
      :value: None



.. py:class:: RodareClient(config, auth_token=None, platform_name=None)

   Bases: :py:obj:`hermes.commands.deposit.invenio.InvenioClient`


   Custom Rodare client with updated ``platform_name`` for correct config access.


   .. py:attribute:: platform_name
      :value: 'rodare'



.. py:class:: RodareResolver(client=None)

   Bases: :py:obj:`hermes.commands.deposit.invenio.InvenioResolver`


   Custom Rodare resolver using custom client.


   .. py:attribute:: invenio_client_class


.. py:class:: RodareDepositPlugin(command: hermes.commands.deposit.base.HermesDepositCommand, ctx: hermes.model.context.CodeMetaContext, client=None, resolver=None)

   Bases: :py:obj:`hermes.commands.deposit.invenio.InvenioDepositPlugin`


   Deposit plugin for the HZDR data repository Rodare (https://rodare.hzdr.de).


   .. py:attribute:: platform_name
      :value: 'rodare'



   .. py:attribute:: settings_class


   .. py:attribute:: invenio_client_class


   .. py:attribute:: invenio_resolver_class


   .. py:attribute:: robis_url
      :value: 'https://www.hzdr.de/robis'



   .. py:attribute:: robis_publication_url
      :value: 'https://www.hzdr.de/publications/Publ-{pub_id}'



   .. py:method:: prepare() -> None

      Update the context with the Robis identifier from the config.

      All HZDR publications must be registered in Robis (https://www.hzdr.de/robis).
      The first release of a software may only be performed when the registration in
      Robis is finalized and approved, and a publication form was added.



   .. py:method:: related_identifiers()

      Update the related identifiers with link to Robis.

      Add the Robis Publ-Id as a related identifier. This is additional metadata which
      is not required by Rodare or Robis. It helps users find the related publication
      on Robis at ``https://www.hzdr.de/publications/Publ-{pub_id}``.

      An example publication on Rodare: https://rodare.hzdr.de/api/records/2

      The associated Robis page: https://www.hzdr.de/publications/Publ-27151



   .. py:method:: _codemeta_to_invenio_deposition() -> dict

      Update the deposition metadata with Robis Publ-Id.

      Deposits on Rodare require a connection to the publication database Robis. To
      make this connection, the deposit metadata has to contain the field ``pub_id``.



