Skip to content

Commit c63c6e8

Browse files
authored
Omit ORCID placeholder from defaults (#2075)
* Stop using placeholder for ORCID identifier * Might as well use a package that usethis depends on here * Re-document and rebuild README
1 parent 64898cd commit c63c6e8

File tree

7 files changed

+14
-19
lines changed

7 files changed

+14
-19
lines changed

R/author.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
#' DESCRIPTION file and the user hasn't given any author information via the
2323
#' `fields` argument or the global option `"usethis.description"`. The
2424
#' placeholder looks something like `First Last <[email protected]> [aut,
25-
#' cre] (YOUR-ORCID-ID)` and `use_author()` offers to remove it in interactive
26-
#' sessions.
25+
#' cre]` and `use_author()` offers to remove it in interactive sessions.
2726
#'
2827
#' @inheritParams utils::person
2928
#' @inheritDotParams utils::person

R/description.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ usethis_description_defaults <- function(package = NULL) {
124124
Version = "0.0.0.9000",
125125
Title = "What the Package Does (One Line, Title Case)",
126126
Description = "What the package does (one paragraph).",
127-
"Authors@R" = 'person("First", "Last", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "YOUR-ORCID-ID"))',
127+
"Authors@R" = 'person("First", "Last", email = "[email protected]", role = c("aut", "cre"))',
128128
License = "`use_mit_license()`, `use_gpl3_license()` or friends to pick a license",
129129
Encoding = "UTF-8"
130130
)

README.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ proj_activate(path)
6666
# Modify the description ----------------------------------------------
6767
use_mit_license("My Name")
6868
69-
use_package("ggplot2", "Suggests")
69+
use_package("rmarkdown", "Suggests")
7070
7171
# Set up other files -------------------------------------------------
7272
use_readme_md()

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ library(usethis)
6060
# Create a new package -------------------------------------------------
6161
path <- file.path(tempdir(), "mypkg")
6262
create_package(path)
63-
#> ✔ Creating '/tmp/RtmpCJHMlj/mypkg/'.
64-
#> ✔ Setting active project to "/private/tmp/RtmpCJHMlj/mypkg".
63+
#> ✔ Creating '/tmp/RtmpPZsquk/mypkg/'.
64+
#> ✔ Setting active project to "/private/tmp/RtmpPZsquk/mypkg".
6565
#> ✔ Creating 'R/'.
6666
#> ✔ Writing 'DESCRIPTION'.
6767
#> Package: mypkg
6868
#> Title: What the Package Does (One Line, Title Case)
6969
#> Version: 0.0.0.9000
7070
#> Authors@R (parsed):
71-
#> * First Last <[email protected]> [aut, cre] (YOUR-ORCID-ID)
71+
#> * First Last <[email protected]> [aut, cre]
7272
#> Description: What the package does (one paragraph).
7373
#> License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a
7474
#> license
@@ -79,8 +79,8 @@ create_package(path)
7979
#> ✔ Setting active project to "<no active project>".
8080
# only needed since this session isn't interactive
8181
proj_activate(path)
82-
#> ✔ Setting active project to "/private/tmp/RtmpCJHMlj/mypkg".
83-
#> ✔ Changing working directory to '/tmp/RtmpCJHMlj/mypkg/'
82+
#> ✔ Setting active project to "/private/tmp/RtmpPZsquk/mypkg".
83+
#> ✔ Changing working directory to '/tmp/RtmpPZsquk/mypkg/'
8484

8585
# Modify the description ----------------------------------------------
8686
use_mit_license("My Name")
@@ -89,11 +89,11 @@ use_mit_license("My Name")
8989
#> ✔ Writing 'LICENSE.md'.
9090
#> ✔ Adding "^LICENSE\\.md$" to '.Rbuildignore'.
9191

92-
use_package("ggplot2", "Suggests")
93-
#> ✔ Adding ggplot2 to 'Suggests' field in DESCRIPTION.
94-
#> ☐ Use `requireNamespace("ggplot2", quietly = TRUE)` to test if ggplot2 is
92+
use_package("rmarkdown", "Suggests")
93+
#> ✔ Adding rmarkdown to 'Suggests' field in DESCRIPTION.
94+
#> ☐ Use `requireNamespace("rmarkdown", quietly = TRUE)` to test if rmarkdown is
9595
#> installed.
96-
#> ☐ Then directly refer to functions with `ggplot2::fun()`.
96+
#> ☐ Then directly refer to functions with `rmarkdown::fun()`.
9797

9898
# Set up other files -------------------------------------------------
9999
use_readme_md()

man/use_author.Rd

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/_snaps/author.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
v Adding to 'Authors@R' in DESCRIPTION:
3232
Charlie Brown [ctb]
3333
i 'Authors@R' appears to include a placeholder author:
34-
First Last <[email protected]> [aut, cre] (YOUR-ORCID-ID)
34+
First Last <[email protected]> [aut, cre]
3535

tests/testthat/test-author.R

-3
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ test_that("Decline to tweak an existing author", {
7272
})
7373

7474
test_that("Placeholder author is challenged", {
75-
# apparently the format method for `person` used to handle ORCIDs differently
76-
skip_if(getRversion() < "4.0")
77-
7875
withr::local_options(usethis.description = NULL)
7976
create_local_package()
8077

0 commit comments

Comments
 (0)