diff --git a/.github/workflows/bioc-check.yml b/.github/workflows/bioc-check.yml index 229edb22..d9001e9c 100644 --- a/.github/workflows/bioc-check.yml +++ b/.github/workflows/bioc-check.yml @@ -61,7 +61,25 @@ jobs: libglpk-dev # Install dependencies using r-lib/actions (uses pak, handles R-devel well) + - name: Install dependencies on R devel, ignoring GOstats + if: matrix.r-version == 'devel' + run: | + install.packages("pak", repos = "https://cloud.r-project.org") + Sys.setenv(PKG_USE_BIOCONDUCTOR = "true") + + pak::pkg_install( + c( + "deps::.", + "GOstats=?ignore", + "any::BiocCheck", + "any::rcmdcheck" + ), + dependencies = TRUE + ) + shell: Rscript {0} + - name: Install dependencies + if: matrix.r-version != 'devel' uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: | @@ -163,6 +181,7 @@ jobs: with: extra-packages: | any::covr + any::reticulate - name: Test coverage run: | @@ -170,3 +189,16 @@ jobs: shell: Rscript {0} env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: Show testthat failure logs + if: failure() + run: | + echo "=== Searching for Rout.fail files ===" + sudo find /tmp "$GITHUB_WORKSPACE" -name "*.Rout.fail" -print || true + + echo "=== Printing Rout.fail files ===" + sudo find /tmp "$GITHUB_WORKSPACE" -name "*.Rout.fail" -exec sh -c ' + + echo "----- $1 -----" + cat "$1" + ' sh {} \; diff --git a/R/PANDA.R b/R/PANDA.R index ec005a37..3ee4ef05 100644 --- a/R/PANDA.R +++ b/R/PANDA.R @@ -134,6 +134,21 @@ pandaPy <- function(expr_file, motif_file=NULL, ppi_file=NULL, computing="cpu", # source the pypanda from github raw website. pandapath <- system.file("extdata", "panda.py", package = "netZooR", mustWork = TRUE) + message("pandapath: ", pandapath) + message("exists: ", file.exists(pandapath)) + message("python: ", reticulate::py_config()$python) + tryCatch( + reticulate::source_python(pandapath, convert = TRUE), + error = function(e) { + cat("source_python failed:") + cat(conditionMessage(e)) + + cat("reticulate Python error:") + cat(reticulate::py_last_error()) + flush.console() + stop(e) + } + ) reticulate::source_python(pandapath,convert = TRUE) # invoke Python script to create a Panda object