Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base compendium does not cleanly pass devtools::check() #126

Closed
ntrlshrp opened this issue Jun 17, 2020 · 2 comments
Closed

Base compendium does not cleanly pass devtools::check() #126

ntrlshrp opened this issue Jun 17, 2020 · 2 comments

Comments

@ntrlshrp
Copy link

Describe the bug
This is super minor. The current base compendium does not cleanly pass devtools::check() with 0 errors, 0 warnings, and 0 notes without user intervention (this may be by design?). This is because there is a missing . at the end of the following line in DESCRIPTION:

Description: What the package does (one paragraph)

To Reproduce
Describe the steps to reproduce the behavior:

  1. Do rrtools::create_compendium("DELETEme01")
  2. devtools::load_all(".") and devtools::document()
  3. devtools::check()

Expected behavior
The base compendium generated by rrtools::create_compendium("DELETEme01") should pass devtools::check() with 0 errors, 0 warnings, and 0 notes without any manual intervention by the user.

@benmarwick
Copy link
Owner

Thanks for noting this. I have handled it in 13cc5d6. I have updated the code so it generates a valid DESCRIPTION. However, usethis::create_package() creates a pkg that gives (on my system) a warning " Invalid license file pointers: LICENSE". We will give some more thought to how important it is to be totally faithful to usethis here, and consider adding the MIT license file as part of the function output.

What do you think @nevrome? I propose we fold in step 2 usethis::use_mit_license(name = "My Name") into the use_compendium function. We can add an argument to use_compendium to specify a license, and have MIT as the default.

The advantage is then the resulting pkg will fully pass devtools::check, which I think is a good idea, because this can be a huge time sink for the beginner. Another advantage is a reduction in the complexity of setting up the compendium because there are less steps.

The disadvantage is that choosing the license becomes a minor decision. The tradeoff is that we don't make it quite so easy for the user to choose the license of their compendium. My guess is that most users and beginners will be happy with MIT, and those that want GPL, etc., will be comfortable to modify an argument when they use use_compendium to get the licence they want

@nevrome
Copy link
Collaborator

nevrome commented Jun 28, 2020

Hm - three things:

  1. I personally think that passing the CRAN checks is not too important for a research compendium.
  2. The user will have to edit the DESCRIPTION file eventually and will certainly make syntax mistakes 😄 . So if she or he wants to have a compendium which passes the checks they will have to look into the syntax anyway.
  3. The warning message raised in case of a missing description file is pretty clear (but my judgement might be wrong):
> checking DESCRIPTION meta-information ... WARNING
  Invalid license file pointers: LICENSE

So I would suggest we do not add a call to usethis::use_mit_license() in rrtools::use_compendium but instead edit the info text produced by that function from

Next, you need to:  ↓ ↓ ↓ 
● Edit the DESCRIPTION file
● Use other 'rrtools' functions to add components to the compendium

to something like

Next, you need to:  ↓ ↓ ↓ 
● Edit the DESCRIPTION file
● Add a license file with usethis::use_mit_license(name = "Your Name")
● Use other 'rrtools' functions to add components to the compendium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants