Skip to content

Commit

Permalink
Merge pull request #47 from getwilds/dev
Browse files Browse the repository at this point in the history
Dev changes into main for new rcromwell release
  • Loading branch information
tefirman authored Aug 8, 2024
2 parents 87d1266 + de95ee8 commit c58df3d
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rcromwell
Title: Convenience Tools for Managing WDL Workflows via Cromwell
Version: 3.2.4
Version: 3.2.5
Authors@R: c(
person("Amy", "Paguirigan", role = "aut",
comment = c(ORCID = "0000-0002-6819-9736")),
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion R/cromwellCall.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions R/cromwellJobs.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,12 @@ 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)
}
2 changes: 1 addition & 1 deletion R/rcromwell-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pak::pak("getwilds/rcromwell")

## Documentation

Go to <http://getwilds.org/rcromwell/> for `rcromwell` package documentation. Go to the **Get Started** vignette to get started!
Go to <http://getwilds.org/rcromwell/> 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?

Expand All @@ -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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pak::pak("getwilds/rcromwell")

## Documentation

Go to <http://getwilds.org/rcromwell/> for `rcromwell` package documentation. Go to the **Get Started** vignette to get started!
Go to <http://getwilds.org/rcromwell/> 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?

Expand All @@ -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
1 change: 1 addition & 0 deletions tests/testthat/test-cromwell_call.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ test_that("cromwell_call", {
})

expect_s3_class(res, "data.frame")
expect_s3_class(res, "tbl")
expect_equal(res$callName, "hello")
})
4 changes: 0 additions & 4 deletions tests/testthat/test-cromwell_failures.R
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-cromwell_jobs.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})

0 comments on commit c58df3d

Please sign in to comment.