From bb0c823f5a29ad1460830b08e23e5c3b49bb6c93 Mon Sep 17 00:00:00 2001 From: luciorq Date: Mon, 2 Dec 2024 12:24:39 -0500 Subject: [PATCH] docs: lint examples docs --- R/create_env.R | 12 +++--- R/env_exists.R | 2 +- R/get_condathis_path.R | 3 +- R/install_packages.R | 11 ++++-- R/list_packages.R | 6 +-- R/remove_env.R | 5 ++- R/run_bin.R | 14 ++++--- README.md | 12 ++++-- man/create_base_env.Rd | 12 ------ man/create_env.Rd | 10 ++--- man/define_platform.Rd | 36 ------------------ man/env_exists.Rd | 2 +- man/format_channels_args.Rd | 15 -------- man/get_condathis_path.Rd | 19 ---------- man/install_packages.Rd | 10 +++-- man/is_micromamba_available_for_arch.Rd | 14 ------- man/list_packages.Rd | 6 +-- man/micromamba_user_installed.Rd | 12 ------ man/native_cmd.Rd | 49 ------------------------- man/packages_search_native.Rd | 46 ----------------------- man/parse_strategy_verbose.Rd | 15 -------- man/remove_env.Rd | 5 ++- man/run_bin.Rd | 14 ++++--- man/run_internal_native.Rd | 48 ------------------------ man/symlink_micromamba_bin.Rd | 25 ------------- tests/testthat/test-create_env.R | 1 - 26 files changed, 65 insertions(+), 339 deletions(-) delete mode 100644 man/create_base_env.Rd delete mode 100644 man/define_platform.Rd delete mode 100644 man/format_channels_args.Rd delete mode 100644 man/get_condathis_path.Rd delete mode 100644 man/is_micromamba_available_for_arch.Rd delete mode 100644 man/micromamba_user_installed.Rd delete mode 100644 man/native_cmd.Rd delete mode 100644 man/packages_search_native.Rd delete mode 100644 man/parse_strategy_verbose.Rd delete mode 100644 man/run_internal_native.Rd delete mode 100644 man/symlink_micromamba_bin.Rd diff --git a/R/create_env.R b/R/create_env.R index 188d0fa..f4d2bf5 100644 --- a/R/create_env.R +++ b/R/create_env.R @@ -36,18 +36,20 @@ #' #' @param overwrite Logical. Should environment always be overwritten? #' Defaults to `FALSE`. -#' @return An object of class `list` representing the result of the command execution. -#' Contains information about the standard output, standard error, and exit status of the command. -#' This function is used for its side effect of creating a Conda environment. +#' +#' @return An object of class `list` representing the result of the command +#' execution. Contains information about the standard output, standard error, +#' and exit status of the command. +#' #' @examples #' \dontrun{ #' # Create a Conda environment and install the CLI `fastqc` in it. #' condathis::create_env( #' packages = "fastqc==0.12.1", -#' env_name = "fastqc_env", +#' env_name = "fastqc-env", #' verbose = "output" #' ) -#' #> ! Environment fastqc_env succesfully created. +#' #> ! Environment fastqc-env succesfully created. #' } #' @export create_env <- function( diff --git a/R/env_exists.R b/R/env_exists.R index 8bda2b5..08f6965 100644 --- a/R/env_exists.R +++ b/R/env_exists.R @@ -5,7 +5,7 @@ #' and `FALSE` otherwise. #' #' @inheritParams create_env -#' @return Boolean. +#' @return Boolean. `TRUE` if the environment exists and `FALSE` otherwise. #' @examples #' \dontrun{ #' # Create the environment diff --git a/R/get_condathis_path.R b/R/get_condathis_path.R index e034c21..b26bebe 100644 --- a/R/get_condathis_path.R +++ b/R/get_condathis_path.R @@ -1,6 +1,7 @@ #' Retrieve System-Dependent Data Path for condathis #' -#' Determines the appropriate user data directory for the `condathis` package based on the operating system. On macOS, it avoids using paths with spaces due to issues with `micromamba run` failing when there are spaces in the path. +#' Determines the appropriate user data directory for the `condathis` package based on the operating system. +#' On macOS, it avoids using paths with spaces due to issues with `micromamba run` failing when there are spaces in the path. #' #' @details #' This function uses the `rappdirs` package to determine the user data directory. diff --git a/R/install_packages.R b/R/install_packages.R index a286d50..c47522e 100644 --- a/R/install_packages.R +++ b/R/install_packages.R @@ -6,17 +6,20 @@ #' #' @inheritParams create_env #' -#' @return No value is returned; this function is used for its side effect of installing packages in a conda environment. +#' @return An object of class `list` representing the result of the command +#' execution. Contains information about the standard output, standard error, +#' and exit status of the command. +#' #' @examples #' \dontrun{ #' condathis::create_env( #' packages = "fastqc", -#' env_name = "fastqc_env" +#' env_name = "fastqc-env" #' ) -#' # Install the package `vim` in the `fastqc_env` environment. +#' # Install the package `vim` in the `fastqc-env` environment. #' # It is not recommended to install multiple packages in the same environment, # # as it defeats the purpose of isolation provided by separate environments. -#' condathis::install_packages(packages = "vim", env_name = "fastqc_env") +#' condathis::install_packages(packages = "vim", env_name = "fastqc-env") #' } #' @export install_packages <- function(packages, diff --git a/R/list_packages.R b/R/list_packages.R index d283f8b..134fa6c 100644 --- a/R/list_packages.R +++ b/R/list_packages.R @@ -23,10 +23,10 @@ #' # Creates a Conda environment with the CLI `fastqc` #' condathis::create_env( #' packages = "fastqc", -#' env_name = "fastqc_env" +#' env_name = "fastqc-env" #' ) -#' # Lists the packages in env `fastqc_env` -#' dat <- condathis::list_packages("fastqc_env") +#' # Lists the packages in env `fastqc-env` +#' dat <- condathis::list_packages("fastqc-env") #' dim(dat) #' #> [1] 34 8 #' } diff --git a/R/remove_env.R b/R/remove_env.R index 63f5260..727869c 100644 --- a/R/remove_env.R +++ b/R/remove_env.R @@ -4,8 +4,9 @@ #' #' @inheritParams create_env #' -#' @return An object of class `list` representing the result of the command execution. -#' Contains information about the standard output, standard error, and exit status of the command. +#' @return An object of class `list` representing the result of the command +#' execution. Contains information about the standard output, standard error, +#' and exit status of the command. #' #' @examples #' \dontrun{ diff --git a/R/run_bin.R b/R/run_bin.R index 1b43476..cd18629 100644 --- a/R/run_bin.R +++ b/R/run_bin.R @@ -1,20 +1,22 @@ -#' Run a Binary from a Conda Environment Without Emvironment Activation +#' Run a Binary from a Conda Environment Without Environment Activation #' #' Executes a binary command from a specified Conda environment without activating the environment or using its environment variables. This function temporarily clears Conda and Mamba-related environment variables to prevent interference, ensuring that the command runs in a clean environment. #' Usually this is not what the user wants, check [run()] for the stable function to use. #' #' @inheritParams run #' -#' @return An invisible list containing the results from `processx::run()`, including standard output and error. +#' @return An object of class `list` representing the result of the command +#' execution. Contains information about the standard output, standard error, +#' and exit status of the command. #' #' @examples #' \dontrun{ -#' # Example assumes that 'my_env' exists and contains 'python' -#' # Run 'python' with a script in 'my_env' environment -#' condathis::run_bin("python", "script.py", env_name = "my_env", verbose = "silent") +#' # Example assumes that 'my-env' exists and contains 'python' +#' # Run 'python' with a script in 'my-env' environment +#' condathis::run_bin("python", "script.py", env_name = "my-env", verbose = "silent") #' #' # Run 'ls' command with additional arguments -#' condathis::run_bin("ls", "-la", env_name = "my_env") +#' condathis::run_bin("ls", "-la", env_name = "my-env") #' } #' #' @export diff --git a/README.md b/README.md index f63a689..75829f9 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,13 @@ Run system command line interface (CLI) tools in a **reproducible** and ## Get started -Install package from [CRAN](https://cran.r-project.org): - + Install package from [R-Universe](https://luciorq.r-universe.dev/condathis): @@ -30,6 +32,8 @@ install.packages("condathis", repos = c("https://luciorq.r-universe.dev", getOpt ``` r remotes::install_github("luciorq/condathis") +# or +pak::pkg_install("github::luciorq/condathis") ``` ## Motivation @@ -122,8 +126,8 @@ manages all the library dependencies of `fastqc`, making sure that they are compatible with the specific operating system. ``` r -condathis::create_env(packages = "fastqc==0.12.1", env_name = "fastqc_env", verbose = "output") -#> ! Environment fastqc_env succesfully created. +condathis::create_env(packages = "fastqc==0.12.1", env_name = "fastqc-env", verbose = "output") +#> ! Environment fastqc-env succesfully created. ``` Then we run the command inside the environment just created which diff --git a/man/create_base_env.Rd b/man/create_base_env.Rd deleted file mode 100644 index 4ac63ab..0000000 --- a/man/create_base_env.Rd +++ /dev/null @@ -1,12 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/create_base_env.R -\name{create_base_env} -\alias{create_base_env} -\title{Create Package Base Environment} -\usage{ -create_base_env() -} -\description{ -Create Package Base Environment -} -\keyword{internal} diff --git a/man/create_env.Rd b/man/create_env.Rd index a8aacb5..50944f1 100644 --- a/man/create_env.Rd +++ b/man/create_env.Rd @@ -60,9 +60,9 @@ Logical values \code{FALSE} and \code{TRUE} are also accepted for backward compa Defaults to \code{FALSE}.} } \value{ -An object of class \code{list} representing the result of the command execution. -Contains information about the standard output, standard error, and exit status of the command. -This function is used for its side effect of creating a Conda environment. +An object of class \code{list} representing the result of the command +execution. Contains information about the standard output, standard error, +and exit status of the command. } \description{ Create Conda Environment with specific packages installed to be used by \code{run()}. @@ -72,9 +72,9 @@ Create Conda Environment with specific packages installed to be used by \code{ru # Create a Conda environment and install the CLI `fastqc` in it. condathis::create_env( packages = "fastqc==0.12.1", - env_name = "fastqc_env", + env_name = "fastqc-env", verbose = "output" ) -#> ! Environment fastqc_env succesfully created. +#> ! Environment fastqc-env succesfully created. } } diff --git a/man/define_platform.Rd b/man/define_platform.Rd deleted file mode 100644 index 7b3e38d..0000000 --- a/man/define_platform.Rd +++ /dev/null @@ -1,36 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/define_platform.R -\name{define_platform} -\alias{define_platform} -\title{Define Platform to be used by \code{create_env()}.} -\usage{ -define_platform( - packages, - platform = NULL, - channels = c("bioconda", "conda-forge"), - additional_channels = NULL -) -} -\arguments{ -\item{packages}{Character vector. Names of the packages, and -version strings if necessary, e.g. 'python=3.11'. The use of the \code{packages} -argument assumes that env_file is not used.} - -\item{platform}{Character. Platform to search for \code{packages}. -Defaults to \code{NULL} which will use the current platform. -E.g. "linux-64", "linux-32", "osx-64", "win-64", "win-32", "noarch". -Note: on Apple Silicon MacOS will use "osx-64" instead of "osx-arm64" -if Rosetta 2 is available and any of the \code{packages} is not available -for "osx-arm64".} - -\item{channels}{Character vector. Names of the channels to be included. -By default 'c("bioconda", "conda-forge")' are used for solving -dependencies.} - -\item{additional_channels}{Character. Additional Channels to be added to the -default ones.} -} -\description{ -Define Platform to be used by \code{create_env()}. -} -\keyword{internal} diff --git a/man/env_exists.Rd b/man/env_exists.Rd index 5f4653c..8d54d65 100644 --- a/man/env_exists.Rd +++ b/man/env_exists.Rd @@ -11,7 +11,7 @@ env_exists(env_name) are going to be installed. Defaults to 'condathis-env'.} } \value{ -Boolean. +Boolean. \code{TRUE} if the environment exists and \code{FALSE} otherwise. } \description{ This function checks whether a specified Conda environment already exists diff --git a/man/format_channels_args.Rd b/man/format_channels_args.Rd deleted file mode 100644 index e5c9ced..0000000 --- a/man/format_channels_args.Rd +++ /dev/null @@ -1,15 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/format_channels_args.R -\name{format_channels_args} -\alias{format_channels_args} -\title{Format Channels Arguments} -\usage{ -format_channels_args(...) -} -\arguments{ -\item{...}{Character. Channels to be used by \code{micromamba}.} -} -\description{ -Format Channels Arguments -} -\keyword{internal} diff --git a/man/get_condathis_path.Rd b/man/get_condathis_path.Rd deleted file mode 100644 index 31d5e77..0000000 --- a/man/get_condathis_path.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/get_condathis_path.R -\name{get_condathis_path} -\alias{get_condathis_path} -\title{Retrieve System-Dependent Data Path for condathis} -\usage{ -get_condathis_path() -} -\value{ -A character string representing the path to the user data directory for \code{condathis}. -} -\description{ -Determines the appropriate user data directory for the \code{condathis} package based on the operating system. On macOS, it avoids using paths with spaces due to issues with \verb{micromamba run} failing when there are spaces in the path. -} -\details{ -This function uses the \code{rappdirs} package to determine the user data directory. -On macOS, it specifies \code{os = "unix"} to avoid paths like \verb{~/Library/Application Support/condathis}, which contain spaces. -} -\keyword{internal} diff --git a/man/install_packages.Rd b/man/install_packages.Rd index 8a61ba3..4ba5e21 100644 --- a/man/install_packages.Rd +++ b/man/install_packages.Rd @@ -36,7 +36,9 @@ Logical values \code{FALSE} and \code{TRUE} are also accepted for backward compa }} } \value{ -No value is returned; this function is used for its side effect of installing packages in a conda environment. +An object of class \code{list} representing the result of the command +execution. Contains information about the standard output, standard error, +and exit status of the command. } \description{ Install Packages in a Existing Conda Environment @@ -45,10 +47,10 @@ Install Packages in a Existing Conda Environment \dontrun{ condathis::create_env( packages = "fastqc", - env_name = "fastqc_env" + env_name = "fastqc-env" ) -# Install the package `vim` in the `fastqc_env` environment. +# Install the package `vim` in the `fastqc-env` environment. # It is not recommended to install multiple packages in the same environment, -condathis::install_packages(packages = "vim", env_name = "fastqc_env") +condathis::install_packages(packages = "vim", env_name = "fastqc-env") } } diff --git a/man/is_micromamba_available_for_arch.Rd b/man/is_micromamba_available_for_arch.Rd deleted file mode 100644 index c89163d..0000000 --- a/man/is_micromamba_available_for_arch.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/is_micromamba_available.R -\name{is_micromamba_available_for_arch} -\alias{is_micromamba_available_for_arch} -\title{Check if Micromamba is Available for OS and CPU architecture} -\usage{ -is_micromamba_available_for_arch(sys_arch = NULL) -} -\arguments{ -\item{sys_arch}{Default: NULL.} -} -\description{ -Check if Micromamba is Available for OS and CPU architecture -} diff --git a/man/list_packages.Rd b/man/list_packages.Rd index 724997f..4c0674a 100644 --- a/man/list_packages.Rd +++ b/man/list_packages.Rd @@ -43,10 +43,10 @@ each package, including its name, version, and source details. # Creates a Conda environment with the CLI `fastqc` condathis::create_env( packages = "fastqc", - env_name = "fastqc_env" + env_name = "fastqc-env" ) -# Lists the packages in env `fastqc_env` -dat <- condathis::list_packages("fastqc_env") +# Lists the packages in env `fastqc-env` +dat <- condathis::list_packages("fastqc-env") dim(dat) #> [1] 34 8 } diff --git a/man/micromamba_user_installed.Rd b/man/micromamba_user_installed.Rd deleted file mode 100644 index 8f69326..0000000 --- a/man/micromamba_user_installed.Rd +++ /dev/null @@ -1,12 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/micromamba_user_installed.R -\name{micromamba_user_installed} -\alias{micromamba_user_installed} -\title{Retrieve Micromamba Installed Path} -\usage{ -micromamba_user_installed() -} -\description{ -Checks if user already have \code{micromamba} binaries available on \code{PATH}. -} -\keyword{internal} diff --git a/man/native_cmd.Rd b/man/native_cmd.Rd deleted file mode 100644 index 80c9e19..0000000 --- a/man/native_cmd.Rd +++ /dev/null @@ -1,49 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/native_cmd.R -\name{native_cmd} -\alias{native_cmd} -\title{Run Micromamba Command} -\usage{ -native_cmd( - conda_cmd, - conda_args = NULL, - ..., - verbose = "full", - error = c("cancel", "continue"), - stdout = "|", - stderr = "|" -) -} -\arguments{ -\item{conda_cmd}{Character. Conda subcommand to be run. -E.g. "create", "install", "env", "--help", "--version".} - -\item{conda_args}{Character vector. Additional arguments passed to -the Conda command.} - -\item{...}{Additional arguments to be passed to the command. These arguments will be passed directly to the command executed in the Conda environment. -File paths should not contain special characters or spaces.} - -\item{verbose}{Character string specifying the verbosity level of the function's output. Acceptable values are: -\itemize{ -\item \strong{"silent"}: Suppress all output from internal command-line tools. Equivalent to \code{FALSE}. -\item \strong{"cmd"}: Print the internal command(s) passed to the command-line tool. -\item \strong{"output"}: Print the standard output and error from the command-line tool to the screen. Note that the order of the standard output and error lines may not be correct, as standard output is typically buffered. If the standard output and/or error is redirected to a file or they are ignored, they will not be echoed. -\item \strong{"full"}: Print both the internal command(s) (\code{"cmd"}) and their standard output and error (\code{"output"}). Equivalent to \code{TRUE}. -Logical values \code{FALSE} and \code{TRUE} are also accepted for backward compatibility but are \emph{soft-deprecated}. Please use \code{"silent"} and \code{"full"} respectively instead. -}} - -\item{error}{Character string. How to handle errors. Options are \code{"cancel"} or \code{"continue"}. Defaults to \code{"cancel"}.} - -\item{stdout}{Default: "|" keep stdout to the R object -returned by \code{run()}. -A character string can be used to define a file path to be used as standard output. e.g: "output.txt".} - -\item{stderr}{Default: "|" keep stderr to the R object -returned by \code{run()}. -A character string can be used to define a file path to be used as standard error. e.g: "error.txt".} -} -\description{ -Run a command using micromamba executable in the native backend. -} -\keyword{internal} diff --git a/man/packages_search_native.Rd b/man/packages_search_native.Rd deleted file mode 100644 index 2b7d3d1..0000000 --- a/man/packages_search_native.Rd +++ /dev/null @@ -1,46 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/packages_search_native.R -\name{packages_search_native} -\alias{packages_search_native} -\title{Search For Package in Channels} -\usage{ -packages_search_native( - packages, - channels = c("bioconda", "conda-forge"), - platform = NULL, - additional_channels = NULL, - verbose = "silent" -) -} -\arguments{ -\item{packages}{Character vector. Names of the packages, and -version strings if necessary, e.g. 'python=3.11'. The use of the \code{packages} -argument assumes that env_file is not used.} - -\item{channels}{Character vector. Names of the channels to be included. -By default 'c("bioconda", "conda-forge")' are used for solving -dependencies.} - -\item{platform}{Character. Platform to search for \code{packages}. -Defaults to \code{NULL} which will use the current platform. -E.g. "linux-64", "linux-32", "osx-64", "win-64", "win-32", "noarch". -Note: on Apple Silicon MacOS will use "osx-64" instead of "osx-arm64" -if Rosetta 2 is available and any of the \code{packages} is not available -for "osx-arm64".} - -\item{additional_channels}{Character. Additional Channels to be added to the -default ones.} - -\item{verbose}{Character string specifying the verbosity level of the function's output. Acceptable values are: -\itemize{ -\item \strong{"silent"}: Suppress all output from internal command-line tools. Equivalent to \code{FALSE}. -\item \strong{"cmd"}: Print the internal command(s) passed to the command-line tool. -\item \strong{"output"}: Print the standard output and error from the command-line tool to the screen. Note that the order of the standard output and error lines may not be correct, as standard output is typically buffered. If the standard output and/or error is redirected to a file or they are ignored, they will not be echoed. -\item \strong{"full"}: Print both the internal command(s) (\code{"cmd"}) and their standard output and error (\code{"output"}). Equivalent to \code{TRUE}. -Logical values \code{FALSE} and \code{TRUE} are also accepted for backward compatibility but are \emph{soft-deprecated}. Please use \code{"silent"} and \code{"full"} respectively instead. -}} -} -\description{ -Search if Package is available in required Channels -} -\keyword{internal} diff --git a/man/parse_strategy_verbose.Rd b/man/parse_strategy_verbose.Rd deleted file mode 100644 index 3caeb5c..0000000 --- a/man/parse_strategy_verbose.Rd +++ /dev/null @@ -1,15 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/parse_strategy_verbose.R -\name{parse_strategy_verbose} -\alias{parse_strategy_verbose} -\title{Parse Verbosity Level Strategy} -\usage{ -parse_strategy_verbose(strategy) -} -\arguments{ -\item{strategy}{Character string specifying the verbosity level.} -} -\description{ -Parse Verbosity Level Strategy -} -\keyword{internal} diff --git a/man/remove_env.Rd b/man/remove_env.Rd index fc2ca15..0f8cdc1 100644 --- a/man/remove_env.Rd +++ b/man/remove_env.Rd @@ -20,8 +20,9 @@ Logical values \code{FALSE} and \code{TRUE} are also accepted for backward compa }} } \value{ -An object of class \code{list} representing the result of the command execution. -Contains information about the standard output, standard error, and exit status of the command. +An object of class \code{list} representing the result of the command +execution. Contains information about the standard output, standard error, +and exit status of the command. } \description{ Remove a Conda environment previously created by \code{create_env()}. diff --git a/man/run_bin.Rd b/man/run_bin.Rd index 6906d6f..ebace79 100644 --- a/man/run_bin.Rd +++ b/man/run_bin.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/run_bin.R \name{run_bin} \alias{run_bin} -\title{Run a Binary from a Conda Environment Without Emvironment Activation} +\title{Run a Binary from a Conda Environment Without Environment Activation} \usage{ run_bin( cmd, @@ -43,7 +43,9 @@ returned by \code{run()}. A character string can be used to define a file path to be used as standard error. e.g: "error.txt".} } \value{ -An invisible list containing the results from \code{processx::run()}, including standard output and error. +An object of class \code{list} representing the result of the command +execution. Contains information about the standard output, standard error, +and exit status of the command. } \description{ Executes a binary command from a specified Conda environment without activating the environment or using its environment variables. This function temporarily clears Conda and Mamba-related environment variables to prevent interference, ensuring that the command runs in a clean environment. @@ -51,12 +53,12 @@ Usually this is not what the user wants, check \code{\link[=run]{run()}} for the } \examples{ \dontrun{ -# Example assumes that 'my_env' exists and contains 'python' -# Run 'python' with a script in 'my_env' environment -condathis::run_bin("python", "script.py", env_name = "my_env", verbose = "silent") +# Example assumes that 'my-env' exists and contains 'python' +# Run 'python' with a script in 'my-env' environment +condathis::run_bin("python", "script.py", env_name = "my-env", verbose = "silent") # Run 'ls' command with additional arguments -condathis::run_bin("ls", "-la", env_name = "my_env") +condathis::run_bin("ls", "-la", env_name = "my-env") } } diff --git a/man/run_internal_native.Rd b/man/run_internal_native.Rd deleted file mode 100644 index f957e10..0000000 --- a/man/run_internal_native.Rd +++ /dev/null @@ -1,48 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/run_internal.R -\name{run_internal_native} -\alias{run_internal_native} -\title{Run Command Using Native Method} -\usage{ -run_internal_native( - cmd, - ..., - env_name = "condathis-env", - verbose = FALSE, - error = c("cancel", "continue"), - stdout = "|", - stderr = "|" -) -} -\arguments{ -\item{cmd}{Character. The main command to be executed in the Conda environment.} - -\item{...}{Additional arguments to be passed to the command. These arguments will be passed directly to the command executed in the Conda environment. -File paths should not contain special characters or spaces.} - -\item{env_name}{Character. The name of the Conda environment where the tool will be run. Defaults to \code{"condathis-env"}. -If the specified environment does not exist, it will be created automatically using \code{create_env()}.} - -\item{verbose}{Character string specifying the verbosity level of the function's output. Acceptable values are: -\itemize{ -\item \strong{"silent"}: Suppress all output from internal command-line tools. Equivalent to \code{FALSE}. -\item \strong{"cmd"}: Print the internal command(s) passed to the command-line tool. -\item \strong{"output"}: Print the standard output and error from the command-line tool to the screen. Note that the order of the standard output and error lines may not be correct, as standard output is typically buffered. If the standard output and/or error is redirected to a file or they are ignored, they will not be echoed. -\item \strong{"full"}: Print both the internal command(s) (\code{"cmd"}) and their standard output and error (\code{"output"}). Equivalent to \code{TRUE}. -Logical values \code{FALSE} and \code{TRUE} are also accepted for backward compatibility but are \emph{soft-deprecated}. Please use \code{"silent"} and \code{"full"} respectively instead. -}} - -\item{error}{Character string. How to handle errors. Options are \code{"cancel"} or \code{"continue"}. Defaults to \code{"cancel"}.} - -\item{stdout}{Default: "|" keep stdout to the R object -returned by \code{run()}. -A character string can be used to define a file path to be used as standard output. e.g: "output.txt".} - -\item{stderr}{Default: "|" keep stderr to the R object -returned by \code{run()}. -A character string can be used to define a file path to be used as standard error. e.g: "error.txt".} -} -\description{ -Internal function to run a command in a Conda environment using the native method. -} -\keyword{internal} diff --git a/man/symlink_micromamba_bin.Rd b/man/symlink_micromamba_bin.Rd deleted file mode 100644 index d0c57dd..0000000 --- a/man/symlink_micromamba_bin.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/symlink_micromamba_bin.R -\name{symlink_micromamba_bin} -\alias{symlink_micromamba_bin} -\title{Create a Symlink to the \code{micromamba} Executable} -\usage{ -symlink_micromamba_bin(path = NULL, force = FALSE) -} -\arguments{ -\item{path}{A character string specifying the path to the \code{micromamba} binary -to symlink. If \code{NULL}, the function attempts to locate a user-installed binary.} - -\item{force}{A logical value indicating whether to overwrite an existing symlink. -Defaults to \code{FALSE}.} -} -\value{ -Invisibly returns the path to the \code{micromamba} symlink created or verified. -} -\description{ -This function checks whether the \code{micromamba} binary is already available on the -system's \code{PATH}. If not, it creates a symbolic link to the binary managed by \code{condathis}. -Users can specify a custom path to an existing \code{micromamba} binary or force -the creation of a new symlink. -} -\keyword{internal} diff --git a/tests/testthat/test-create_env.R b/tests/testthat/test-create_env.R index 35a6c97..bd0189e 100644 --- a/tests/testthat/test-create_env.R +++ b/tests/testthat/test-create_env.R @@ -62,7 +62,6 @@ testthat::test_that("conda env is created", { ) }, class = "rlib_error" - # class = "condathis_error_run" ) run_res <- run(