@@ -18,7 +18,7 @@ others will hardly be able to cite your software directly if you send it to
1818them as an email attachment. Even a download link is not really useful here. It
1919is better to provide a `persistent identifier (PID)
2020<https://en.wikipedia.org/wiki/Persistent_identifier> `_ to ensure the long-term
21- availability of your software. Both `Zenodo <https://zenodo.org/ >`_ and
21+ availability of your software. Both `Zenodo <https://zenodo.org/ >`__ and
2222`figshare <https://figshare.com/ >`_ repositories accept source code including
2323binaries and provide `Digital Object Identifiers (DOI)
2424<https://en.wikipedia.org/wiki/Digital_object_identifier> `_ for them. The same
@@ -52,12 +52,14 @@ citation information for software.
5252 * `schema.json
5353 <https://github.com/citation-file-format/citation-file-format/blob/main/schema.json> `_
5454
55+ .. _zenodo :
56+
5557Create a DOI with Zenodo
5658------------------------
5759
58- `Zenodo <https://zenodo.org/ >`_ enables software to be
59- archived and a DOI to be provided for it. In the following I will show which
60- steps are required on the example of the Jupyter tutorial:
60+ `Zenodo <https://zenodo.org/ >`__ enables software to be archived and a DOI to be
61+ provided for it. In the following I will show which steps are required on the
62+ example of the Jupyter tutorial:
6163
6264#. If you haven’t already, `create an account on Zenodo
6365 <https://zenodo.org/signup/> `_, preferably with GitHub.
@@ -256,19 +258,87 @@ Alternatively, Git2PROV also provides a web server with:
256258 <http://ceur-ws.org/Vol-1035/iswc2013_demo_32.pdf> `_
257259 * `GitHub-Repository <https://github.com/IDLabResearch/Git2PROV >`_
258260
259- hermes
261+ HERMES
260262------
261263
262- `hermes <https://project.software-metadata.pub >`_ simplifies the publication of
264+ `HERMES <https://project.software-metadata.pub >`_ simplifies the publication of
263265research software by continuously retrieving existing metadata in :ref: `cff `,
264266:ref: `codemeta ` and :doc: Git <../git/index>`. Subsequently, the metadata is also
265267compiled appropriately for `InvenioRDM
266268<https://invenio-software.org/products/rdm/> `_ and `Dataverse
267269<https://dataverse.org/> `_. Finally, :ref: `CITATION.cff <cff >` and
268270:ref: `codemeta.json <codemeta >` are also updated for the publication
269- repositories. You can find an example GitHub Action in
270- `TEMPLATE_hermes_github_to_zenodo.yml
271- <https://github.com/hermes-hmc/ci-templates/blob/main/TEMPLATE_hermes_github_to_zenodo.yml> `_.
271+ repositories.
272272
273- .. seealso ::
274- * `GitHub <https://github.com/hermes-hmc/workflow >`_
273+ #. Add ``.hermes/ `` to the :ref: `.gitignore <gitignore >` file
274+ #. Provide :ref: `CITATION.cff <cff >` file with additional metadata
275+
276+ .. important ::
277+ Make sure ``license `` is defined in the :ref: `CITATION.cff <cff >` file;
278+ otherwise, your release will not be accepted as open access by the
279+ :ref: `Zenodo <zenodo >` sandbox.
280+
281+ #. Configure HERMES workflow
282+
283+ The HERMES workflow is configured in the file
284+ :doc: `/data-processing/serialisation-formats/toml/index `, where each step
285+ gets its own section.
286+
287+ If you want to configure HERMES to use the metadata from :doc: `Git
288+ <../git/index>` and :ref: `CITATION.cff <cff >`, and to file in the Zenodo sandbox built on InvenioRDM, the :file: `hermes.toml ` file looks like this:
289+
290+ .. literalinclude :: hermes.toml
291+ :caption: hermes.toml
292+ :name: hermes.toml
293+
294+ #. Access token for Zenodo Sandbox
295+
296+ In order for GitHub Actions to publish your repository in the `Zenodo Sandbox
297+ <https://sandbox.zenodo.org/> `_, you need a personal access token. To do
298+ this, you need to log in to Zenodo Sandbox and then create a `personal access
299+ token
300+ <https://sandbox.zenodo.org/account/settings/applications/tokens/new/> `_ in
301+ your user profile with the name :samp: `HERMES workflow ` and the scopes
302+ :guilabel: `deposit:actions ` und :guilabel: `deposit:write `:
303+
304+ .. image :: zenodo-personal-access-token.png
305+ :alt: Zenodo: Neues persönliches Zugangstoken
306+
307+ #. Copy the newly created token to a new `GitHub secret
308+ <https://docs.github.com/de/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository> `_
309+ named :samp: `ZENODO_SANDBOX ` in your repository: `Settings --> Secrets and
310+ Variables --> Actions --> New repository secret `:
311+
312+ .. image :: github-new-action-secret.png
313+ :alt: GitHub: Neues Action-Secret
314+
315+ #. Configure the GitHub action
316+
317+ The HERMES project provides templates for continuous integration in a special
318+ repository: `hermes-hmc/ci-templates
319+ <https://github.com/hermes-hmc/ci-templates> `_. Copy the template file
320+ `TEMPLATE_hermes_github_to_zenodo.yml
321+ <https://github.com/hermes-hmc/ci-templates/blob/main/TEMPLATE_hermes_github_to_zenodo.yml> `_
322+ into the :file: `.github/workflows/ ` directory of your repository and rename
323+ it, for example to :file: `hermes_github_to_zenodo.yml `.
324+
325+ Then you should go through the file and look for comments marked :samp: `#
326+ ADAPT `. Modify the file to suit your needs.
327+
328+ Finally, add the workflow file to version control and push it to the GitHub
329+ server:
330+
331+ .. code-block :: console
332+
333+ $ git add .github/workflows/hermes_github_to_zenodo.yml
334+ $ git commit -m ":construction_worker: GitHub action for automatic publication with HERMES"
335+ $ git push
336+
337+ #. GitHub actions should be allowed to create pull requests in your repository
338+
339+ The HERMES workflow will not publish metadata without your approval. Instead,
340+ it will create a pull request so that you can approve or change the metadata
341+ that is stored. To enable this, go to :menuselection: `Settings --> Actions
342+ --> General ` in your repository and in the :guilabel: `Workflow permissions `
343+ section, enable :guilabel: `Allow GitHub Actions to create and approve pull
344+ requests `.
0 commit comments