Skip to content

Commit

Permalink
3.2.0 as submitted to CRAN (#2726)
Browse files Browse the repository at this point in the history
* Create a second r-devel devcontainer, set it as default

* Need repos set on this image

* DESCRIPTION version

* Copy-edit to NEWS

* empty entry for backports:4.4.0

* Fix up backport_linter for oldrel stuff

* ignore references to removed linter

* to-be-deleted: massive GHA for all versions

* Revert "to-be-deleted: massive GHA for all versions"

This reverts commit b7a34d1.

* Fix up exclusions of large files
  • Loading branch information
MichaelChirico authored Feb 12, 2025
1 parent 39f7a59 commit b96e5e5
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 46 deletions.
5 changes: 4 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ testthat-problems[.]rds$
^_pkgdown\.yaml$
^docs$
^pkgdown$
^vignettes/[^-]+.gif$
# large files not needed for CRAN
^man/figures/logo[.]png$
# keep '-still.gif' compact versions
^vignettes/.*([^l]|[^l]l|[^i]ll|[^t]ill|[^s]till)[.]gif$
^CRAN-SUBMISSION$
^CODE_OF_CONDUCT\.md$
^paper$
Expand Down
6 changes: 3 additions & 3 deletions .dev/revdep_get_repos.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env Rscript
# Script to get URL keys from CRAN
# of packags that Suggest or Import lintr
# of packages that Suggest or Import lintr

cran_db <- as.data.frame(available.packages(repos = "https://cran.r-project.org"), stringsAsFactors = FALSE)
lintr_re <- "\\blintr\\b"
Expand Down Expand Up @@ -50,12 +50,12 @@ git_urls <- extract_github_repo(urls)
matched <- nzchar(git_urls)

utils::write.csv(
data.frame(package = lintr_pkg[!matched], repo = file.path("https://github.com/cran", lintr_pkg[!matched])), # nolint: strings_as_factors_linter.
data.frame(package = lintr_pkg[!matched], repo = file.path("https://github.com/cran", lintr_pkg[!matched])),
"revdep-no-repos",
row.names = FALSE, quote = FALSE
)
utils::write.csv(
data.frame(package = lintr_pkg[matched], repo = git_urls[matched]), # nolint: strings_as_factors_linter.
data.frame(package = lintr_pkg[matched], repo = git_urls[matched]),
"revdep-repos",
row.names = FALSE, quote = FALSE
)
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"build": { "dockerfile": "Dockerfile", "context": ".."}
"build": { "dockerfile": "r-devel/Dockerfile", "context": ".."}
}
File renamed without changes.
3 changes: 3 additions & 0 deletions .devcontainer/r-base/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"build": { "dockerfile": "Dockerfile", "context": "../.." }
}
15 changes: 15 additions & 0 deletions .devcontainer/r-devel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM docker.io/rhub/r-minimal:devel

RUN apk update && \
apk add --no-cache git gcc g++ libxml2 linux-headers musl-dev

COPY DESCRIPTION .

RUN Rscript -e ' \
options(repos="https://cloud.r-project.org"); \
install.packages("remotes"); \
remotes::install_deps(dependencies = c( \
"Imports", \
"Config/needs/development" \
)) \
'
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: lintr
Title: A 'Linter' for R Code
Version: 3.1.2.9000
Version: 3.2.0
Authors@R: c(
person("Jim", "Hester", , role = "aut"),
person("Florent", "Angly", role = "aut",
Expand Down
58 changes: 29 additions & 29 deletions NEWS.md

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions R/backport_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,34 +131,37 @@ normalize_r_version <- function(r_version) {
# devel NEWS https://cran.rstudio.com/doc/manuals/r-devel/NEWS.html
# release NEWS https://cran.r-project.org/doc/manuals/r-release/NEWS.html
backports <- list(
`4.4.0` = character(), # need character() entries for oldrel specifications
`4.3.3` = character(),
`4.3.0` = c("R_compiled_by", "array2DF"),
`4.2.3` = character(),
`4.2.1` = "findCRANmirror",
`4.2.0` = c(".pretty", ".LC.categories", "Sys.setLanguage()"),
`4.1.3` = character(), # need these for oldrel specifications
`4.1.3` = character(),
`4.1.0` = c("numToBits", "numToInts", "gregexec", "charClass", "checkRdContents", "...names"),
`4.0.5` = character(), # need these for oldrel specifications
`4.0.5` = character(),
`4.0.0` = c(
".class2", ".S3method", "activeBindingFunction", "deparse1", "globalCallingHandlers",
"infoRDS", "list2DF", "marginSums", "proportions", "R_user_dir", "socketTimeout", "tryInvokeRestart"
),
`3.6.3` = character(), # need these for oldrel specifications
`3.6.3` = character(),
`3.6.0` = c(
"asplit", "hcl.colors", "hcl.pals", "mem.maxNsize", "mem.maxVsize", "nullfile", "str2lang",
"str2expression", "update_PACKAGES"
),
`3.5.3` = character(), # need these for oldrel specifications
`3.5.3` = character(),
`3.5.0` = c("...elt", "...length", "askYesNo", "getDefaultCluster", "isFALSE", "packageDate", "warnErrList"),
`3.4.4` = character(), # need these for oldrel specifications
`3.4.4` = character(),
`3.4.0` = c(
"check_packages_in_dir_details", "CRAN_package_db", "debugcall", "hasName",
"isS3stdgeneric", "strcapture", "Sys.setFileTime", "undebugcall"
),
`3.3.3` = character(), # need these for oldrel specifications
`3.3.3` = character(),
`3.3.0` = c(
".traceback", "chkDots", "curlGetHeaders", "endsWith", "grouping", "isS3method",
"makevars_site", "makevars_user", "Rcmd", "sigma", "startsWith", "strrep", "validEnc", "validUTF8"
),
`3.2.5` = character(), # need these for oldrel specifications
`3.2.5` = character(),
`3.2.0` = c(
".getNamespaceInfo", "check_packages_in_dir_changes", "debuggingState",
"dir.exists", "dynGet", "extSoftVersion", "get0", "grSoftVersion", "hsearch_db",
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-backport_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ test_that("backport_linter detects backwards-incompatibility", {

# oldrel specification
expect_lint(
".pretty(2)",
rex::rex(".pretty (R 4.2.0) is not available for dependency R >= 4.1.3."),
"R_compiled_by()",
rex::rex("R_compiled_by (R 4.3.0) is not available for dependency R >= 4.2.3."),
backport_linter("oldrel")
)

Expand All @@ -50,13 +50,13 @@ test_that("backport_linter detects backwards-incompatibility", {

expect_lint(
"numToBits(2)",
rex::rex("numToBits (R 4.1.0) is not available for dependency R >= 3.6.3."),
rex::rex("numToBits (R 4.1.0) is not available for dependency R >= 4.0.5."),
backport_linter("oldrel-3")
)
# no interference from namespace-qualification (even of base functions)
expect_lint(
"base::numToBits(2)",
rex::rex("numToBits (R 4.1.0) is not available for dependency R >= 3.6.3."),
rex::rex("numToBits (R 4.1.0) is not available for dependency R >= 4.0.5."),
backport_linter("oldrel-3")
)

Expand Down

0 comments on commit b96e5e5

Please sign in to comment.