Skip to content

Commit

Permalink
Rename again
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 24, 2024
1 parent 67ee5f8 commit 9ddcc1d
Show file tree
Hide file tree
Showing 32 changed files with 88 additions and 117 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export(orderly_location_add)
export(orderly_location_add_http)
export(orderly_location_add_packit)
export(orderly_location_add_path)
export(orderly_location_fetch_metadata)
export(orderly_location_list)
export(orderly_location_metadata_fetch)
export(orderly_location_pull)
export(orderly_location_pull_metadata)
export(orderly_location_pull_packet)
Expand Down
2 changes: 1 addition & 1 deletion R/compare.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ orderly_compare_packets <- function(target, current,
pull_metadata = pull_metadata)

if (options$pull_metadata) {
orderly_location_metadata_fetch(options$location, root = root)
orderly_location_fetch_metadata(options$location, root = root)
}

target_metadata <- orderly_metadata(target, root = root)
Expand Down
2 changes: 1 addition & 1 deletion R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##'
##' * `orderly_location_pull_packet`; please use [orderly_location_pull()]
##' * `orderly_location_pull_metadata`; please use
##' [orderly_location_metadata_fetch()]
##' [orderly_location_fetch_metadata()]
##'
##' @param ... Arguments forwarded to the new version
##' @return See the linked pages above for the current return type.
Expand Down
20 changes: 10 additions & 10 deletions R/location.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##' based locations are supported, with limited support for custom
##' locations. Note that adding a location does *not* pull metadata
##' from it, you need to call
##' [orderly2::orderly_location_metadata_fetch] first. The function
##' [orderly2::orderly_location_fetch_metadata] first. The function
##' `orderly_location_add` can add any sort of location, but the other
##' functions documented here (`orderly_location_add_path`, etc) will
##' typically be much easier to use in practice.
Expand Down Expand Up @@ -290,7 +290,7 @@ orderly_location_remove <- function(name, root = NULL) {
##' `args`. The `args` column is a list column, with each element
##' being the key-value pair arguments to the location.
##'
##' @seealso [orderly2::orderly_location_metadata_fetch], which can
##' @seealso [orderly2::orderly_location_fetch_metadata], which can
##' update your outpack index with metadata from any of the
##' locations listed here.
##'
Expand Down Expand Up @@ -322,7 +322,7 @@ orderly_location_list <- function(verbose = FALSE, root = NULL) {
##' @return Nothing
##'
##' @export
orderly_location_metadata_fetch <- function(location = NULL, root = NULL) {
orderly_location_fetch_metadata <- function(location = NULL, root = NULL) {
root <- root_open(root, require_orderly = FALSE)
location_name <- location_resolve_valid(location, root,
include_local = FALSE,
Expand All @@ -333,7 +333,7 @@ orderly_location_metadata_fetch <- function(location = NULL, root = NULL) {
"Fetching metadata from {length(location_name)} location{?s}:",
"{squote({location_name})}"))
for (name in location_name) {
res <- location_metadata_fetch(name, root)
res <- location_fetch_metadata(name, root)
if (res$total > 0) {
cli_alert_success(paste(
"Found {res$total} packet{?s} at '{name}', of which",
Expand Down Expand Up @@ -363,8 +363,8 @@ orderly_location_metadata_fetch <- function(location = NULL, root = NULL) {
orderly_location_pull_metadata <- function(...) {
deprecate_warn(
"orderly_location_pull_metadata",
"orderly_location_metadata_fetch")
orderly_location_metadata_fetch(...)
"orderly_location_fetch_metadata")
orderly_location_fetch_metadata(...)
}


Expand Down Expand Up @@ -419,7 +419,7 @@ orderly_location_pull <- function(expr,
hint <- c(i = paste("Did you forget to pull metadata? You can do this",
"by using the argument {.code pull_metadata = TRUE}",
"in the call to 'orderly_location_pull()', or",
"by running 'orderly_location_metadata_fetch()'"))
"by running 'orderly_location_fetch_metadata()'"))
} else {
hint <- NULL
}
Expand Down Expand Up @@ -549,7 +549,7 @@ orderly_location_push <- function(expr, location, name = NULL, dry_run = FALSE,
driver <- location_driver(location_name, root)
location_push_files(plan$files, driver, root)
location_push_metadata(plan$packet_id, driver, root)
orderly_location_metadata_fetch(location_name, root)
orderly_location_fetch_metadata(location_name, root)
}
}

Expand Down Expand Up @@ -638,7 +638,7 @@ orderly_location_custom <- function(driver, ...) {
}


location_metadata_fetch <- function(location_name, root,
location_fetch_metadata <- function(location_name, root,
call = parent.frame()) {
index <- root$index$data()
driver <- location_driver(location_name, root)
Expand Down Expand Up @@ -851,7 +851,7 @@ location_build_pull_plan_location <- function(packets, location, root, call) {
## In the case where the above is used, we probably have
## up-to-date metadata so we don't display this.
hint <- paste("Do you need to run",
"{.run orderly2::orderly_location_metadata_fetch()}?")
"{.run orderly2::orderly_location_fetch_metadata()}?")
}
cli::cli_abort(c("Failed to find packet{?s} {squote(missing)}",
i = "Looked in location{?s} {squote(location_name)}",
Expand Down
2 changes: 1 addition & 1 deletion R/outpack_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
##' it's not unpacked but also not known to be present in some other
##' remote) then this will fail because it's impossible to resolve
##' the files. Consider refreshing the metadata with
##' [orderly2::orderly_location_metadata_fetch] to refresh this.
##' [orderly2::orderly_location_fetch_metadata] to refresh this.
##' * if the `id` is not unpacked *and* no local copy of the files
##' referred to can be found, we error by default (but see the next
##' option). However, sometimes the file you refer to might also be
Expand Down
2 changes: 1 addition & 1 deletion R/query_index.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ new_query_index <- function(root, options) {
root <- root_open(root, require_orderly = FALSE)

if (options$pull_metadata) {
orderly_location_metadata_fetch(options$location, root = root)
orderly_location_fetch_metadata(options$location, root = root)
}
idx <- root$index$data()
metadata <- idx$metadata
Expand Down
2 changes: 1 addition & 1 deletion R/query_search.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ orderly_search <- function(expr, name = NULL, scope = NULL, subquery = NULL,
##' @param pull_metadata Logical, indicating if we should pull
##' metadata immediately before the search. If `location` is given,
##' then we will pass this through to
##' [orderly2::orderly_location_metadata_fetch] to filter locations
##' [orderly2::orderly_location_fetch_metadata] to filter locations
##' to update. If pulling many packets in sequence, you *will* want
##' to update this option to `FALSE` after the first pull, otherwise
##' it will update the metadata between every packet, which will be
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ reference:
- title: Interact with locations
- subtitle: Use locations
contents:
- orderly_location_metadata_fetch
- orderly_location_fetch_metadata
- orderly_location_pull
- orderly_location_push
- subtitle: Manage locations
Expand Down
2 changes: 1 addition & 1 deletion man/orderly2-deprecated.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/orderly_compare_packets.Rd

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

4 changes: 2 additions & 2 deletions man/orderly_copy_files.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/orderly_interactive_set_search_options.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/orderly_location_add.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/orderly_location_list.Rd

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

29 changes: 0 additions & 29 deletions man/orderly_location_metadata_fetch.Rd

This file was deleted.

2 changes: 1 addition & 1 deletion man/orderly_location_pull.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/orderly_metadata_extract.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/orderly_run.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/orderly_search.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/orderly_search_options.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-deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test_that("can use deprecated pull_packet with warning", {

id <- create_random_packet(root$src)
orderly_location_add_path("src", path = root$src$path, root = root$dst)
orderly_location_metadata_fetch(root = root$dst)
orderly_location_fetch_metadata(root = root$dst)
res <- evaluate_promise(orderly_location_pull_packet(id, root = root$dst))
expect_equal(res$result, id)
expect_match(res$warnings,
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-location-path.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ test_that("push overlapping tree", {
orderly_location_add_path("server", path = server$path, root = client)

id_base <- create_random_packet(server)
orderly_location_metadata_fetch(root = client)
orderly_location_fetch_metadata(root = client)
suppressMessages(orderly_location_pull(id_base, root = client))

ids <- create_random_packet_chain(client, 3, id_base)
Expand Down Expand Up @@ -367,7 +367,7 @@ test_that("allow relative paths in path locations", {
b <- suppressMessages(orderly_init(file.path(tmp, "b")))
ids <- vcapply(1:3, function(i) create_random_packet(b))
withr::with_dir(a, orderly_location_add_path("b", path = "../b"))
orderly_location_metadata_fetch(root = a)
orderly_location_fetch_metadata(root = a)
expect_equal(orderly_search(root = a, location = "b"), ids)
})

Expand Down
Loading

0 comments on commit 9ddcc1d

Please sign in to comment.