-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prepare for rgd,add python dependencies
- Loading branch information
Showing
12 changed files
with
138 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ Imports: | |
pander, | ||
parallel, | ||
purrr, | ||
reticulate, | ||
stats, | ||
tibble, | ||
tidyr, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#' @title set up `gdverse` python dependence | ||
#' @author Wenbo Lv \email{[email protected]} | ||
#' @description | ||
#' Create an isolated Python virtual environment with all `gdverse` dependencies. | ||
#' | ||
#' | ||
#' @param py_env The name, or full path, of the environment in which Python packages are to be installed. | ||
#' @param py_version (optional) The requested Python version.Default is 3.9. | ||
#' @param method (optional) Installation method. By default, "auto" automatically finds a method that will | ||
#' work in the local environment. | ||
#' @param ... Other parameers passed to `reticulate::py_install()` | ||
#' | ||
#' @importFrom reticulate py_install | ||
#' @export | ||
#' | ||
install_rpt = \(py_env = "r-gdverse", | ||
py_version = 3.9, | ||
method = "auto", ...) { | ||
reticulate::py_install(packages = c("numpy","pandas","ruptures"), | ||
envname = py_env, | ||
method = method, | ||
python_version = py_version,...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rpt = NULL | ||
|
||
.onLoad = function(libname, pkgname) { | ||
rpt <<- reticulate::import("ruptures", delay_load = TRUE) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.