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/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 17 additions & 20 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,29 @@ 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.0)
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),
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
Expand Down
3 changes: 1 addition & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,5 @@ export(update_session_file)
export(update_volume_record)
export(upload_file)
export(whoami)
importFrom(lifecycle,deprecated)
importFrom(lifecycle,badge)
importFrom(magrittr,"%>%")
importFrom(methods,is)
3 changes: 1 addition & 2 deletions R/databraryr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"_PACKAGE"

## usethis namespace: start
#' @importFrom lifecycle deprecated
#' @importFrom methods is
#' @importFrom lifecycle badge
## usethis namespace: end
NULL
6 changes: 3 additions & 3 deletions R/get_institution_avatar.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/get_institution_by_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
2 changes: 1 addition & 1 deletion R/get_user_by_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
6 changes: 3 additions & 3 deletions R/list_asset_formats.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -42,6 +42,6 @@ list_asset_formats <- function(vb = options::opt("vb")) {
} else {
if (vb)
message("No format information retrieved.")
return(NULL)
NULL
}
}
2 changes: 1 addition & 1 deletion R/list_folder_assets.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/list_session_assets.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions R/list_user_volumes.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 2 additions & 2 deletions R/list_volume_assets.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion R/list_volume_funding.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion R/list_volume_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -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...")

Expand Down
2 changes: 1 addition & 1 deletion R/list_volume_session_assets.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ list_volume_session_assets <-
session_name = session$name,
session_release = session$release_level
)
}) %>%
}) |>
purrr::list_rbind()

asset_rows
Expand Down
2 changes: 1 addition & 1 deletion R/list_volume_sessions.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ list_volume_sessions <-
vb = vb
)

df <- df %>%
df <- df |>
dplyr::mutate(
vol_id = volume$id,
vol_name = volume$title,
Expand Down
4 changes: 2 additions & 2 deletions R/make_login_client.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading