Skip to content

Commit

Permalink
version 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
moodymudskipper authored and cran-robot committed Sep 16, 2022
1 parent 19e8f68 commit 5e2a177
Show file tree
Hide file tree
Showing 32 changed files with 16,649 additions and 925 deletions.
12 changes: 7 additions & 5 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: boomer
Title: Debugging Tools to Inspect the Intermediate Steps of a Call
Version: 0.1.0
Version: 0.1.1
Authors@R:
person(given = "Antoine",
family = "Fabri",
Expand All @@ -12,15 +12,17 @@ Description: Provides debugging tools that let you inspect the
License: GPL-3
Encoding: UTF-8
Language: en
RoxygenNote: 7.1.1.9001
RoxygenNote: 7.2.1
Imports: crayon, methods, pryr, rlang, rstudioapi, styler, withr
Suggests: lobstr, magrittr, testthat (>= 3.0.0)
Suggests: shiny, lobstr, magrittr, testthat (>= 3.0.0), knitr,
rmarkdown, flow
URL: https://github.com/moodymudskipper/boomer
BugReports: https://github.com/moodymudskipper/boomer/issues
Config/testthat/edition: 3
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2021-07-20 02:01:41 UTC; Antoine
Packaged: 2022-09-16 08:17:36 UTC; Antoine
Author: Antoine Fabri [aut, cre]
Maintainer: Antoine Fabri <antoine.fabri@gmail.com>
Repository: CRAN
Date/Publication: 2021-07-20 10:10:02 UTC
Date/Publication: 2022-09-16 09:56:07 UTC
44 changes: 31 additions & 13 deletions MD5
@@ -1,19 +1,32 @@
ba7c816139070a9159590dd4655bb525 *DESCRIPTION
8cfd36ec1cca844092481c00e5ef1367 *NAMESPACE
950e0751177427e87c7ebc5214bf1ba8 *NEWS.md
61156bed100223df0e4611c76b647666 *DESCRIPTION
af51b05baaefdd8a6d36a2e9786058ea *NAMESPACE
594f175775c7edc1455b045bb0f62563 *NEWS.md
baef41c5a53144507314c8d89a313d59 *R/addin.R
f8a2fcf2727674579a0b47669b8c9063 *R/boomer-package.R
a329422f7c346bcb183d674eb0dc9f49 *R/exported.R
d1bc47e7f7ec887fa391983b3485c9cb *R/boom_on.R
27237067f89edf206a30c1c7aac55aa1 *R/boomer-package.R
ce9151475e185adb778124cc15ee8e48 *R/exported.R
abb45beba60e8d1072e6a06b3d39ab2b *R/fake_package.R
9c45216e5689119675579b9e52a5b1a4 *R/globals.R
3c4de0f92994facb8eb9b378a272a5a7 *R/globals.R
2fd48c5cdcbd28f537b45018b186f935 *R/rig_impl.R
c3e627c301ee863856bfd561c6ec8b81 *R/wrap.R
9eb12b86f9140d076082aa2d73dc9d1c *R/zzz.R
adff5b8ac9813c49f32f86ac0f622b82 *README.md
65c83acce9d4ffe127df0cf1040e6e91 *R/shiny.R
7da30fb92a6567084b9988401bb0fc73 *R/wrap.R
c884ff79d73372c6a051b54d4c62dcbd *R/zzz.R
c3c8526de032f1b689b962691ab81d6b *README.md
8237c7ea75df55db973fcf882b650956 *build/vignette.rds
734c5cc87ede7fd819f5348b47ec90c8 *inst/doc/how-boomer-works.R
89c4b79c9eac75253cc587369216d548 *inst/doc/how-boomer-works.Rmd
9187dd73cb8d5b63c69f906fd371d89d *inst/doc/how-boomer-works.html
3c9e2d06e8560272e30c98b0c827478b *inst/doc/shiny.R
b66e43db707f5724f9d9619ee3cca0aa *inst/doc/shiny.Rmd
b682f6a9aee950e2ce29cc72610ffbf8 *inst/doc/shiny.html
91705614f7df3acc6de3e5bee5d3a6f9 *inst/rstudio/addins.dcf
621b5e71947d922920597178bf84bf75 *man/boom.Rd
2932b7a3098cf57f3a2b760cddb1ab94 *man/boomer-package.Rd
1a2091a408c6367b6ed97d6d09d01f8b *man/boom.Rd
f86e7bd0421d190e9503a97ef56e27fe *man/boom_on.Rd
deb7e7a2e46b60c2047a0866109ac95e *man/boom_shinyApp.Rd
b63d15425591a583255849302abb3303 *man/boomer-package.Rd
d0a9fac687911e2b509537c7923b9abc *man/figures/README-1.png
fab1dc425fa96ee465df3abdbe3d6169 *man/figures/README-10.gif
c6987349880a05c4b6ba1701d0051ce8 *man/figures/README-11.gif
57d3cd48579dde54a1484d229981f470 *man/figures/README-2.png
4eca79046f2cc13e4baa65a06d1cfa82 *man/figures/README-3.png
acf0adb6bc104add1d3c152a52f2747a *man/figures/README-4.png
Expand All @@ -24,8 +37,13 @@ e1abb1a888deaaea5123449bec4671fb *man/figures/README-8.png
8fd3fb6e6034fa965ac4aede1966e27b *man/figures/README-9.png
40af4eebde6afceb17d9f376b9960668 *man/figures/logo.png
027d53b5eaa92371b0319d6a65155515 *tests/testthat.R
01b27e4da2114870e1f5798951e55fbd *tests/testthat/_snaps/boom.md
5e45ab7076d85323e0297a124dc2f507 *tests/testthat/_snaps/rig.md
b22dddf43e16fcf511e279aeb2cb2309 *tests/testthat/_snaps/boom.md
ca2c015d936526804e70791a05b4cfa2 *tests/testthat/_snaps/rig.md
33d9712f02061b2c9b3f4dbd7241363c *tests/testthat/test-boom.R
124643f4d3da602534067e266a8c6911 *tests/testthat/test-rig.R
3883e27fde3fc5a628e8a5a01df6c275 *tests/testthat/test-rig_in_namespace.R
89c4b79c9eac75253cc587369216d548 *vignettes/how-boomer-works.Rmd
1692180b5080cc35522750aac8b36e0d *vignettes/shiny-1.png
0a304062810f7ad79d5158c51d7c62e4 *vignettes/shiny-2.png
a48cb18a4120aee089707e66c450850f *vignettes/shiny-3.png
b66e43db707f5724f9d9619ee3cca0aa *vignettes/shiny.Rmd
35 changes: 21 additions & 14 deletions NAMESPACE
@@ -1,14 +1,21 @@
# Generated by roxygen2: do not edit by hand

S3method("+",rigger)
S3method(print,rigger)
export(boom)
export(rig)
export(rig_in_namespace)
export(rigger)
importFrom(methods,allNames)
importFrom(methods,formalArgs)
importFrom(stats,setNames)
importFrom(utils,capture.output)
importFrom(utils,getParseData)
importFrom(utils,head)
# Generated by roxygen2: do not edit by hand

S3method("+",rigger)
S3method(print,rigger)
S3method(print,shiny.boomed_appobj)
export(boom)
export(boom_off)
export(boom_on)
export(boom_runApp)
export(boom_shinyApp)
export(rig)
export(rig_in_namespace)
export(rigger)
importFrom(methods,allNames)
importFrom(methods,formalArgs)
importFrom(pryr,address)
importFrom(stats,setNames)
importFrom(utils,capture.output)
importFrom(utils,getFromNamespace)
importFrom(utils,getParseData)
importFrom(utils,head)
10 changes: 10 additions & 0 deletions NEWS.md
@@ -1,3 +1,13 @@
# boomer 0.1.1

* Call `boom_on()` and `boom_off()` when browsing to toggle "boom debugging" on and off
* Call `boom_shinyApp()` and `boom_runApp()` to start a shiny app as you would with {shiny}'s
`shinyApp()` and `runApp()`, but making chosen reactives verbose (very experimental).
* A new vignette for the above
* Another new vignette summarizing how {boomer} works
* {boomer} doesn't choke anymore in case of missing arguments
* Rigged function names are displayed better when rig is called on a namespaced call

# boomer 0.1.0

* Call `boom()` to explode a call and print outputs of intermediate steps
Expand Down
22 changes: 22 additions & 0 deletions R/boom_on.R
@@ -0,0 +1,22 @@
#' Switch "boom" debugging on and off
#'
#' While debugging a function, call `boom_on()` and all subsequent calls will be boomed,
#' call `boom_off()` to return to standard debugging.
#' @inheritParams boom
#' @export
#' @return Returns `NULL` invisibly, called for side effects.
boom_on <- function(clock = NULL, print = NULL) {
fun <- sys.function(-1)
rigged_fun <- rig_impl(fun, clock, print, rigged_nm = NULL)
e <- parent.frame()
parent.env(e) <- environment(rigged_fun)
invisible(NULL)
}

#' @export
#' @rdname boom_on
boom_off <- function() {
e <- parent.frame()
parent.env(e) <- parent.env(parent.env(e))
invisible(NULL)
}
4 changes: 2 additions & 2 deletions R/boomer-package.R
@@ -1,5 +1,5 @@
#' @importFrom stats setNames
#' @importFrom utils getParseData head capture.output
#' @importFrom utils getParseData head capture.output getFromNamespace
#' @importFrom methods allNames formalArgs
#' @aliases boomer boomer-package
#' @details
Expand Down Expand Up @@ -32,7 +32,7 @@
#' `c("~", "{", "(", "<-", "<<-", "=")`
#' - `boomer.safe_print`: Whether to replace emoticons by characters compatible
#' with all systems. This is useful for reprexes (see {reprex} package) and
#' for knitted report in case the ouput of those doesn't look good on your system.
#' for knitted report in case the output of those doesn't look good on your system.
#' - `boomer.abbreviate`: Whether to show only the function's name rather than the
#' call when it's entered.
#'
Expand Down
16 changes: 12 additions & 4 deletions R/exported.R
Expand Up @@ -82,10 +82,18 @@ boom <- function(
#' @export
#' @rdname boom
rig <- function(
fun,
clock = NULL,
print = NULL) {
rig_impl(fun, clock, print, rigged_nm = as.character(substitute(fun)))
fun,
clock = NULL,
print = NULL
) {
fun_lng <- substitute(fun)
if (!is.function(fun)) stop("`fun` should evaluate to a function")
if (is.symbol(fun_lng) || rlang::is_call(fun_lng, "::") || rlang::is_call(fun_lng, "::")) {
fun_chr <- paste(deparse(fun_lng), collapse="")
} else {
stop("`fun` should be provided in one of these forms : `f`, `pkg::f` or `pkg:::f`")
}
rig_impl(fun, clock, print, rigged_nm = fun_chr)
}

#' @export
Expand Down
1 change: 1 addition & 0 deletions R/globals.R
@@ -1,6 +1,7 @@
# will contain `times` data frame and `last_total_time_end` POSIXct
globals <- new.env()
globals$n_indent <- -1
globals$shiny_rigged <- FALSE

reset_globals <- function() {
# reset the global times table
Expand Down

0 comments on commit 5e2a177

Please sign in to comment.