Skip to content

Commit 8311af9

Browse files
committed
Update yakuba_annotate_body defaults for malevnc 0.4.0
Matches malevnc::manc_annotate_body()'s 0.4.0 defaults: test now defaults to FALSE (was TRUE, which targeted the retired Clio test server and errored) and a new dry_run argument defaults to TRUE so a bare call previews the POST body that would be sent to production Clio rather than writing. Pass dry_run = FALSE to actually write. Requires malevnc (>= 0.4.0). Version bumped to 0.1.0.
1 parent 2185234 commit 8311af9

3 files changed

Lines changed: 18 additions & 9 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: yakuba
22
Type: Package
33
Title: Access the Drosophila yakuba FlyEM Dataset
4-
Version: 0.0.0.9000
4+
Version: 0.1.0
55
Authors@R:
66
c(person(given = "Gregory",
77
family = "Jefferis",
@@ -18,7 +18,7 @@ Depends:
1818
R (>= 3.6.0)
1919
Imports:
2020
dplyr,
21-
malevnc,
21+
malevnc (>= 0.4.0),
2222
nat,
2323
neuprintr,
2424
pbapply

R/bodies.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ dyak_body_annotations <- function(ids = NULL, query = NULL, json = FALSE,
7272
#' users are strongly recommended to use data frames.
7373
#' @param version Optional Clio version to associate with this annotation. The
7474
#' default `NULL` uses the current version returned by the API.
75-
#' @param test Whether to use the test Clio store (recommended until you are
76-
#' sure that you know what you are doing).
75+
#' @param test Whether to use the test Clio store. Default `FALSE` writes to
76+
#' production Clio. See [malevnc::manc_annotate_body()].
77+
#' @param dry_run When `TRUE` (the default) no data is written; a preview
78+
#' tibble of the POST body is returned. Pass `dry_run = FALSE` to actually
79+
#' write. See [malevnc::manc_annotate_body()] for full details.
7780
#' @param write_empty_fields When `x` is a data frame, this controls whether
7881
#' empty fields in `x` overwrite fields in the Clio database.
7982
#' @param designated_user Optional alternate user recorded in Clio for the
@@ -100,11 +103,11 @@ dyak_body_annotations <- function(ids = NULL, query = NULL, json = FALSE,
100103
#' )
101104
#' }
102105
#' @export
103-
yakuba_annotate_body <- function(x, test = TRUE, version = NULL,
106+
yakuba_annotate_body <- function(x, test = FALSE, version = NULL,
104107
write_empty_fields = FALSE,
105108
designated_user = NULL,
106109
protect = c("user"), chunksize = 50,
107-
check_types = TRUE, ...,
110+
check_types = TRUE, dry_run = TRUE, ...,
108111
dataset = dyak_default_dataset()) {
109112
if (is.data.frame(x) && "bodyid" %in% colnames(x)) {
110113
x$bodyid <- dyak_ids(x$bodyid, as_character = FALSE, unique = FALSE,
@@ -121,6 +124,7 @@ yakuba_annotate_body <- function(x, test = TRUE, version = NULL,
121124
chunksize = chunksize,
122125
check_types = check_types,
123126
query = FALSE,
127+
dry_run = dry_run,
124128
...
125129
),
126130
dataset = dataset

man/yakuba_annotate_body.Rd

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)