Author: Michael R. Crusoe <crusoe@debian.org>
Description: Use the packaged version of cwltool in the tests
Forwarded: not-needed

Don't install from anaconda.

--- r-bioc-rcwl.orig/tests/testthat/test_all.R
+++ r-bioc-rcwl/tests/testthat/test_all.R
@@ -3,7 +3,6 @@
 input1 <- InputParam(id = "sth")
 echo <- cwlProcess(baseCommand = "echo", inputs = InputParamList(input1))
 echo$sth <- "Hello World!"
-install_cwltool()
 r1 <- runCWL(echo)
 test_that("simple echo", {
     expect_match(tail(r1$logs, 1), "success")})
--- r-bioc-rcwl.orig/DESCRIPTION
+++ r-bioc-rcwl/DESCRIPTION
@@ -6,7 +6,7 @@
 Description: The Common Workflow Language (CWL) is an open standard for development of data analysis workflows that is portable and scalable across different tools and working environments. Rcwl provides a simple way to wrap command line tools and build CWL data analysis pipelines programmatically within R. It increases the ease of usage, development, and maintenance of CWL pipelines.
 Depends: R (>= 3.6), yaml, methods, S4Vectors
 Imports: utils, stats, BiocParallel, batchtools, DiagrammeR, shiny,
-        R.utils, codetools, basilisk
+        R.utils, codetools
 License: GPL-2 | file LICENSE
 Encoding: UTF-8
 Suggests: testthat, knitr, rmarkdown, BiocStyle
--- r-bioc-rcwl.orig/configure
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-${R_HOME}/bin/Rscript -e "basilisk::configureBasiliskEnv()"
--- r-bioc-rcwl.orig/R/basilisk.R
+++ /dev/null
@@ -1,8 +0,0 @@
-#' Rcwl conda environment
-#'
-#' Rcwl conda envrionment to install `cwltool` by basilisk.
-#' @importFrom basilisk BasiliskEnvironment
-#' @export
-env_Rcwl <- basilisk::BasiliskEnvironment("env_Rcwl", pkgname="Rcwl",
-                                          packages = "python==3.11",
-                                          pip = "cwltool==3.1.20230719185429")
--- r-bioc-rcwl.orig/R/runCWL.R
+++ r-bioc-rcwl/R/runCWL.R
@@ -28,7 +28,6 @@
 #' @param yml_outdir The output directory for the `.cwl` and `.yml`
 #'     files.
 #' @param ... The other options from `writeCWL` and `system2`.
-#' @importFrom basilisk basiliskStart basiliskStop
 #' @export
 #' @return A list of outputs from tools and logs from cwltool.
 #' @examples
@@ -76,10 +75,6 @@
     ##         "Please install cwltool first!\n",
     ##          "https://github.com/common-workflow-language/cwltool#install")
     ## }
-    if(!file.exists(Sys.which(cwlRunner))){
-        cl <- basiliskStart(env_Rcwl)
-        basiliskStop(cl)
-    }
     if(!is.null(cwlTemp)){
         cwlArgs <- paste("--tmpdir-prefix", cwlTemp, cwlArgs)
     }
@@ -91,8 +86,6 @@
     }
 
     if(conda){
-        cl <- basiliskStart(env_Rcwl)
-        basiliskStop(cl)
         if("SoftwareRequirement" %in% unlist(hints(cwl))){
             req_s <- lapply(hints(cwl),
                             function(x)x[x$class=="SoftwareRequirement"])[[1]]
--- r-bioc-rcwl.orig/NAMESPACE
+++ r-bioc-rcwl/NAMESPACE
@@ -30,12 +30,9 @@
 export(cwlStepList)
 export(cwlVersion)
 export(cwlWorkflow)
-export(env_Rcwl)
 export(extensions)
 export(hints)
 export(inputs)
-export(install_cwltool)
-export(install_udocker)
 export(meta)
 export(outputs)
 export(plotCWL)
@@ -96,9 +93,6 @@
 importFrom(R.utils,createLink)
 importFrom(S4Vectors,SimpleList)
 importFrom(S4Vectors,wmsg)
-importFrom(basilisk,BasiliskEnvironment)
-importFrom(basilisk,basiliskStart)
-importFrom(basilisk,basiliskStop)
 importFrom(codetools,findGlobals)
 importFrom(stats,na.omit)
 importFrom(utils,.DollarNames)
--- r-bioc-rcwl.orig/vignettes/Rcwl.Rmd
+++ r-bioc-rcwl/vignettes/Rcwl.Rmd
@@ -113,12 +113,6 @@
 Now this _R_ version of command line tool `echo` is ready to be
 executed. 
 
-We can install `cwltool` first to make sure a `cwl-runner` is
-available.
-```{r}
-invisible(install_cwltool())
-```
-
 The function `runCWL` runs the tools in _R_ and returns a list of: 1)
 actual command line that was executed, 2) filepath to the output, and
 3) running logs. The output directory by default takes the working
--- r-bioc-rcwl.orig/man/env_Rcwl.Rd
+++ /dev/null
@@ -1,16 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/basilisk.R
-\docType{data}
-\name{env_Rcwl}
-\alias{env_Rcwl}
-\title{Rcwl conda environment}
-\format{
-An object of class \code{BasiliskEnvironment} of length 1.
-}
-\usage{
-env_Rcwl
-}
-\description{
-Rcwl conda envrionment to install `cwltool` by basilisk.
-}
-\keyword{datasets}
--- r-bioc-rcwl.orig/R/install_cwltool.R
+++ /dev/null
@@ -1,9 +0,0 @@
-#' install cwltool
-#' 
-#' To download and install cwltool using basilisk
-#' @export
-install_cwltool <- function(){
-    cl <- basiliskStart(env_Rcwl)
-    basiliskStop(cl)
-    return(Sys.which("cwltool"))
-}
--- r-bioc-rcwl.orig/R/install_udocker.R
+++ /dev/null
@@ -1,25 +0,0 @@
-#' install udocker
-#'
-#' To download and install udocker for python3.
-#'
-#' @param version The version of udocker.
-#' @importFrom R.utils createLink
-#' @export
-install_udocker <- function(version = "1.3.4"){
-    stopifnot(.Platform$OS.type != "windows")
-
-    if(!file.exists(Sys.which("cwltool"))){
-        cl <- basiliskStart(env_Rcwl)
-        on.exit(basiliskStop(cl))
-    }
-    binPath <- Sys.which("cwltool")
-    
-    download.file(paste0("https://github.com/indigo-dc/udocker/releases/download/", version, "/udocker-", version, ".tar.gz"),
-                  file.path(dirname(binPath), "udocker.tar.gz"))
-    untar(file.path(dirname(binPath), "udocker.tar.gz"), exdir = dirname(dirname(binPath)))
-    system(paste0(dirname(dirname(binPath)), "/udocker/udocker install"))
-    createLink(file.path(dirname(binPath), "udocker"),
-               file.path(dirname(dirname(binPath)), "udocker", "udocker"), overwrite = TRUE)
-    udocker_path <- Sys.which("udocker")
-    message("udocker installed:", "\n", udocker_path)
-}
