Skip to content

Commit

Permalink
Polish upkeep bullets
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Oct 30, 2023
1 parent 0de0d45 commit e617ebb
Showing 1 changed file with 28 additions and 51 deletions.
79 changes: 28 additions & 51 deletions R/upkeep.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,78 +126,47 @@ tidy_upkeep_checklist <- function(year = NULL,
if (year <= 2000) {
bullets <- c(
bullets,
"Pre-history",
"### Pre-history",
"",
todo("`usethis::use_readme_rmd()`"),
todo("`usethis::use_roxygen_md()`"),
todo("`usethis::use_github_links()`"),
todo("`usethis::use_pkgdown_github_pages()`"),
todo("`usethis::use_tidy_github_labels()`"),
todo("`usethis::use_tidy_style()`"),
todo("`usethis::use_tidy_description()`"),
todo("`urlchecker::url_check()`"),
""
)
}
if (year <= 2020) {
bullets <- c(
bullets,
"2020",
"### 2020",
"",
todo("
`usethis::use_package_doc()`
Consider letting usethis manage your `@importFrom` directives here.
`usethis::use_import_from()` is handy for this."),
todo("
`usethis::use_testthat(3)` and upgrade to 3e, \\
[testthat 3e vignette](https://testthat.r-lib.org/articles/third-edition.html)"),
todo("
Align the names of `R/` files and `test/` files for workflow happiness.
The docs for `usethis::use_r()` include a helpful script.
`usethis::rename_files()` may be be useful."),
todo("`usethis::use_package_doc()`"),
todo("`usethis::use_testthat(3)`"),
todo("Align the names of `R/` files and `test/` files"),
""
)
}
if (year <= 2021) {
bullets <- c(
bullets,
"2021",
"### 2021",
"",
todo("`usethis::use_tidy_description()`", year > 2000),
todo("`usethis::use_tidy_dependencies()`"),
todo("
`usethis::use_tidy_github_actions()` and update artisanal actions to \\
use `setup-r-dependencies`"),
todo("Remove check environments section from `cran-comments.md`"),
todo("Bump required R version in DESCRIPTION to {tidy_minimum_r_version()}"),
todo("
Use lifecycle instead of artisanal deprecation messages, as described \\
in [Communicate lifecycle changes in your functions](https://lifecycle.r-lib.org/articles/communicate.html)"),
todo(
'
Make sure RStudio appears in `Authors@R` of DESCRIPTION like so, if appropriate:
`person("RStudio", role = c("cph", "fnd"))`',
posit_pkg && !posit_person_ok
),
todo("Use lifecycle instead of artisanal deprecation messages"),
""
)
}
if (year <= 2022) {
bullets <- c(
bullets,
"2022",
"### 2022",
"",
todo("`usethis::use_tidy_coc()`"),
todo("Handle and close any still-open `master` --> `main` issues"),
todo("Update README badges, instructions in [r-lib/usethis#1594](https://github.com/r-lib/usethis/issues/1594)"),
todo("
Update errors to rlang 1.0.0. Helpful guides:
<https://rlang.r-lib.org/reference/topic-error-call.html>
<https://rlang.r-lib.org/reference/topic-error-chaining.html>
<https://rlang.r-lib.org/reference/topic-condition-formatting.html>"),
todo("[Update README badges](https://github.com/r-lib/usethis/issues/1594)"),
todo("Update pkgdown site using instructions at <https://tidytemplate.tidyverse.org>"),
todo("Ensure pkgdown `development` is `mode: auto` in pkgdown config"),
todo("Re-publish released site; see [How to update a released site](https://pkgdown.r-lib.org/dev/articles/how-to-update-released-site.html)"),
todo("Update lifecycle badges with more accessible SVGs: `usethis::use_lifecycle()`"),
""
)
Expand All @@ -208,9 +177,7 @@ tidy_upkeep_checklist <- function(year = NULL,

bullets <- c(
bullets,
"2023",
"",
"Necessary:",
"### 2023",
"",
todo(
"Update email addresses *@rstudio.com -> *@posit.co",
Expand Down Expand Up @@ -242,30 +209,40 @@ tidy_upkeep_checklist <- function(year = NULL,
"Modernize citation files; see updated `use_citation()`",
has_citation_file()
),
todo("`usethis::use_tidy_github_actions()`"),
"",
"Optional:",
"",
todo("Review 2022 checklist to see if you completed the pkgdown updates"),
todo('Prefer `pak::pak("org/pkg")` over `devtools::install_github("org/pkg")` in README'),
todo('Use `pak::pak("org/pkg")` in README'),
todo("
Consider running `use_tidy_dependencies()` and/or \\
replace compat files with `use_standalone()`"),
todo("Use cli errors or file issue if you don\'t have time to do it now"),
todo('
`use_standalone("r-lib/rlang", "types-check")` \\
instead of home grown argument checkers'),
instead of home grown argument checkers;
or file issue if you don\'t have time to do it now'),
todo(
"
Change files ending in `.r` to `.R` in R/ and/or tests/testthat/",
lowercase_r()
),
todo("
Add alt-text to pictures, plots, etc; see \\
https://posit.co/blog/knitr-fig-alt/ for examples"),
https://posit.co/blog/knitr-fig-alt/ for examples"
),
todo("Re-publish released site; see [How to update a released site](https://pkgdown.r-lib.org/dev/articles/how-to-update-released-site.html)"),
""
)
}

bullets <- c(
bullets,
"### Eternal",
"",
todo("Bump required R version in DESCRIPTION to {tidy_minimum_r_version()}"),
todo("`usethis::use_tidy_description()`"),
todo("`usethis::use_tidy_github_actions()`"),
todo("`devtools::build_readme()`"),
""
)

c(bullets, checklist_footer(tidy = TRUE))
}

Expand Down

0 comments on commit e617ebb

Please sign in to comment.