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

`MIT + file LICENSE` not recognized by Zenodo #83

Closed peterdesmet closed 1 year ago

peterdesmet commented 2 years ago

MIT + file LICENSE seems to be the default way licenses are indicated in e.g. tidyverse packages (e.g. https://github.com/tidyverse/dplyr/blob/main/DESCRIPTION#L26) and I assume how it is written to DESCRIPTION by helper functions in e.g. usethis.

write_zenodo_json() writes this value as is to .zenodo.json:

"license": "MIT + file LICENSE"

But that value generates in error when pushing a release to Zenodo:

{
    "errors": "The license ID you have selected is not present in our system. For the available licenses please check in the following URL https://developers.zenodo.org/#licenses"
}

Since it is a very common value, I would literally map MIT + file LICENSE to http://www.opensource.org/licenses/MIT. Alternatively, the function could remove the + file LICENSE part: I think MIT is also an accepted value by Zenodo.

ThierryO commented 2 years ago

There is a bit more more to this than only updating write_zenodo_json(). See https://github.com/inbo/checklist/issues/49#issuecomment-864957315

peterdesmet commented 1 year ago

Just tried this out on the frictionless package. Installed the latest dev version with install_github("inbo/checklist") and used write_zenodo_json(). This still writes:

"license": "MIT + file LICENSE",

Is this not yet on the main branch? 🤔

ThierryO commented 1 year ago

Can you test it again with install_github("inbo/checklist@terminology")?

peterdesmet commented 1 year ago

Odd, it still gets written as MIT + file LICENSE.

ThierryO commented 1 year ago

My bad. I pointed you to the wrong branch. Please try install_github("inbo/checklist@docker-token")

peterdesmet commented 1 year ago

No, the issue remains. But if this is already covered by a unit test, I'm happy to test this in a next stable release ...

ThierryO commented 1 year ago

Did you restart your R session after reinstalling checklist? I've tried update_citation() on the main branch of frictionless-r. After updating DESCRIPTION and writing checklist.yml, update_citation() writes MIT as license to .zenodo.json.

I noticed that frictionless mentions reviewers in DESCRIPTION. 62038f7 handles this (so you'll need to reinstall it again). For now they get listed as contributor with type "Other" in .zenodo.json. Or should we rather add them as "RelatedPerson" or simply omit them from .zenodo.json?

peterdesmet commented 1 year ago

I think it makes sense to list reviewers as contributor other (unless there is a specific role reviewer). It respects the choice of the maintainer to explicitly mention them.

peterdesmet commented 1 year ago

Restarting the R session resolved the issue and the license is now correctly written as MIT