Skip to content

Commit

Permalink
update roxygen and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Aug 30, 2023
1 parent 8bf659a commit 219e68b
Show file tree
Hide file tree
Showing 59 changed files with 525 additions and 233 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Description: dynmethods provides helper functions for containerised trajectory i
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
RoxygenNote: 7.2.3
Depends:
R (>= 3.4.0)
Imports:
Expand All @@ -23,9 +23,10 @@ Imports:
Suggests:
babelwhale,
dplyr,
dynutils,
dynutils,
knitr,
testthat,
testthat (>= 3.0.0),
tibble
VignetteBuilder: knitr
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export(ti_waterfall)
export(ti_wishbone)
import(dynwrap)
importFrom(dynwrap,create_ti_method_container)
importFrom(purrr,"%>%")
importFrom(purrr,map)
importFrom(purrr,map2_dbl)
importFrom(purrr,map_chr)
importFrom(purrr,walk)
importFrom(remotes,parse_github_repo_spec)
importFrom(utils,compareVersion)
importFrom(utils,getFromNamespace)
11 changes: 11 additions & 0 deletions R/dynmethods-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#' Wrappers for trajectory inference
#'
#' Wrappers for trajectory inference
#'
#' @docType package
#' @name dynmethods
#'
#' @import dynwrap
#' @importFrom purrr %>%
#' @importFrom utils compareVersion getFromNamespace
"_PACKAGE"
2 changes: 1 addition & 1 deletion R/method_install_github_tagged_version.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' @param versions The desired versions of the package, `NA` if unknown.
#' @param is_interactive Whether running in an interactive session
#'
#' @importFrom purrr map_chr map2_dbl map_chr map
#' @importFrom purrr map_chr map2_dbl map_chr map walk
#' @importFrom remotes parse_github_repo_spec
install_github_tagged_version <- function(remotes, versions = rep(NA, length(remotes)), is_interactive = interactive()) {
parsed <- purrr::map(remotes, parse_github_repo_spec) %>% purrr::set_names(remotes)
Expand Down
7 changes: 0 additions & 7 deletions R/package.R

This file was deleted.

7 changes: 3 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ methods <- methods %>% filter(!method_source %in% c("control")) # controls are n
```

<!-- badges: start -->
[![R-CMD-check](https://github.com/dynverse/dynmethods/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dynverse/dynmethods/actions/workflows/R-CMD-check.yaml)
[**ℹ️ Tutorials**](https://dynverse.org) &nbsp; &nbsp;
[**ℹ️ Reference documentation**](https://dynverse.org/reference/dynmethods)

[![R-CMD-check](https://github.com/dynverse/dynmethods/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dynverse/dynmethods/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/dynverse/dynmethods/branch/master/graph/badge.svg)](https://app.codecov.io/gh/dynverse/dynmethods?branch=master)
[**ℹ️ Tutorials**](https://dynverse.org) &nbsp; &nbsp;
[**ℹ️ Reference documentation**](https://dynverse.org/reference/dynmethods)
<!-- badges: end -->

<br><img src="man/figures/logo.png" align="right" />
Expand Down
51 changes: 25 additions & 26 deletions data-raw/add_new_container.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,28 @@ traj <- dynwrap::infer_trajectory(data, docker_repo, parameters = params, verbos
dynplot::plot_graph(traj)


#' @examples
#' # you can test whether this method can be evaluated
#' eval <- dyneval::evaluate_ti_method(data, dynwrap::create_ti_methods_container(paste0("dynverse/ti_", method))(), parameters = params, metrics = c("correlation", "edge_flip", "rf_mse", "featureimp_cor"), verbose = TRUE)
#' eval$summary
#' dynplot::plot_graph(eval$models[[1]])
#' eval$summary$error
#'
#' # if it works, you can push the container to docker hub
#' processx::run("docker", args = c("push", docker_repo), echo = TRUE)
#'
#' # rebuild the singularity image
#' dynbenchmark::setup_singularity_methods()
#' dynwrap::pull_singularity_ti_method(docker_repo)
#'
#' # test the singularity image
#' traj <- dynwrap::infer_trajectory(data, method, parameters = params, verbose = TRUE)
#' dynplot::plot_graph(traj)
#'
#' # transfer it to prism
#' qsub::rsync_remote(
#' remote_src = FALSE,
#' path_src = dynbenchmark::derived_file(c("dynverse/", method, ".simg"), "03-method_characterisation/singularity_images", remote = FALSE),
#' remote_dest = TRUE,
#' path_dest = dynbenchmark::derived_file(c("dynverse/", method, ".simg"), "03-method_characterisation/singularity_images", remote = TRUE),
#' verbose = TRUE
#' )
# # you can test whether this method can be evaluated
# eval <- dyneval::evaluate_ti_method(data, dynwrap::create_ti_methods_container(paste0("dynverse/ti_", method))(), parameters = params, metrics = c("correlation", "edge_flip", "rf_mse", "featureimp_cor"), verbose = TRUE)
# eval$summary
# dynplot::plot_graph(eval$models[[1]])
# eval$summary$error
#
# # if it works, you can push the container to docker hub
# processx::run("docker", args = c("push", docker_repo), echo = TRUE)
#
# # rebuild the singularity image
# dynbenchmark::setup_singularity_methods()
# dynwrap::pull_singularity_ti_method(docker_repo)
#
# # test the singularity image
# traj <- dynwrap::infer_trajectory(data, method, parameters = params, verbose = TRUE)
# dynplot::plot_graph(traj)
#
# # transfer it to prism
# qsub::rsync_remote(
# remote_src = FALSE,
# path_src = dynbenchmark::derived_file(c("dynverse/", method, ".simg"), "03-method_characterisation/singularity_images", remote = FALSE),
# remote_dest = TRUE,
# path_dest = dynbenchmark::derived_file(c("dynverse/", method, ".simg"), "03-method_characterisation/singularity_images", remote = TRUE),
# verbose = TRUE
# )
16 changes: 13 additions & 3 deletions man/dynmethods.Rd

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

7 changes: 5 additions & 2 deletions man/install_github_tagged_version.Rd

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

4 changes: 3 additions & 1 deletion man/methods.Rd

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

21 changes: 16 additions & 5 deletions man/ti_cellrouter.Rd

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

17 changes: 13 additions & 4 deletions man/ti_celltrails.Rd

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

14 changes: 10 additions & 4 deletions man/ti_celltree_gibbs.Rd

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

15 changes: 11 additions & 4 deletions man/ti_celltree_maptpx.Rd

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

14 changes: 10 additions & 4 deletions man/ti_celltree_vem.Rd

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

10 changes: 8 additions & 2 deletions man/ti_dpt.Rd

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

13 changes: 10 additions & 3 deletions man/ti_elpicycle.Rd

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

14 changes: 11 additions & 3 deletions man/ti_elpigraph.Rd

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

13 changes: 10 additions & 3 deletions man/ti_elpilinear.Rd

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

Loading

0 comments on commit 219e68b

Please sign in to comment.