From 2aba7580f8410d623dfb6f012ce6fed95bdf417f Mon Sep 17 00:00:00 2001 From: Egill Axfjord Fridgeirsson Date: Sat, 9 Sep 2023 10:23:19 +0200 Subject: [PATCH] Update R_CMD_check_main_weekly.yaml add python dependancies to weekly hades action --- .../workflows/R_CMD_check_main_weekly.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/R_CMD_check_main_weekly.yaml b/.github/workflows/R_CMD_check_main_weekly.yaml index 73bfe18..e9fdf9e 100644 --- a/.github/workflows/R_CMD_check_main_weekly.yaml +++ b/.github/workflows/R_CMD_check_main_weekly.yaml @@ -55,6 +55,10 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} + + - uses: actions/setup-python@v4 + with: + python-version: '3.10' - uses: r-lib/actions/setup-tinytex@v2 @@ -65,6 +69,21 @@ jobs: extra-packages: any::rcmdcheck needs: check + - name: setup r-reticulate venv + shell: Rscript {0} + run: | + python_packages <- + c("polars", "tqdm", "connectorx", "pyarrow", "scikit-learn") + + library(reticulate) + virtualenv_create("r-reticulate", Sys.which("python")) + virtualenv_install("r-reticulate", python_packages) + virtualenv_install("r-reticulate", "torch", pip_options = c("--index-url https://download.pytorch.org/whl/cpu")) + + path_to_python <- virtualenv_python("r-reticulate") + writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python), + Sys.getenv("GITHUB_ENV")) + - uses: r-lib/actions/check-r-package@v2 with: args: 'c("--no-manual", "--as-cran")'