From 9abe49e2169d73d74dfbfc632a5d2b0b151adc52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Armatys?= Date: Mon, 8 Jun 2026 10:28:15 +0200 Subject: [PATCH 1/4] chore: update DESCRIPTION and NAMESPACE files to reflect dependency version changes and remove deprecated imports --- DESCRIPTION | 38 ++++++++++++++++++-------------------- NAMESPACE | 2 -- R/databraryr-package.R | 2 -- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f312a76e..a86195b9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,32 +18,30 @@ License: MIT + file LICENSE URL: https://databrary.github.io/databraryr/, https://github.com/databrary/databraryr BugReports: https://github.com/databrary/databraryr/issues +Depends: + R (>= 4.3.2) Imports: assertthat (>= 0.2.1), dplyr (>= 1.1.4), - getPass (>= 0.2.4), - httr2 (>= 1.0.0), - keyring (>= 1.3.2), + getPass (>= 0.2-4), + httr2 (>= 1.2.1), + keyring (>= 1.4.1), lifecycle (>= 1.0.4), - magrittr, - methods (>= 4.3.2), - options (>= 0.2.0), - purrr (>= 1.0.2), - stringr (>= 1.5.1), + magrittr (>= 2.0.0), + methods, + openssl (>= 2.0.0), + options (>= 0.3.1), + purrr (>= 1.1.0), + stringr (>= 1.5.2), stats, - tibble (>= 3.2.1) + tibble (>= 3.3.0) Suggests: - av (>= 0.9.0), - covr (>= 3.6.0), - ggplot2, - knitr, - lintr (>= 3.0.0), - openssl, - readr, - rmarkdown (>= 2.26), - testthat (>= 3.0.0), - withr (>= 2.5.0), - xml2 (>= 1.3.0) + covr (>= 3.6.5), + knitr (>= 1.45), + lintr (>= 3.3.0), + rmarkdown (>= 2.31), + testthat (>= 3.2.3), + withr (>= 3.0.2) VignetteBuilder: knitr Config/testthat/edition: 3 diff --git a/NAMESPACE b/NAMESPACE index d5eebbbc..f777b17a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -113,6 +113,4 @@ export(update_session_file) export(update_volume_record) export(upload_file) export(whoami) -importFrom(lifecycle,deprecated) importFrom(magrittr,"%>%") -importFrom(methods,is) diff --git a/R/databraryr-package.R b/R/databraryr-package.R index 1f811202..a65cf643 100644 --- a/R/databraryr-package.R +++ b/R/databraryr-package.R @@ -2,7 +2,5 @@ "_PACKAGE" ## usethis namespace: start -#' @importFrom lifecycle deprecated -#' @importFrom methods is ## usethis namespace: end NULL From cd1bb236328015e2bc665a4b236b11782a9554a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Armatys?= Date: Mon, 8 Jun 2026 11:06:41 +0200 Subject: [PATCH 2/4] chore: update DESCRIPTION to lower R dependency version and modify NAMESPACE to import badge from lifecycle --- DESCRIPTION | 3 +-- NAMESPACE | 1 + R/databraryr-package.R | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index a86195b9..1360ba7b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,7 +19,7 @@ URL: https://databrary.github.io/databraryr/, https://github.com/databrary/databraryr BugReports: https://github.com/databrary/databraryr/issues Depends: - R (>= 4.3.2) + R (>= 4.3.0) Imports: assertthat (>= 0.2.1), dplyr (>= 1.1.4), @@ -28,7 +28,6 @@ Imports: keyring (>= 1.4.1), lifecycle (>= 1.0.4), magrittr (>= 2.0.0), - methods, openssl (>= 2.0.0), options (>= 0.3.1), purrr (>= 1.1.0), diff --git a/NAMESPACE b/NAMESPACE index f777b17a..458d8f6d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -113,4 +113,5 @@ export(update_session_file) export(update_volume_record) export(upload_file) export(whoami) +importFrom(lifecycle,badge) importFrom(magrittr,"%>%") diff --git a/R/databraryr-package.R b/R/databraryr-package.R index a65cf643..9ce25a58 100644 --- a/R/databraryr-package.R +++ b/R/databraryr-package.R @@ -2,5 +2,6 @@ "_PACKAGE" ## usethis namespace: start +#' @importFrom lifecycle badge ## usethis namespace: end NULL From 110f83c17d88c59b3173e1f20980a2e09b9e29a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Armatys?= Date: Mon, 8 Jun 2026 11:12:09 +0200 Subject: [PATCH 3/4] chore: update lint workflow to correct package specification for lintr --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7b788e06..58dc2e07 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -24,7 +24,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: lintr@3.2.0, any::pkgload, local::. + extra-packages: any::lintr, any::pkgload, local::. needs: lint - name: Lint From 02c5e1c5c3c156733c38f2dde58aa1914df899c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Armatys?= Date: Mon, 8 Jun 2026 11:19:04 +0200 Subject: [PATCH 4/4] refactor: replace pipe operator from %>% to |> in multiple R functions --- R/get_institution_avatar.R | 6 +++--- R/get_institution_by_id.R | 2 +- R/get_user_by_id.R | 2 +- R/list_asset_formats.R | 6 +++--- R/list_folder_assets.R | 2 +- R/list_session_assets.R | 2 +- R/list_user_volumes.R | 6 +++--- R/list_volume_assets.R | 4 ++-- R/list_volume_funding.R | 2 +- R/list_volume_info.R | 2 +- R/list_volume_session_assets.R | 2 +- R/list_volume_sessions.R | 2 +- R/make_login_client.R | 4 ++-- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/R/get_institution_avatar.R b/R/get_institution_avatar.R index e719560c..b5f86f92 100644 --- a/R/get_institution_avatar.R +++ b/R/get_institution_avatar.R @@ -78,9 +78,9 @@ get_institution_avatar <- function(institution_id = 1, } # Build the request with the avatar URL - req <- req %>% - httr2::req_url(full_url) %>% - httr2::req_method("GET") %>% + req <- req |> + httr2::req_url(full_url) |> + httr2::req_method("GET") |> httr2::req_error( is_error = function(resp) { FALSE diff --git a/R/get_institution_by_id.R b/R/get_institution_by_id.R index 9c7a9e7b..836d45ba 100644 --- a/R/get_institution_by_id.R +++ b/R/get_institution_by_id.R @@ -45,6 +45,6 @@ get_institution_by_id <- function(institution_id = 12, latitude = institution$latitude, longitude = institution$longitude, manual_coordinates = institution$manual_coordinates - ) %>% + ) |> as.list() } diff --git a/R/get_user_by_id.R b/R/get_user_by_id.R index 11d972a1..f777087b 100644 --- a/R/get_user_by_id.R +++ b/R/get_user_by_id.R @@ -47,6 +47,6 @@ get_user_by_id <- function(user_id = 6, affiliation_id = institution_id, is_authorized_investigator = user$is_authorized_investigator, has_avatar = user$has_avatar - ) %>% + ) |> as.list() } diff --git a/R/list_asset_formats.R b/R/list_asset_formats.R index 97d14290..d3327740 100644 --- a/R/list_asset_formats.R +++ b/R/list_asset_formats.R @@ -32,8 +32,8 @@ list_asset_formats <- function(vb = options::opt("vb")) { transcodable <- NULL if (!is.null(db_constants$format)) { - purrr::map(db_constants$format, as.data.frame) %>% - purrr::list_rbind() %>% + purrr::map(db_constants$format, as.data.frame) |> + purrr::list_rbind() |> dplyr::rename(format_id = id, format_mimetype = mimetype, format_extension = extension, @@ -42,6 +42,6 @@ list_asset_formats <- function(vb = options::opt("vb")) { } else { if (vb) message("No format information retrieved.") - return(NULL) + NULL } } diff --git a/R/list_folder_assets.R b/R/list_folder_assets.R index 6b1ee8f0..57f55cd3 100644 --- a/R/list_folder_assets.R +++ b/R/list_folder_assets.R @@ -96,7 +96,7 @@ list_folder_assets <- function(folder_id = 9807, ) }) - file_rows %>% + file_rows |> dplyr::mutate( folder_id = folder_id, vol_id = vol_id, diff --git a/R/list_session_assets.R b/R/list_session_assets.R index f6e341f1..2e4d5a5c 100644 --- a/R/list_session_assets.R +++ b/R/list_session_assets.R @@ -99,7 +99,7 @@ list_session_assets <- function(session_id = 9807, ) }) - asset_rows %>% + asset_rows |> dplyr::mutate( session_id = session_id, vol_id = vol_id, diff --git a/R/list_user_volumes.R b/R/list_user_volumes.R index ae6a1a56..3f821472 100644 --- a/R/list_user_volumes.R +++ b/R/list_user_volumes.R @@ -48,11 +48,11 @@ list_user_volumes <- function(user_id = 6, vol_access_level = entry$access_level, vol_sharing_level = entry$sharing_level ) - }, .progress = TRUE) %>% - purrr::list_rbind() %>% + }, .progress = TRUE) |> + purrr::list_rbind() |> dplyr::mutate(user_id = user_df$id, user_prename = user_df$prename, user_sortname = user_df$sortname, - user_affiliation = user_df$affiliation) %>% + user_affiliation = user_df$affiliation) |> dplyr::arrange(vol_id) } diff --git a/R/list_volume_assets.R b/R/list_volume_assets.R index 8eec11fe..ce5e958a 100644 --- a/R/list_volume_assets.R +++ b/R/list_volume_assets.R @@ -79,9 +79,9 @@ list_volume_assets <- function(vol_id = 1, session_date = session$source_date, session_release = session$release_level ) - }, .progress = TRUE) %>% + }, .progress = TRUE) |> purrr::list_rbind() - }) %>% + }) |> purrr::list_rbind() if (is.null(files) || nrow(files) == 0) { diff --git a/R/list_volume_funding.R b/R/list_volume_funding.R index b251525a..04835e2a 100644 --- a/R/list_volume_funding.R +++ b/R/list_volume_funding.R @@ -68,7 +68,7 @@ list_volume_funding <- function(vol_id = 1, rows <- dplyr::mutate(rows, vol_id = id) } rows - }) %>% + }) |> purrr::list_rbind() if (is.null(out) || nrow(out) == 0L) { diff --git a/R/list_volume_info.R b/R/list_volume_info.R index ce40175a..4a43c70e 100644 --- a/R/list_volume_info.R +++ b/R/list_volume_info.R @@ -39,7 +39,7 @@ list_volume_info <- volume <- databraryr::get_volume_by_id(vol_id = vol_id, vb = vb, rq = rq) if (is.null(volume)) { - return(NULL) + NULL } else { if (vb) message("Summarising volume detail...") diff --git a/R/list_volume_session_assets.R b/R/list_volume_session_assets.R index 234cc9e1..74aefeb9 100644 --- a/R/list_volume_session_assets.R +++ b/R/list_volume_session_assets.R @@ -102,7 +102,7 @@ list_volume_session_assets <- session_name = session$name, session_release = session$release_level ) - }) %>% + }) |> purrr::list_rbind() asset_rows diff --git a/R/list_volume_sessions.R b/R/list_volume_sessions.R index efc8cfd0..666abd83 100644 --- a/R/list_volume_sessions.R +++ b/R/list_volume_sessions.R @@ -82,7 +82,7 @@ list_volume_sessions <- vb = vb ) - df <- df %>% + df <- df |> dplyr::mutate( vol_id = volume$id, vol_name = volume$title, diff --git a/R/make_login_client.R b/R/make_login_client.R index df2de348..40c7cf79 100644 --- a/R/make_login_client.R +++ b/R/make_login_client.R @@ -123,8 +123,8 @@ make_login_client <- function(email = NULL, if (is.null(rq)) rq <- make_default_request() - rq <- rq %>% - httr2::req_url(LOGIN) %>% + rq <- rq |> + httr2::req_url(LOGIN) |> httr2::req_body_json(list(email = email, password = password)) resp <- tryCatch(