Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/document.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

name: document.yaml

permissions: read-all

jobs:
document:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Get the roxygen2 version from DESCRIPTION
id: roxygen
run: |
version=$(grep '^Config/roxygen2/version:' DESCRIPTION | cut -d ' ' -f 2)
if [ -z "$version" ]; then
echo "::error::DESCRIPTION does not contain Config/roxygen2/version."
exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: roxygen2@${{ steps.roxygen.outputs.version }}
needs: roxygen2

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: Check that man/ and NAMESPACE are up to date
run: |
git add --intent-to-add man NAMESPACE
if ! git diff --exit-code -- man NAMESPACE; then
echo "::error::The documentation is not up to date. Run devtools::document() and commit the changes."
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/format-suggest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install
uses: posit-dev/setup-air@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Suggests:
withr
Config/testthat/edition: 3
Encoding: UTF-8
Config/roxygen2/version: 8.0.0
Config/roxygen2/version: 8.1.1
6 changes: 4 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ export(unused_packages)
export(user_lib)
export(with_extlib)
import(utils)
importFrom(tools,md5sum)
importFrom(tools,pkgVignettes)
importFrom(tools,
md5sum,
pkgVignettes
)
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
restore projects when that option is set.

- The `ignored.packages` option has been added, allowing users to specify
packages that should not be tracked by packrat. Such packaes will not
packages that should not be tracked by packrat. Such packages will not
enter the lockfile on `packrat::snapshot()` calls; nor will they be
cleaned out on `packrat::restore()` calls.

Expand Down Expand Up @@ -737,7 +737,7 @@ the following:
After this, you can restart your R session, and you should be good to go!

- **`packrat_mode`** allows you to seamlessly step in and out of packrat mode,
for when you would would like to manage or use external projects while
for when you would like to manage or use external projects while
working with a packrat project. In addition, once you have entered packrat
mode, the project directory is remembered for all later calls to packrat
functions, e.g. `snapshot`, `clean`, `restore`, and so on -- so calling these
Expand Down
2 changes: 1 addition & 1 deletion R/bundle.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ bundle <- function(
if (!include.vcs.history) "^(?!\\.(git|svn))"
)

## Make sure the base folder name is inheritted from the project name
## Make sure the base folder name is inherited from the project name
##
## The internal version of 'tar' used by R on Windows fails if one tries to include
## a file in a sub-directory, without actually including that subdirectory.
Expand Down
2 changes: 1 addition & 1 deletion R/cranlike-repositories.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#'
#' @param path Path to a local CRAN-like repository.
#' @param name The name to assign to the repository. Defaults to the
#' directory name in which the reopsitory is created.
#' directory name in which the repository is created.
#' @param add Add this new repository to the current set of repositories?
#'
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ dirDependenciesRenv <- function(dir) {
errors = "ignored"
)
pkgs <- unique(deps$Package)
## Exclude recommended packages (and the artifical "R" package) if there is
## Exclude recommended packages (and the artificial "R" package) if there is
## no package installed locally this places an implicit dependency on the
## system-installed version of a package
pkgs <- dropSystemPackages(pkgs)
Expand Down
2 changes: 1 addition & 1 deletion R/external.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ with_extlib <- function(packages = NULL, expr, envir = parent.frame()) {
extlib <- function(packages) {
# place user library at front of library paths (we want to
# include both the user library and the packrat library just
# so that external packaegs can still load and depend on
# so that external packages can still load and depend on
# packages only installed within the private library as well)
oldLibPaths <- .libPaths()
newLibPaths <- c(getDefaultLibPaths(), .libPaths())
Expand Down
4 changes: 2 additions & 2 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ r_env_vars <- function() {
"R_LIBS" = paste(getLibPaths(), collapse = .Platform$path.sep),
"CYGWIN" = "nodosfilewarning",
# When R CMD check runs tests, it sets R_TESTS. When the tests
# themeselves run R CMD xxxx, as is the case with the tests in
# themselves run R CMD xxxx, as is the case with the tests in
# devtools, having R_TESTS set causes errors because it confuses
# the R subprocesses. Unsetting it here avoids those problems.
"R_TESTS" = "",
Expand Down Expand Up @@ -478,7 +478,7 @@ find_rtools <- function(debug = FALSE) {
registry_candidates <- scan_registry_for_rtools(debug)

if (length(registry_candidates) == 0) {
# Not on path or in registry, so not installled
# Not on path or in registry, so not installed
message(
"WARNING: Rtools is required to build R packages, but is not ",
"currently installed.\n\n",
Expand Down
6 changes: 3 additions & 3 deletions R/lockfile-metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#'
#' Get and set metadata in the current packrat-managed project lockfile \code{packrat.lock}
#'
#' Project's \code{packrat.lock} contains some metadata before packages
#' dependencies informations. The project's lockfile is created and updated
#' The \code{packrat.lock} contains project metadata followed by information
#' about each package dependency. The project's lockfile is created and updated
#' programmatically by \code{\link{snapshot}}. However it could be necessary sometimes to
#' modify manually some of those values. For example, it could be useful to set another repository
#' CRAN url when deploying to a offline environnement.
#' CRAN url when deploying to an offline environment.
#'
#' @section available metadata :
#'
Expand Down
2 changes: 1 addition & 1 deletion R/packrat-mode.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ensurePkgTypeNotBoth <- function() {
}

beforePackratModeOn <- function(project) {
# Ensure that we leave packrat mode before transfering
# Ensure that we leave packrat mode before transferring
# to a new project.
if (isPackratModeOn()) {
off(print.banner = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion R/packrat.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
#' @param project The directory that contains the \R project.
#' @param options An \R \code{list} of options, as specified in
#' \code{\link{packrat-options}}.
#' @param enter Boolean, enter packrat mode for this project after finishing a init?
#' @param enter Boolean, enter packrat mode for this project after finishing an init?
#' @param restart If \code{TRUE}, restart the R session after init.
#' @param infer.dependencies If \code{TRUE}, infer package dependencies by
#' examining the \R code.
Expand Down
2 changes: 1 addition & 1 deletion R/recursive-package-dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ excludeBasePackages <- function(packages) {
}

excludeRecommendedPackages <- function(packages) {
# NOTE: becase utils::installed.packages() can fail in some
# NOTE: because utils::installed.packages() can fail in some
# scenarios, e.g. when libraries live on networked drives,
# we fall back to a simple listing of files in the associated
# library paths
Expand Down
2 changes: 1 addition & 1 deletion R/restore.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ isFromCranlikeRepo <- function(pkgRecord, repos) {
# in previous releases of packrat, we attempted to match the repository name
# with one of the existing repositories; however, this caused issues in
# certain environments (the names declared repositories in the lockfile, and
# the the names of the active repositories in the R session, may not match)
# the names of the active repositories in the R session, may not match)
!tolower(source) %in% c("source")
}

Expand Down
2 changes: 1 addition & 1 deletion R/snapshot.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ snapshot <- function(
if (isRPackage(project = project)) {
desc <- readDcf(file.path(project, "DESCRIPTION"))
if ("Package" %in% colnames(desc)) {
# R packages are not guaranteed to have a "Package" field (see isRPackge)
# R packages are not guaranteed to have a "Package" field (see isRPackage)
ignore <- unname(desc[, "Package"])
}
}
Expand Down
2 changes: 1 addition & 1 deletion inst/vendor/renv.R
Original file line number Diff line number Diff line change
Expand Up @@ -35246,7 +35246,7 @@ renv_python_deactivate <- function(project) {

lockfile$Python <- NULL
renv_lockfile_write(lockfile, file = file)
writef("- Deactived Python -- the lockfile has been updated.")
writef("- Deactivated Python -- the lockfile has been updated.")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is our vendored copy, but benign. Already resolved in renv.
https://github.com/rstudio/renv/blob/f3da1726252846650cb926490c06e2a63db64bf4/R/use-python.R#L433

TRUE

}
Expand Down
2 changes: 1 addition & 1 deletion man/init.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/lockfile-metadata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/repos_create.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions man/restore.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-cache.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/rstudio/packrat/issues/345
test_that("package installation when configured with a a cache uses the cache", {
test_that("package installation when configured with a cache uses the cache", {
skip_on_cran()
skip_on_os("windows")

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-packrat.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ withTestContext({
expect_true("toast" %in% pkgs, msg)
})

test_that("snapshot captures only installed dependecies when infer.dependencies is FALSE", {
test_that("snapshot captures only installed dependencies when infer.dependencies is FALSE", {
skip_on_cran()
skip_on_travis()
skip_on_ci()
Expand Down
Loading