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 license #92

Closed hansvancalster closed 1 year ago

hansvancalster commented 1 year ago

This PR adds the possibility to use a MIT license for packages. The default remains GPL-3.

One difficulty with the MIT license is that <YEAR> and <COPYRIGHT HOLDERS> needs to be filled in. I leave the responsibility to do this to the user (as well as updating YEAR every time a new year starts 🥱) and the license check does not check this line (actually the first 4 lines of the MIT license file will be skipped). (an alternative could be to have a LICENSE.Rmd file with r format(Sys.Date(), "%Y") which is knitted to LICENSE.md file)

Related #83.

hansvancalster commented 1 year ago

Anything else that needs to be changed?

ThierryO commented 1 year ago

Yes. Please add a few unit tests that cover the code you've added.

I'm finalising #90. That might conflict with some of your changes.

hansvancalster commented 1 year ago

Yes. Please add a few unit tests that cover the code you've added.

Should be OK now 2d7a303. Good that you made me do this, because I discovered bugs 76709e2 in my code thanks to the unit tests.

ThierryO commented 1 year ago

90 is merged. You can finalise this PR.

hansvancalster commented 1 year ago

This PR should be ready. The failing check on Windows is due to a more recent source version on CRAN of a package (this time openssl) compared to it's binary. This annoyance is explained in https://github.com/r-lib/actions/issues/141. Maybe we should consider to use remotes::install_deps(dependencies = TRUE, type = "binary") in GHA in case of Windows and Mac runners?

ThierryO commented 1 year ago

Can you replace the line in the GHA with this version? remotes::install_deps(dependencies = TRUE, type = ifelse(.Platform$OS.type=="unix", "source", "binary")) Update the version in inst/package_template too.

hansvancalster commented 1 year ago

I'm having doubts about that last change. What if no binary is available for a package? I think https://github.com/r-lib/actions/tree/v2-branch/setup-r-dependencies solves these issues.