From 88dd1c3622bfd32102c4e5641ee5316e152b8983 Mon Sep 17 00:00:00 2001 From: George Chen <72078254+jiajic@users.noreply.github.com> Date: Tue, 21 May 2024 20:36:04 -0400 Subject: [PATCH] try to fix py install --- .github/workflows/dev_check.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dev_check.yml b/.github/workflows/dev_check.yml index c38f4fb1..6e37f1e4 100644 --- a/.github/workflows/dev_check.yml +++ b/.github/workflows/dev_check.yml @@ -84,26 +84,15 @@ jobs: with: python-version: "3.10" - - name: setup giotto_env - shell: Rscript {0} + - name: Test python env install run: | - path_to_python <- reticulate::virtualenv_create( - envname = "giotto_env", - python = Sys.which("python"), # placed on PATH by the setup-python action - packages = c( - "pandas==1.5.1", - "networkx==2.8.8", - "python-igraph==0.10.2", - "leidenalg==0.9.0", - "python-louvain==0.16", - "scikit-learn==1.1.3", - "scipy==1.13.0", - "scanpy" - ) - ) - - writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python), - Sys.getenv("GITHUB_ENV")) + if (!GiottoClass::checkGiottoEnvironment()) { + GiottoClass::installGiottoEnvironment() + } + + reticulate::py_list_packages(envname = "giotto_env") + reticulate::conda_install(envname = 'giotto_env',packages = 'scanpy',pip = TRUE) + shell: Rscript {0} - name: Run R CMD check uses: r-lib/actions/check-r-package@v2