Skip to content

Commit bb0c823

Browse files
committed
docs: lint examples docs
1 parent e75f7c8 commit bb0c823

26 files changed

+65
-339
lines changed

R/create_env.R

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,20 @@
3636
#'
3737
#' @param overwrite Logical. Should environment always be overwritten?
3838
#' Defaults to `FALSE`.
39-
#' @return An object of class `list` representing the result of the command execution.
40-
#' Contains information about the standard output, standard error, and exit status of the command.
41-
#' This function is used for its side effect of creating a Conda environment.
39+
#'
40+
#' @return An object of class `list` representing the result of the command
41+
#' execution. Contains information about the standard output, standard error,
42+
#' and exit status of the command.
43+
#'
4244
#' @examples
4345
#' \dontrun{
4446
#' # Create a Conda environment and install the CLI `fastqc` in it.
4547
#' condathis::create_env(
4648
#' packages = "fastqc==0.12.1",
47-
#' env_name = "fastqc_env",
49+
#' env_name = "fastqc-env",
4850
#' verbose = "output"
4951
#' )
50-
#' #> ! Environment fastqc_env succesfully created.
52+
#' #> ! Environment fastqc-env succesfully created.
5153
#' }
5254
#' @export
5355
create_env <- function(

R/env_exists.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' and `FALSE` otherwise.
66
#'
77
#' @inheritParams create_env
8-
#' @return Boolean.
8+
#' @return Boolean. `TRUE` if the environment exists and `FALSE` otherwise.
99
#' @examples
1010
#' \dontrun{
1111
#' # Create the environment

R/get_condathis_path.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#' Retrieve System-Dependent Data Path for condathis
22
#'
3-
#' 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.
3+
#' Determines the appropriate user data directory for the `condathis` package based on the operating system.
4+
#' On macOS, it avoids using paths with spaces due to issues with `micromamba run` failing when there are spaces in the path.
45
#'
56
#' @details
67
#' This function uses the `rappdirs` package to determine the user data directory.

R/install_packages.R

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@
66
#'
77
#' @inheritParams create_env
88
#'
9-
#' @return No value is returned; this function is used for its side effect of installing packages in a conda environment.
9+
#' @return An object of class `list` representing the result of the command
10+
#' execution. Contains information about the standard output, standard error,
11+
#' and exit status of the command.
12+
#'
1013
#' @examples
1114
#' \dontrun{
1215
#' condathis::create_env(
1316
#' packages = "fastqc",
14-
#' env_name = "fastqc_env"
17+
#' env_name = "fastqc-env"
1518
#' )
16-
#' # Install the package `vim` in the `fastqc_env` environment.
19+
#' # Install the package `vim` in the `fastqc-env` environment.
1720
#' # It is not recommended to install multiple packages in the same environment,
1821
# # as it defeats the purpose of isolation provided by separate environments.
19-
#' condathis::install_packages(packages = "vim", env_name = "fastqc_env")
22+
#' condathis::install_packages(packages = "vim", env_name = "fastqc-env")
2023
#' }
2124
#' @export
2225
install_packages <- function(packages,

R/list_packages.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
#' # Creates a Conda environment with the CLI `fastqc`
2424
#' condathis::create_env(
2525
#' packages = "fastqc",
26-
#' env_name = "fastqc_env"
26+
#' env_name = "fastqc-env"
2727
#' )
28-
#' # Lists the packages in env `fastqc_env`
29-
#' dat <- condathis::list_packages("fastqc_env")
28+
#' # Lists the packages in env `fastqc-env`
29+
#' dat <- condathis::list_packages("fastqc-env")
3030
#' dim(dat)
3131
#' #> [1] 34 8
3232
#' }

R/remove_env.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
#'
55
#' @inheritParams create_env
66
#'
7-
#' @return An object of class `list` representing the result of the command execution.
8-
#' Contains information about the standard output, standard error, and exit status of the command.
7+
#' @return An object of class `list` representing the result of the command
8+
#' execution. Contains information about the standard output, standard error,
9+
#' and exit status of the command.
910
#'
1011
#' @examples
1112
#' \dontrun{

R/run_bin.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
#' Run a Binary from a Conda Environment Without Emvironment Activation
1+
#' Run a Binary from a Conda Environment Without Environment Activation
22
#'
33
#' 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.
44
#' Usually this is not what the user wants, check [run()] for the stable function to use.
55
#'
66
#' @inheritParams run
77
#'
8-
#' @return An invisible list containing the results from `processx::run()`, including standard output and error.
8+
#' @return An object of class `list` representing the result of the command
9+
#' execution. Contains information about the standard output, standard error,
10+
#' and exit status of the command.
911
#'
1012
#' @examples
1113
#' \dontrun{
12-
#' # Example assumes that 'my_env' exists and contains 'python'
13-
#' # Run 'python' with a script in 'my_env' environment
14-
#' condathis::run_bin("python", "script.py", env_name = "my_env", verbose = "silent")
14+
#' # Example assumes that 'my-env' exists and contains 'python'
15+
#' # Run 'python' with a script in 'my-env' environment
16+
#' condathis::run_bin("python", "script.py", env_name = "my-env", verbose = "silent")
1517
#'
1618
#' # Run 'ls' command with additional arguments
17-
#' condathis::run_bin("ls", "-la", env_name = "my_env")
19+
#' condathis::run_bin("ls", "-la", env_name = "my-env")
1820
#' }
1921
#'
2022
#' @export

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ Run system command line interface (CLI) tools in a **reproducible** and
1313

1414
## Get started
1515

16-
Install package from [CRAN](https://cran.r-project.org):
17-
16+
<!--
17+
When available, install package from [CRAN](https://cran.r-project.org):
18+
&#10;
1819
``` r
1920
install.packages("condathis")
2021
```
22+
-->
2123

2224
Install package from
2325
[R-Universe](https://luciorq.r-universe.dev/condathis):
@@ -30,6 +32,8 @@ install.packages("condathis", repos = c("https://luciorq.r-universe.dev", getOpt
3032

3133
``` r
3234
remotes::install_github("luciorq/condathis")
35+
# or
36+
pak::pkg_install("github::luciorq/condathis")
3337
```
3438

3539
## Motivation
@@ -122,8 +126,8 @@ manages all the library dependencies of `fastqc`, making sure that they
122126
are compatible with the specific operating system.
123127

124128
``` r
125-
condathis::create_env(packages = "fastqc==0.12.1", env_name = "fastqc_env", verbose = "output")
126-
#> ! Environment fastqc_env succesfully created.
129+
condathis::create_env(packages = "fastqc==0.12.1", env_name = "fastqc-env", verbose = "output")
130+
#> ! Environment fastqc-env succesfully created.
127131
```
128132

129133
Then we run the command inside the environment just created which

man/create_base_env.Rd

Lines changed: 0 additions & 12 deletions
This file was deleted.

man/create_env.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/define_platform.Rd

Lines changed: 0 additions & 36 deletions
This file was deleted.

man/env_exists.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/format_channels_args.Rd

Lines changed: 0 additions & 15 deletions
This file was deleted.

man/get_condathis_path.Rd

Lines changed: 0 additions & 19 deletions
This file was deleted.

man/install_packages.Rd

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/is_micromamba_available_for_arch.Rd

Lines changed: 0 additions & 14 deletions
This file was deleted.

man/list_packages.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/micromamba_user_installed.Rd

Lines changed: 0 additions & 12 deletions
This file was deleted.

man/native_cmd.Rd

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)