Skip to content

Commit

Permalink
version 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood authored and cran-robot committed Feb 21, 2020
1 parent 972906b commit 36121bc
Show file tree
Hide file tree
Showing 16 changed files with 120 additions and 149 deletions.
12 changes: 6 additions & 6 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: dynutils
Type: Package
Title: Common Functionality for the 'dynverse' Packages
Version: 1.0.4
Version: 1.0.5
Authors@R: c(
person(
"Robrecht",
Expand All @@ -22,11 +22,11 @@ Description:
Provides common functionality for the 'dynverse' packages.
'dynverse' is created to support the development, execution, and benchmarking of trajectory inference methods.
For more information, check out <https://dynverse.org>.
License: GPL-3
URL: http://github.com/dynverse/dynutils
License: MIT + file LICENSE
URL: https://github.com/dynverse/dynutils
BugReports: https://github.com/dynverse/dynutils/issues
LazyData: TRUE
RoxygenNote: 6.1.1
RoxygenNote: 7.0.2
Depends: R (>= 3.0.0)
Imports: assertthat, crayon, desc, dplyr, magrittr, Matrix, methods,
proxyC, purrr, Rcpp, remotes, stringr, tibble
Expand All @@ -35,10 +35,10 @@ LinkingTo: Rcpp
Encoding: UTF-8
VignetteBuilder: knitr
NeedsCompilation: yes
Packaged: 2019-10-03 09:35:39 UTC; rcannood
Packaged: 2020-02-21 10:46:37 UTC; rcannood
Author: Robrecht Cannoodt [aut, cre] (<https://orcid.org/0000-0003-3641-729X>,
rcannood),
Wouter Saelens [aut] (<https://orcid.org/0000-0002-7114-6248>, zouter)
Maintainer: Robrecht Cannoodt <rcannood@gmail.com>
Repository: CRAN
Date/Publication: 2019-10-03 11:40:05 UTC
Date/Publication: 2020-02-21 12:30:02 UTC
2 changes: 2 additions & 0 deletions LICENSE
@@ -0,0 +1,2 @@
YEAR: 2014-2020
COPYRIGHT HOLDER: Robrecht Cannoodt, Wouter Saelens
28 changes: 14 additions & 14 deletions MD5
@@ -1,18 +1,19 @@
7cb192d75db723701f71178d68b024c8 *DESCRIPTION
1dedbdd446a71fb6e0cd7acf0c4f8865 *DESCRIPTION
ef3d9f056adaa322680184035912700f *LICENSE
b6dec4db1cd993e42ffd95d92cba8d64 *NAMESPACE
297d7883e7e41507719df466d52d1237 *NEWS.md
3cd2614695426b6226bf22cc46ee6cc2 *NEWS.md
dcdf2491b0e62a545623862a87d55529 *R/RcppExports.R
6f7fc8ddd74f0326bf2b59a523681cf7 *R/add_class.R
93ee58dfa8e9d0165a0aadbc62cfb01a *R/assertions.R
0567136a0ea7179450e01daec3b56c88 *R/calculate_distance.R
d6aa6f13af04adf14f579e08fc13d984 *R/calculate_mean.R
d12293c4bf7b1a545afd8a8772ef9160 *R/check_packages.R
e2b7b0caa56d6a39e5f74f05f1ba7546 *R/check_packages.R
1a1b2bac9aa0637569d9de821ce01da4 *R/development.R
ebced609202a59d493b476c3aac3fe8d *R/expand_matrix.R
aa0987fdaaa50b3bf720eef589eb9cbe *R/extend_with.R
a13cca47e183757563216d56990fc82c *R/h5.R
56ddd7a01d957f768e214bf3ff7d1286 *R/inherit_default_params.R
10578fb8a2f46f5ecb3b982175fa2b2f *R/install_packages.R
54d7dba8e284ec639517ca1e31b66a83 *R/install_packages.R
ad9da1318face1a62868506526ccb6b2 *R/mapdf.R
1b5098c5f0d238d3fc738e27f0cae80e *R/news.R
6af355edbc57f40b9a0c7d146f1d04fb *R/package.R
Expand All @@ -22,37 +23,37 @@ ad9da1318face1a62868506526ccb6b2 *R/mapdf.R
3a163b578e254a622a259fb15598b87a *R/sparse_matrix.R
ed5a6e94e1159f1aafdcfc1c82c27d49 *R/spearman_rank_sparse.R
508280137e6c0eb4d37a5872de6ab486 *R/tibble.R
48d895501ba6e7aee8abb5ab2798b933 *README.md
17cf65be3e139c69126d46bd2eb705a4 *build/vignette.rds
9b2832b80e7882c4d2ac183a85a9c734 *inst/doc/functionality.R
397be7eff15f739c62736951d139e41b *README.md
b2421696f8a91492d12c349d4277a765 *build/vignette.rds
a60b55d68196751eae1016f1871240de *inst/doc/functionality.R
fd437c3c797311ac07d31ffd0e74d86c *inst/doc/functionality.Rmd
4c5894500d88dbf2fcae4edd14fb0cde *inst/doc/functionality.html
7229fbbf14fc22687c8319a98cbb003b *inst/doc/functionality.html
c3db2b03d9fad3aa6837b3f565dfdebd *man/add_class.Rd
6bc340f4659bf12f836063f6dbdd2329 *man/all_in.Rd
b5ac523861808607b014847cb3797765 *man/apply_minmax_scale.Rd
64174b3e65b65ce84ce3293ae492f994 *man/apply_quantile_scale.Rd
3bef0a231eef2816e0a263a1e4a2242c *man/apply_uniform_scale.Rd
2a41ba64ac7e6974373c798d81c51322 *man/calculate_distance.Rd
9e9d83fa65d3435bb9e808709fc6ccd6 *man/calculate_distance.Rd
5b35a6f332946299b91d087180993a29 *man/calculate_mean.Rd
3252699f0111548d1c5865b259fc6045 *man/check_packages.Rd
8119f54576526e375c65967172a35730 *man/deprecated.Rd
7af19552f7245eb474ebb2d702a532a4 *man/dynutils.Rd
e2ceb10024be583a126677b4de494f0a *man/dynutils.Rd
7709555d2461d3fdc0754ff9ed78c279 *man/expand_matrix.Rd
3018e1eb12824f76075b195fe12a4916 *man/extend_with.Rd
7613b5995b078d708cc26c1a5d2d9b88 *man/extract_row_to_list.Rd
b13a5533db06c4565c8025ec07416d90 *man/figures/dependencies.png
21c38d6edb23eb7766127edfb805d2cc *man/has_names.Rd
e7578523a6fa518bfb8ed4c7def2a0ea *man/inherit_default_params.Rd
7882b49fc121c84cc4ce635266e3392f *man/install_packages.Rd
ffb5cc4ea8eb2cc74b8881ee03793acc *man/is_bounded.Rd
a351ae26cd8158546f000ba27b14404a *man/install_packages.Rd
b5e279e1ffba1a1a8a1ac1c0d43b58c6 *man/is_bounded.Rd
b9518d93e55a498b29be70221d67e209 *man/is_single_numeric.Rd
9c390e87ca76ed1d225baea185e4b038 *man/is_sparse.Rd
c75c1e1f49dbefd8590f7424587ad69b *man/list_as_tibble.Rd
accf4b9c8028a260b70a2e76e0c5cc04 *man/mapdf.Rd
2b3a023bd618893c84f8145c2396ae97 *man/project_to_segments.Rd
2cf7693dbaf3302c64209d7336c447d5 *man/random_time_string.Rd
924b15280c2637b60a75a439b96da664 *man/read_h5.Rd
b0cb95b27f4369b40ec09cdb98029c5d *man/recent_news.Rd
ade76e3a41972c1df16527a5d29becb1 *man/recent_news.Rd
4709d575d5fa06a874efac612a29ee78 *man/safe_tempdir.Rd
3ebf0627b766e627129d9ea56bc4e725 *man/scale_minmax.Rd
796b56abcd3919f503ddecb80735ea9a *man/scale_quantile.Rd
Expand All @@ -73,7 +74,6 @@ dbb99d66a04da64c942eeb3d2aad76a4 *tests/testthat/test-check_packages.R
8faa7d5a28c69f65e45e8ff451fc705b *tests/testthat/test-extend_with.R
6b476ee9c8230218a976b0abc9457fbf *tests/testthat/test-h5.R
5ce31da95e0ab2cae64f31550e6957c1 *tests/testthat/test-inherit_default_params.R
f665360485a47a68db1c5e78f4419139 *tests/testthat/test-install_packages.R
eb500b1fea1726787b4e1cc25de6caa0 *tests/testthat/test-mapdf.R
87086196556352c60f0e8a21d5e13e02 *tests/testthat/test-news.R
12b22a50c13f031e04cafada2045e5eb *tests/testthat/test-project_to_segments.R
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
@@ -1,4 +1,10 @@
# dynutils 1.0.4
# dynutils 1.0.5

* BUG FIX `install_packages()`: will not try to install packages when the session is not interactive.

* LICENSE: Change to MIT.

# dynutils 1.0.4 (2019-10-03)

* BUG FIX `recent_news()`: do not prepend subsections.

Expand Down
4 changes: 2 additions & 2 deletions R/check_packages.R
Expand Up @@ -11,6 +11,6 @@
#' check_packages(c("princurve", "mlr", "tidyverse"))
check_packages <- function(...) {
packages <- unlist(list(...))
installed_packages <- rownames(utils::installed.packages())
set_names(packages %in% installed_packages, packages)
installed_packages <- map_lgl(packages, requireNamespace, quietly = TRUE)
set_names(installed_packages, packages)
}
21 changes: 14 additions & 7 deletions R/install_packages.R
Expand Up @@ -4,10 +4,12 @@ parse_remotes <- function(remotes) {
set_names(remotes)
}

#' Install packages, but first ask if interactive
#' Check package availability
#'
#' @param ... The names of the packages to be installed
#' @param is_interactive Whether running interactivly, which will prompt the user before installation
#' If the session is interactive, prompt the user whether to install the packages.
#'
#' @param ... The names of the packages to be checked
#' @param try_install Whether running interactivly, which will prompt the user before installation
#'
#' @importFrom remotes install_cran
#' @importFrom utils setRepositories
Expand All @@ -18,11 +20,11 @@ parse_remotes <- function(remotes) {
#' \dontrun{
#' install_packages("SCORPIUS")
#' }
install_packages <- function(..., is_interactive = interactive()) {
install_packages <- function(..., try_install = interactive()) {
dependencies <- unlist(list(...)) %>% discard(check_packages)

if (length(dependencies) > 0) {
if (is_interactive) {
if (try_install) {
message(paste0(
"Following packages have to be installed: ",
paste(crayon::bold(dependencies), collapse = ", "),
Expand All @@ -40,6 +42,11 @@ install_packages <- function(..., is_interactive = interactive()) {
if (answer %in% c("no", "n", "2")) {
stop("Installation was interrupted.")
}
} else {
stop(
"Please install the following packages: \n",
" ", paste0("\"", dependencies, "\"", collapse = ",")
)
}

# set repositories to include bioconductor
Expand All @@ -48,14 +55,14 @@ install_packages <- function(..., is_interactive = interactive()) {
message("Installing ", paste0(dependencies, collapse = ", "))

# install other depencies from cran
remotes::install_cran(dependencies, repos = "http://cran.rstudio.com")
remotes::install_cran(dependencies)

# display message
message("Installed ", paste0(dependencies, collapse = ", "))

# return installed dependencies at the end
dependencies
} else {
NULL
invisible(NULL)
}
}
25 changes: 10 additions & 15 deletions README.md
Expand Up @@ -26,27 +26,22 @@ changes.

<!-- This section gets automatically generated from inst/NEWS.md, and also generates inst/NEWS -->

### Recent changes in dynutils 1.0.4
### Recent changes in dynutils 1.0.5

- BUG FIX `recent_news()`: do not prepend subsections.

- BUG FIX `switch_cran()`: add missing version variable.

- REMOVAL `update_news()` remove this function as R 3.6 natively
supports markdown news format.
- BUG FIX `install_packages()`: will not try to install packages when
the session is not interactive.

### Recent changes in dynutils 1.0.3 (2019-05-02)
- LICENSE: Change to MIT.

- FUNCTIONALITY: Added `test_h5_installation()`.
### Recent changes in dynutils 1.0.4 (2019-10-03)

- BUG FIX: Added compatibility workaround for being able to read hdf5
1.10.4 files on a hdf5 1.8.14 Windows platform (hhoeflin/hdf5r\#60).
- BUG FIX `recent_news()`: do not prepend subsections.

- FUNCTIONALITY: `calculate_distance()` and `calculate_similarity()`
now support sparse matrix calculation thanks to proxyC\!
- BUG FIX `switch_cran()`: add missing version variable.

- SMALL CHANGES: Remove dependencies: glue, Hmisc, devtools, testthat,
tidyr.
- REMOVAL `update_news()` remove this function as R 3.6 natively
supports markdown news
format.

## Dynverse dependencies

Expand Down
Binary file modified build/vignette.rds
Binary file not shown.

0 comments on commit 36121bc

Please sign in to comment.