inbo / checklist

An R package for checking R packages and R code
https://inbo.github.io/checklist
GNU General Public License v3.0
16 stars 2 forks source link

Malformed Zenodo metadata? #89

Closed florisvdh closed 1 year ago

florisvdh commented 2 years ago

Just from observation at Zenodo: it seems that the description is overwritten in a new version, possibly by the content of a commit message. Also the title seems to have changed.

afbeelding

afbeelding

ThierryO commented 1 year ago

That repo doesn't have a .zenodo.json yet. I'm planning to write one based on the information in the README.md in case of a project (not a package).

How should we handle the upload type? Here are a few options. Create an test upload at https://sandbox.zenodo.org to see all the options.

Source code of the template


<!-- badges: start -->
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5814813.svg)](https://doi.org/10.5281/zenodo.5814813)
![GitHub](https://img.shields.io/github/license/inbo/patrijs-steekproefkader)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/inbo/patrijs-steekproefkader)
![GitHub Release Date](https://img.shields.io/github/release-date/inbo/patrijs-steekproefkader)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/inbo/patrijs-steekproefkader/check-source)
![GitHub repo size](https://img.shields.io/github/repo-size/inbo/patrijs-steekproefkader)
<!-- badges: end -->

# Replace this with the title

[Thierry Onkelinx![ORCID logo](https://info.orcid.org/wp-content/uploads/2019/11/orcid_16x16.png)](https://orcid.org/0000-0002-1825-0097)[^INBO][^contact],
[Raïsa Carmen![ORCID logo](https://info.orcid.org/wp-content/uploads/2019/11/orcid_16x16.png)](https://orcid.org/0000-0003-1025-8702)[^INBO],
Thomas Scheppers,
Michiel Stas[^ANB]

[^INBO]: Research Institute for Nature and Forest (INBO)
[^ANB]: Agentschap Natuur en Bos
[^contact]: contactperson

<!-- copyrightholder: Research Institute for Nature and Forest -->
<!-- version: 2023.01 -->
<!-- community: inbo -->
<!-- community: second -->
<!-- abstract: start -->
Place here the abstract. It will be included in the citation metadata.
<!-- abstract: end -->

You can add more information. This will not show in the citation metadata.

Rendered version of the template


DOI GitHub GitHub release (latest by date) GitHub Release Date GitHub Workflow Status GitHub repo size

Replace this with the title

Thierry OnkelinxORCID logo^INBO, Raïsa CarmenORCID logo[^INBO], Thomas Scheppers, Michiel Stas[^ANB]

[^INBO]: Research Institute for Nature and Forest (INBO) [^ANB]: Agentschap Natuur en Bos

Place here the abstract. It will be included in the citation metadata.

You can add more information. This will not show in the citation metadata.

ThierryO commented 1 year ago

@inbo/bmk and @inbo/oscibio: can you give me some feedback on this. The main idea is to add a function to writes a .zenodo.json based on the information in the README.md in case of an R project. While parsing the README.md, we can validate the metadata at the same time. The benefits of this:

The example below makes the copyright holder more visible compared to the example above.


DOI GitHub GitHub release (latest by date) GitHub Release Date GitHub Workflow Status GitHub repo size

Replace this with the title

Thierry OnkelinxORCID logo[^cp][^INBO], Raïsa CarmenORCID logo[^INBO], Thomas Scheppers, Michiel Stas[^ANB] Research Institute for Nature and Forest[^ch]

[^INBO]: Research Institute for Nature and Forest (INBO) [^ANB]: Agentschap Natuur en Bos [^cp]: contact person [^ch]: copyright holder

Place here the abstract. It will be included in the citation metadata.

You can add more information. This will not show in the citation metadata.

peterdesmet commented 1 year ago

@ThierryO looks cool. Can you clarify what files the function will read and what files the function will (over)write?

If the README is being overwritten, I would follow the output of usethis::use_readme_rmd() as much as possible. E.g. list the badges below the title.

ThierryO commented 1 year ago

@ThierryO looks cool. Can you clarify what files the function will read and what files the function will (over)write?

Should be enforce the same rules on README.md in both projects and packages? The latter would imply that the metadata in README.md matches with DESCRIPTION.

peterdesmet commented 1 year ago

Thanks! No, I would not enforce README.md and DESCRIPTION to match, so the formatting rules would only be there for projects. But I would try to have those formatting rules play nice with output of usethis::use_readme_md()

Other notes:

  1. I would opt to have:
[author](orcid_url)[^affiliation]
author[^affiliation]
author

And not try to add ORCID logos.

  1. I would opt for <!-- description --> rather than abstract, since that is the term used in Zenodo.
ThierryO commented 1 year ago

We recommend to use checklist::create_project() and checklist::create_package(). Those functions will create an RStudio project with templates. The user chooses interactively which items to add (and check) in case of a project. In case of a package we activate the entire set of templates and checks. Use the setup_*() variants on existing projects and packages.

ThierryO commented 1 year ago

94 now has a new citation_meta class. Running citation_meta$new() at the project root will first extract the citation meta and then write the citation files.

In case of a project it reads README.md . Have a look at this README.md to see the required format. citation_meta$new() will overwrite .zenodo.json and CITATION.cff.

In case of an R package it reads DESCRIPTION. Unfortunately we can't store keywords nor the Zenodo community information in that file. Currently we store in README.md using the same format as with projects. Another option would be to store that information in checklist.yml. citation_meta$new() will overwrite .zenodo.json, CITATION.cff and inst/CITATION.