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

Some updates to the default DESCRIPTION file #428

Merged
merged 4 commits into from
Feb 21, 2014
Merged

Some updates to the default DESCRIPTION file #428

merged 4 commits into from
Feb 21, 2014

Conversation

ncarchedi
Copy link
Contributor

I started with a clean slate on this pull request to address the issues discussed in #411. For reference, here they are again:

  1. http://stackoverflow.com/questions/17662713/devtools-description-file
  2. https://gist.github.com/mbannert/8403801

I made the default DESCRIPTION file created by devtools more similar to the default DESCRIPTION file created by RStudio (when creating a new package). Authors@R, License, and Suggests still defer to getOption().

Here's the result of my changes:

> library(devtools)
> create("testPackage")
Creating package testPackage in .
No DESCRIPTION found. Creating with values:

Package: testPackage
Type: Package
Title: What the package does (short line)
Version: 0.1
Date: 2014-02-18
Authors@R: "First Last <first.last@example.com> [aut, cre]"
Description: More about what it does (maybe more than one line)
Depends: R (>= 3.0.2)
License: What license is it under?
LazyData: true
Adding Rstudio project file to testPackage

And immediately calling document(), which caused an error with the previous default value for Authors@R:

> document("testPackage")
Updating testPackage documentation
Loading testPackage
Updating namespace directives
Writing testPackage.Rd
> 

Finally, after setting some options (temporarily):

> options(devtools.desc.author = '"Nick Carchedi <nick.carchedi@example.com> [aut, cre]"', devtools.desc.license = "GPL (>= 2)")
> create("testPackage2")
Creating package testPackage2 in .
No DESCRIPTION found. Creating with values:

Package: testPackage2
Type: Package
Title: What the package does (short line)
Version: 0.1
Date: 2014-02-18
Authors@R: "Nick Carchedi <nick.carchedi@example.com> [aut, cre]"
Description: More about what it does (maybe more than one line)
Depends: R (>= 3.0.2)
License: GPL (>= 2)
LazyData: true
Adding Rstudio project file to testPackage2
>

@@ -213,10 +213,12 @@ build_description <- function(name, extra = list()) {

defaults <- compact(list(
Package = name,
Title = "",
Description = "",
Type = "Package",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be omitted since it's the default.

@hadley
Copy link
Member

hadley commented Feb 21, 2014

Looks good. A few minor points inline.

@ncarchedi
Copy link
Contributor Author

All good suggestions. Here's the new output:

> create("testPackage")
Creating package testPackage in .
No DESCRIPTION found. Creating with values:

Package: testPackage
Title: What the package does (short line)
Version: 0.1
Authors@R: "First Last <first.last@example.com> [aut, cre]"
Description: What the package does (paragraph)
Depends: R (>= 3.0.2)
License: What license is it under?
LazyData: true
Adding Rstudio project file to testPackage
> 

@hadley
Copy link
Member

hadley commented Feb 21, 2014

Great. Could you please add a bullet point to NEWS.md briefly describing the change and thanking yourself (via your github username)

@ncarchedi
Copy link
Contributor Author

Sure, thanks!

You might consider bringing the RStudio defaults in line with the new devtools defaults. When you create a new package project in RStudio, here's what it gives you:

Package: testPackage
Type: Package
Title: What the package does (short line)
Version: 1.0
Date: 2014-02-21
Author: Who wrote it
Maintainer: Who to complain to <yourfault@somewhere.net>
Description: More about what it does (maybe more than one line)
License: What license is it under?

hadley added a commit that referenced this pull request Feb 21, 2014
Some updates to the default DESCRIPTION file
@hadley hadley merged commit 8a3f5cd into r-lib:master Feb 21, 2014
@hadley
Copy link
Member

hadley commented Feb 21, 2014

Thanks. @jjallaire if you get a chance, it'd be great if the rstudio defaults matched this.

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

Successfully merging this pull request may close these issues.

2 participants