Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…tion into develop
  • Loading branch information
jreps committed Oct 11, 2023
2 parents e6a6c93 + 0fe1b78 commit 392aef7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/R_CMD_check_Hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ jobs:
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: "r-reticulate"

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand Down
5 changes: 3 additions & 2 deletions R/HelperFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ listAppend <- function(a, b){
#'
#' @param envname A string for the name of the virtual environment (default is 'PLP')
#' @param envtype An option for specifying the environment as'conda' or 'python'. If NULL then the default is 'conda' for windows users and 'python' for non-windows users
#' @param condaPythonVersion String, Python version to use when creating a conda environment
#'
#' @export
configurePython <- function(envname='PLP', envtype=NULL){
configurePython <- function(envname='PLP', envtype=NULL, condaPythonVersion="3.11"){

if(is.null(envtype)){
if(getOs()=='windows'){
Expand All @@ -113,7 +114,7 @@ configurePython <- function(envname='PLP', envtype=NULL){
warning(paste0('Conda environment ', envname,' exists. You can use reticulate::conda_remove() to remove if you want to fresh config'))
} else {
ParallelLogger::logInfo(paste0('Creating virtual conda environment called ', envname))
location <- reticulate::conda_create(envname=envname, packages = "python", conda = "auto")
location <- reticulate::conda_create(envname=envname, packages = paste0("python==", condaPythonVersion), conda = "auto")

Check warning on line 117 in R/HelperFunctions.R

View check run for this annotation

Codecov / codecov/patch

R/HelperFunctions.R#L117

Added line #L117 was not covered by tests
}
packages <- c('numpy','scipy','scikit-learn', 'pandas','pydotplus','joblib')
ParallelLogger::logInfo(paste0('Adding python dependancies to ', envname))
Expand Down
4 changes: 3 additions & 1 deletion man/configurePython.Rd

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

0 comments on commit 392aef7

Please sign in to comment.