Skip to content

Commit

Permalink
Update versions of Python dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
bodkan committed Oct 15, 2023
1 parent cc070e8 commit 001ee58
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
mkdir ~/R_LIBS
echo "R_LIBS_USER=~/R_LIBS" >> ~/.Renviron
R -e 'install.packages("reticulate", repos = "http://cran.rstudio.com"); reticulate::install_miniconda()'
R -e 'deps <- c("msprime==1.2.0", "tskit==0.5.5", "pyslim==1.0.3", "jsonschema==4.18.6"); PYTHON_ENV <- paste0("Python-3.11_", paste(gsub("==", "-", deps), collapse = "_")); reticulate::conda_create(envname = PYTHON_ENV, python_version = '3.11'); reticulate::use_condaenv(PYTHON_ENV, required = TRUE); reticulate::conda_install(envname = PYTHON_ENV, packages = c(deps, "pandas"), pip = TRUE)'
R -e 'deps <- c("msprime==1.2.0", "tskit==0.5.6", "pyslim==1.0.4"); PYTHON_ENV <- paste0("Python-3.11_", paste(gsub("==", "-", deps), collapse = "_")); reticulate::conda_create(envname = PYTHON_ENV, python_version = '3.11'); reticulate::use_condaenv(PYTHON_ENV, required = TRUE); reticulate::conda_install(envname = PYTHON_ENV, packages = c(deps, "pandas"), pip = TRUE)'
- uses: r-lib/actions/setup-pandoc@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
mkdir ~/R_LIBS
echo "R_LIBS_USER=~/R_LIBS" >> ~/.Renviron
R -e 'install.packages("reticulate", repos = "http://cran.rstudio.com"); reticulate::install_miniconda()'
R -e 'deps <- c("msprime==1.2.0", "tskit==0.5.5", "pyslim==1.0.3", "jsonschema==4.18.6"); PYTHON_ENV <- paste0("Python-3.11_", paste(gsub("==", "-", deps), collapse = "_")); reticulate::conda_create(envname = PYTHON_ENV, python_version = '3.11'); reticulate::use_condaenv(PYTHON_ENV, required = TRUE); reticulate::conda_install(envname = PYTHON_ENV, packages = c(deps, "pandas"), pip = TRUE)'
R -e 'deps <- c("msprime==1.2.0", "tskit==0.5.6", "pyslim==1.0.4"); PYTHON_ENV <- paste0("Python-3.11_", paste(gsub("==", "-", deps), collapse = "_")); reticulate::conda_create(envname = PYTHON_ENV, python_version = '3.11'); reticulate::use_condaenv(PYTHON_ENV, required = TRUE); reticulate::conda_install(envname = PYTHON_ENV, packages = c(deps, "pandas"), pip = TRUE)'
- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion R/interface.R
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ setup_env <- function(quiet = FALSE, agree = FALSE, pip = NULL) {
# dependencies are defined all in one place)
versions <- PYTHON_ENV %>% gsub("-", "==", .) %>% strsplit("_") %>% .[[1]]
python_version <- gsub("Python==", "", versions[1])
package_versions <- c(versions[-1], "pandas", "jsonschema==4.18.6")
package_versions <- c(versions[-1], "pandas")

reticulate::conda_create(envname = PYTHON_ENV, python_version = python_version)
reticulate::use_condaenv(PYTHON_ENV, required = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msp <- NULL
# define slendr's required Python dependencies and compose an environment name
# that will be used specifically for them
PYTHON_ENV <-
c("msprime==1.2.0", "tskit==0.5.5", "pyslim==1.0.3") %>%
c("msprime==1.2.0", "tskit==0.5.6", "pyslim==1.0.4") %>%
gsub("==", "-", .) %>%
paste(collapse = "_") %>%
paste0("Python-3.11_", .)
Expand Down

0 comments on commit 001ee58

Please sign in to comment.