From 5d1bac3ddc39fa94e431827ff6ed914ec03771d0 Mon Sep 17 00:00:00 2001 From: Scott Chamberlain Date: Wed, 7 Aug 2024 09:33:03 -0700 Subject: [PATCH 1/7] #42 make sure cromwell_call outputs a tbl --- R/cromwellCall.R | 2 +- tests/testthat/test-cromwell_call.R | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/R/cromwellCall.R b/R/cromwellCall.R index 0092d61..ca3b45d 100644 --- a/R/cromwellCall.R +++ b/R/cromwellCall.R @@ -252,6 +252,6 @@ cromwell_call <- function(workflow_id, url = cw_url(), token = NULL) { # with Shiny apps easier just_calls <- dplyr::tibble("workflow_id" = "No call metadata available.") } - return(just_calls) + return(dplyr::as_tibble(just_calls)) } # nolint end diff --git a/tests/testthat/test-cromwell_call.R b/tests/testthat/test-cromwell_call.R index 5548c33..2189494 100644 --- a/tests/testthat/test-cromwell_call.R +++ b/tests/testthat/test-cromwell_call.R @@ -10,5 +10,6 @@ test_that("cromwell_call", { }) expect_s3_class(res, "data.frame") + expect_s3_class(res, "tbl") expect_equal(res$callName, "hello") }) From 3d38856e2c11f0a8850f0611edfcbf205a7d1c88 Mon Sep 17 00:00:00 2001 From: Scott Chamberlain Date: Wed, 7 Aug 2024 09:55:48 -0700 Subject: [PATCH 2/7] fix #42 reorder cromwell_jobs columns to make output easier to read, bump pkg version --- DESCRIPTION | 2 +- NAMESPACE | 2 ++ R/cromwellJobs.R | 5 +++++ R/rcromwell-package.R | 2 +- tests/testthat/test-cromwell_jobs.R | 3 +++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index a641f55..d28c43c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rcromwell Title: Convenience Tools for Managing WDL Workflows via Cromwell -Version: 3.2.4 +Version: 3.2.4.9200 Authors@R: c( person("Amy", "Paguirigan", role = "aut", comment = c(ORCID = "0000-0002-6819-9736")), diff --git a/NAMESPACE b/NAMESPACE index dd9d319..9bda273 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -20,7 +20,9 @@ export(cw_url) export(workflow_inputs) export(workflow_options) importFrom(dplyr,"%>%") +importFrom(dplyr,any_of) importFrom(dplyr,as_tibble) +importFrom(dplyr,relocate) importFrom(dplyr,tibble) importFrom(glue,glue) importFrom(httr,GET) diff --git a/R/cromwellJobs.R b/R/cromwellJobs.R index 74d8d61..764f3fd 100644 --- a/R/cromwellJobs.R +++ b/R/cromwellJobs.R @@ -104,5 +104,10 @@ cromwell_jobs_process <- function(jobs_data) { } else { cr_table <- dplyr::tibble("workflow_id" = NA) } + + # specific column order if columns exist (via `any_of`) + columns_order <- c("workflow_name", "workflow_id", "status", "submission", "start", + "end", "workflowDuration") + cr_table <- dplyr::relocate(cr_table, any_of(columns_order)) return(cr_table) } diff --git a/R/rcromwell-package.R b/R/rcromwell-package.R index 41bb2f4..8c2d7a3 100644 --- a/R/rcromwell-package.R +++ b/R/rcromwell-package.R @@ -3,7 +3,7 @@ ## usethis namespace: start #' @importFrom glue glue -#' @importFrom dplyr as_tibble tibble %>% +#' @importFrom dplyr as_tibble tibble relocate any_of %>% #' @importFrom lubridate now with_tz ymd_hms #' @importFrom purrr discard flatten keep map map_dfr pluck reduce ## usethis namespace: end diff --git a/tests/testthat/test-cromwell_jobs.R b/tests/testthat/test-cromwell_jobs.R index b86b0ba..99568ef 100644 --- a/tests/testthat/test-cromwell_jobs.R +++ b/tests/testthat/test-cromwell_jobs.R @@ -6,6 +6,9 @@ test_that("cromwell_jobs", { match_requests_on = c("method", "host", "path") ) + expect_s3_class(res, "data.frame") expect_s3_class(res, "tbl") expect_equal(NCOL(res), 8) + # explicit column ordering for better understanding + expect_equal(names(res)[1], "workflow_name") }) From 09930063b212f21a9a458ebda46e1e4baca0360b Mon Sep 17 00:00:00 2001 From: Scott Chamberlain Date: Thu, 8 Aug 2024 09:19:14 -0700 Subject: [PATCH 3/7] fix #35 remove comment about fialures not working --- tests/testthat/test-cromwell_failures.R | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/testthat/test-cromwell_failures.R b/tests/testthat/test-cromwell_failures.R index 4edb0a9..fff9baa 100644 --- a/tests/testthat/test-cromwell_failures.R +++ b/tests/testthat/test-cromwell_failures.R @@ -1,7 +1,3 @@ -# FIXME: cromwell_failures doesn't appear to be working. At least for the -# case where data is in the $failures slot at the top level of the list -# the parsing code doesn't grab it - perhaps the API response has changed - test_that("cromwell_failures", { vcr::use_cassette("cromwell_failures_prep", { job <- cromwell_submit_batch(wdl = file_hello, params = file_inputs_bad) From 754d8af48e2d34a222d1ef5daeb3ec99f9d7afd6 Mon Sep 17 00:00:00 2001 From: Scott Chamberlain Date: Thu, 8 Aug 2024 09:19:40 -0700 Subject: [PATCH 4/7] styling --- R/cromwellJobs.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/cromwellJobs.R b/R/cromwellJobs.R index 764f3fd..37de511 100644 --- a/R/cromwellJobs.R +++ b/R/cromwellJobs.R @@ -106,8 +106,10 @@ cromwell_jobs_process <- function(jobs_data) { } # specific column order if columns exist (via `any_of`) - columns_order <- c("workflow_name", "workflow_id", "status", "submission", "start", - "end", "workflowDuration") + columns_order <- c( + "workflow_name", "workflow_id", "status", "submission", "start", + "end", "workflowDuration" + ) cr_table <- dplyr::relocate(cr_table, any_of(columns_order)) return(cr_table) } From 26e83efb40bbeb64098e01ef66531d9df7255f34 Mon Sep 17 00:00:00 2001 From: Scott Chamberlain Date: Thu, 8 Aug 2024 09:24:20 -0700 Subject: [PATCH 5/7] fix #30 add prior art section to readme --- README.Rmd | 4 ++++ README.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.Rmd b/README.Rmd index bcea239..013d61f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -48,3 +48,7 @@ Please note that the rcromwell project is released with a [Contributor Code of C ## License [MIT](LICENSE.md) + +## Prior art + +- [wdlRunR](https://github.com/seandavi/wdlRunR) - archived package/repo diff --git a/README.md b/README.md index 3ce3f4f..d7e9672 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,7 @@ Please note that the rcromwell project is released with a [Contributor Code of C ## License [MIT](LICENSE.md) + +## Prior art + +- [wdlRunR](https://github.com/seandavi/wdlRunR) - archived package/repo From 554c5143050534d0b2314630e01ba5676f2a0f4d Mon Sep 17 00:00:00 2001 From: Scott Chamberlain Date: Thu, 8 Aug 2024 09:30:19 -0700 Subject: [PATCH 6/7] fix #41 add links to get started vign and function docs from readme and docs site landing page --- README.Rmd | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.Rmd b/README.Rmd index 013d61f..d775c39 100644 --- a/README.Rmd +++ b/README.Rmd @@ -35,7 +35,7 @@ pak::pak("getwilds/rcromwell") ## Documentation -Go to for `rcromwell` package documentation. Go to the **Get Started** vignette to get started! +Go to for `rcromwell` package documentation. Go to the [Get Started vignette](https://getwilds.org/rcromwell/articles/rcromwell.html) to get started, or [reference page](https://getwilds.org/rcromwell/reference/index.html) for the function documentation. ## Bugs? Features? diff --git a/README.md b/README.md index d7e9672..4223282 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ pak::pak("getwilds/rcromwell") ## Documentation -Go to for `rcromwell` package documentation. Go to the **Get Started** vignette to get started! +Go to for `rcromwell` package documentation. Go to the [Get Started vignette](https://getwilds.org/rcromwell/articles/rcromwell.html) to get started, or [reference page](https://getwilds.org/rcromwell/reference/index.html) for the function documentation. ## Bugs? Features? From de95ee83314d7fcdc8570261b3743f7fa0a4eacf Mon Sep 17 00:00:00 2001 From: Scott Chamberlain Date: Thu, 8 Aug 2024 09:38:07 -0700 Subject: [PATCH 7/7] bump version to 3.2.5 and update news --- DESCRIPTION | 2 +- NEWS.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d28c43c..53a4e01 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rcromwell Title: Convenience Tools for Managing WDL Workflows via Cromwell -Version: 3.2.4.9200 +Version: 3.2.5 Authors@R: c( person("Amy", "Paguirigan", role = "aut", comment = c(ORCID = "0000-0002-6819-9736")), diff --git a/NEWS.md b/NEWS.md index 5e117a7..1f2a213 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,10 @@ -# rcromwell 3.2.4 +# rcromwell 3.2.5 * gains new function `cromwell_labels` that hits the `/labels` route (#43) (#45) +* remove comment about failures not working (#35) +* add prior art section to readme with one entry (#30) +* reorder output columns of `cromwell_workflow` and always return tibble for `cromwell_call` (#42) (#46) +* better links in readme to docs (#41) # rcromwell 3.2.1