Skip to content

Commit

Permalink
Merge pull request #20 from orichters/main
Browse files Browse the repository at this point in the history
allow to exclude packages from updateRenv
  • Loading branch information
orichters committed Aug 29, 2024
2 parents b435a71 + 9317b4f commit 887da98
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '1053587'
ValidationKey: '1078056'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/lorenzwalthert/precommit
rev: 7910e0323d7213f34275a7a562b9ef0fde8ce1b9 # frozen: v0.4.2
rev: bae853d82da476eee0e0a57960ee6b741a3b3fb7 # frozen: v0.4.3
hooks:
- id: parsable-R
- id: deps-in-desc
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'piamenv: Package environment support for PIAM'
version: 0.5.3
date-released: '2024-06-05'
version: 0.5.4
date-released: '2024-08-29'
abstract: Enables easier management of package environments, based on renv and Python
venv.
authors:
Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: piamenv
Title: Package environment support for PIAM
Version: 0.5.3
Date: 2024-06-05
Version: 0.5.4
Date: 2024-08-29
Authors@R:
person("Pascal", "Sauer", , "pascal.sauer@pik-potsdam.de", role = c("aut", "cre"))
Description: Enables easier management of package environments, based on renv and Python venv.
Expand All @@ -17,4 +17,4 @@ Suggests:
covr,
testthat
Encoding: UTF-8
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
6 changes: 3 additions & 3 deletions R/updateRenv.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#' Update all PIK-PIAM packages in the current renv, write renv.lock into archive.
#'
#' @return Invisibly, the return value of renv::update.
#'
#' @param exclude vector of packages not to be updated
#' @author Pascal Sauer
#' @export
updateRenv <- function() {
updateRenv <- function(exclude = NULL) {
stopifnot(`No renv active. Try starting the R session in the project root.` = !is.null(renv::project()))

installedPiamPackages <- intersect(utils::installed.packages()[, "Package"], piamPackages())
installedUpdates <- renv::update(installedPiamPackages, prompt = FALSE)
installedUpdates <- renv::update(setdiff(installedPiamPackages, exclude), prompt = FALSE)

archiveRenv()
return(invisible(installedUpdates))
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package environment support for PIAM

R package **piamenv**, version **0.5.3**
R package **piamenv**, version **0.5.4**

[![CRAN status](https://www.r-pkg.org/badges/version/piamenv)](https://cran.r-project.org/package=piamenv) [![R build status](https://github.com/pik-piam/piamenv/workflows/check/badge.svg)](https://github.com/pik-piam/piamenv/actions) [![codecov](https://codecov.io/gh/pik-piam/piamenv/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/piamenv) [![r-universe](https://pik-piam.r-universe.dev/badges/piamenv)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -38,7 +38,7 @@ In case of questions / problems please contact Pascal Sauer <pascal.sauer@pik-po

To cite package **piamenv** in publications use:

Sauer P (2024). _piamenv: Package environment support for PIAM_. R package version 0.5.3, <https://github.com/pik-piam/piamenv>.
Sauer P (2024). _piamenv: Package environment support for PIAM_. R package version 0.5.4, <https://github.com/pik-piam/piamenv>.

A BibTeX entry for LaTeX users is

Expand All @@ -47,7 +47,7 @@ A BibTeX entry for LaTeX users is
title = {piamenv: Package environment support for PIAM},
author = {Pascal Sauer},
year = {2024},
note = {R package version 0.5.3},
note = {R package version 0.5.4},
url = {https://github.com/pik-piam/piamenv},
}
```
5 changes: 4 additions & 1 deletion man/updateRenv.Rd

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

0 comments on commit 887da98

Please sign in to comment.