Skip to content

Commit

Permalink
Merge pull request #15 from mihaiconstantin/cran/checks
Browse files Browse the repository at this point in the history
Changes to satisfy `CRAN` requests
  • Loading branch information
mihaiconstantin committed Feb 27, 2023
2 parents f338751 + 617fe98 commit 2e06f5e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: parabar
Title: Progress Bar for Parallel Tasks
Version: 0.10.0
Version: 0.10.1
Authors@R:
person(given = "Mihai",
family = "Constantin",
Expand Down
15 changes: 13 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
# parabar 0.10.1

## Changed
- Initially removed `\dontrun{}` from `make_logo` function examples as per
`CRAN` request in commit `87678fe`. However, this results in the examples
failing the `R-CMD-check` workflow. Reverted the change in commit `a9d11ac`.
- Update version for constant `LOGO` from `v1.x.x` to `v0.x.x`.

## Fixed
- Add missing environment in examples for `SyncBackend` class.

# parabar 0.10.0

## Added
- Add new exported wrappers to the `pkgdown` reference section.
- Add several exported wrappers to the user API:
- `clear`: to clean a provided backend instance.
- `export`: to export variables from a give environment to the `.GlobalEnv` of
the backend instance.
- `export`: to export variables from a given environment to the `.GlobalEnv`
of the backend instance.
- `peek`: to list the variables names available on the backend instance.
- `evaluate`: to evaluate arbitrary expressions on the backend instance.
- Add type checks for the exported functions (i.e., the user API).
Expand Down
4 changes: 2 additions & 2 deletions R/SyncBackend.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#' # Create a dummy variable.
#' name <- "parabar"
#'
#' # Export the variable to the backend.
#' backend$export("name")
#' # Export the variable from the current environment to the backend.
#' backend$export("name", environment())
#'
#' # Remove variable from current environment.
#' rm(name)
Expand Down
6 changes: 3 additions & 3 deletions R/exports.r
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ par_sapply <- function(backend = NULL, x, fun, ...) {
}

# Get user warning settings.
warn <- getOption("warn")
user_options <- options()

# Enable printing warnings as soon as they occur.
options(warn = 1)

# Restore user's original settings.
on.exit({
# Reset warning level.
options(warn = warn)
# Reset user's options.
options(user_options)
})

# Whether to track progress or not.
Expand Down
2 changes: 1 addition & 1 deletion R/logo.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ make_logo <- function(template = "./inst/assets/logo/parabar-logo.txt", version
#' @seealso [parabar::make_logo()]
#'
#' @export
LOGO = ". . . . . . . . . . . . . . . . . . . . . . . . . . .\n. _ v1.x.x .\n. | | .\n. _ __ __ _ _ __ __ _ | |__ __ _ _ __ .\n. | '_ \\ / _` || '__| / _` || '_ \\ / _` || '__| .\n. | |_) || (_| || | | (_| || |_) || (_| || | .\n. | .__/ \\____||_| \\____||____/ \\____||_| .\n. | | .\n. |_| .\n. .\n. . . . . . . . . . . . . . . . . . . . . . . . . . .\n. . .\n. https://parabar.mihaiconstantin.com .\n. . .\n. . . . . . . . . . . . . . . . . . . . . . . . . . ."
LOGO = ". . . . . . . . . . . . . . . . . . . . . . . . . . .\n. _ v0.x.x .\n. | | .\n. _ __ __ _ _ __ __ _ | |__ __ _ _ __ .\n. | '_ \\ / _` || '__| / _` || '_ \\ / _` || '__| .\n. | |_) || (_| || | | (_| || |_) || (_| || | .\n. | .__/ \\____||_| \\____||____/ \\____||_| .\n. | | .\n. |_| .\n. .\n. . . . . . . . . . . . . . . . . . . . . . . . . . .\n. . .\n. https://parabar.mihaiconstantin.com .\n. . .\n. . . . . . . . . . . . . . . . . . . . . . . . . . ."

# Add package logo class.
class(LOGO) <- "parabar"
Expand Down
4 changes: 2 additions & 2 deletions man/SyncBackend.Rd

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

0 comments on commit 2e06f5e

Please sign in to comment.