Skip to content
32 changes: 32 additions & 0 deletions .github/workflows/bioc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -163,10 +181,24 @@ jobs:
with:
extra-packages: |
any::covr
any::reticulate

- name: Test coverage
run: |
covr::codecov(quiet = FALSE)
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 {} \;
15 changes: 15 additions & 0 deletions R/PANDA.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading