Skip to content

Commit

Permalink
docs: add package namespace to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
luciorq committed Dec 10, 2024
1 parent adb51f2 commit 6b95103
Show file tree
Hide file tree
Showing 28 changed files with 34 additions and 30 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: condathis
Title: Run Any CLI Tool on a 'Conda' Environment
Version: 0.0.8
Version: 0.1.0
Authors@R: c(
person("Lucio", "Queiroz", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0002-6090-1834")),
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# condathis 0.1.0

* Initial submission to CRAN.

# condathis 0.0.8

## Breaking changes

* `env_exists()` now error if no argument is supplied.

* The base directory path used for creating the environments is now controlled by `tools::R_R_user_dir()` and accepts `R_USER_DATA_DIR`, and `XDG_DATA_HOME`, respectively as environment variables that can control that path. On Unix/Linux it should be `"${HOME}/.local/share/R/condathis"`.
* The base directory path used for creating the environments is now controlled by `tools::R_user_dir()` and accepts `R_USER_DATA_DIR`, and `XDG_DATA_HOME`, respectively as environment variables that can control that path. On Unix/Linux it should be `"${HOME}/.local/share/R/condathis"`.

* The default `TMPDIR` for all `run()` and `run_bin()` calls are clean after execution.

Expand Down
2 changes: 1 addition & 1 deletion R/create_env.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#'
#' @examples
#' \dontrun{
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' # Create a Conda environment and install the CLI `fastqc` in it.
#' condathis::create_env(
#' packages = "fastqc==0.12.1",
Expand Down
2 changes: 1 addition & 1 deletion R/env_exists.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @return Boolean. `TRUE` if the environment exists and `FALSE` otherwise.
#' @examples
#' \dontrun{
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' # Create the environment
#' condathis::create_env(
#' packages = "fastqc",
Expand Down
2 changes: 1 addition & 1 deletion R/get_env_dir.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @return A character string indicating the path where environments will be created.

#' @examples
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' # Get the default environment directory
#' condathis::get_env_dir()
#' #> "/path/to/condathis/envs/condathis-env"
Expand Down
2 changes: 1 addition & 1 deletion R/get_install_dir.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' A character string representing the normalized, real path to the `condathis` data directory.
#'
#' @examples
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' condathis::get_install_dir()
#' #> /home/username/.local/share/condathis
#' })
Expand Down
2 changes: 1 addition & 1 deletion R/install_micromamba.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#'
#' @examples
#' \dontrun{
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' # Install the default version of Micromamba
#' condathis::install_micromamba()
#'
Expand Down
2 changes: 1 addition & 1 deletion R/install_packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#'
#' @examples
#' \dontrun{
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' condathis::create_env(
#' packages = "fastqc",
#' env_name = "fastqc-env"
Expand Down
2 changes: 1 addition & 1 deletion R/list_envs.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#'
#' @examples
#' \dontrun{
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' # Create environments
#' condathis::create_env(
#' packages = "fastqc",
Expand Down
2 changes: 1 addition & 1 deletion R/list_packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' }
#' @examples
#' \dontrun{
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' # Creates a Conda environment with the CLI `fastqc`
#' condathis::create_env(
#' packages = "fastqc",
Expand Down
2 changes: 1 addition & 1 deletion R/micromamba_bin_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' }
#'
#' @examples
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' # Retrieve the path to where micromamba executable is searched
#' micromamba_path <- condathis::micromamba_bin_path()
#' print(micromamba_path)
Expand Down
2 changes: 1 addition & 1 deletion R/remove_env.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#'
#' @examples
#' \dontrun{
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' condathis::create_env(
#' packages = "fastqc",
#' env_name = "fastqc-env"
Expand Down
2 changes: 1 addition & 1 deletion R/run.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#'
#' @examples
#' \dontrun{
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' ## Create env
#' create_env("samtools", env_name = "samtools-env")
#'
Expand Down
2 changes: 1 addition & 1 deletion R/run_bin.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#'
#' @examples
#' \dontrun{
#' with_sandbox_dir({
#' condathis::with_sandbox_dir({
#' # Example assumes that 'my-env' exists and contains 'python'
#' # Run 'python' with a script in 'my-env' environment
#' condathis::run_bin(
Expand Down
4 changes: 2 additions & 2 deletions R/with_sandbox_dir.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#' Returns `NULL` invisibly.
#'
#' @examples
#' with_sandbox_dir(print(fs::path_home()))
#' with_sandbox_dir(print(tools::R_user_dir("condathis")))
#' condathis::with_sandbox_dir(print(fs::path_home()))
#' condathis::with_sandbox_dir(print(tools::R_user_dir("condathis")))
#'
#' @export
with_sandbox_dir <- function(code, .local_envir = base::parent.frame()) {
Expand Down
2 changes: 1 addition & 1 deletion man/create_env.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/env_exists.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_env_dir.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_install_dir.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_micromamba.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_packages.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/list_envs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/list_packages.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/micromamba_bin_path.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/remove_env.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/run.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/run_bin.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/with_sandbox_dir.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6b95103

Please sign in to comment.