Skip to content

Commit 1c367d7

Browse files
README: Avoid promoting progressr.* options for now
1 parent 345fcb2 commit 1c367d7

File tree

7 files changed

+32
-5
lines changed

7 files changed

+32
-5
lines changed

OVERVIEW.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Design motto:
1616
|-------------------------------|-----------------------------|
1717
| `p <- progressor(n)` | `with_progress(expr)` |
1818
| `p <- progressor(along = x)` | `handlers(...)` |
19-
| `p(msg, ...)` | `options(progressr.*=...)` |
19+
| `p(msg, ...)` | |
2020

2121

2222

@@ -75,7 +75,7 @@ This progress handler will present itself as:
7575
[==================>---------------------------] 40% Added 4
7676
```
7777

78-
To set the default progress handler(s) in all your R sessions, call `progressr::handlers(...)` in your <code>~/.Rprofile</code> file. An alternative, which avoids loading the **progressr** package if never used, is to set `options(progressr.handlers = progress_handler)`.
78+
To set the default progress handler(s) in all your R sessions, call `progressr::handlers(...)` in your <code>~/.Rprofile</code> file.
7979

8080

8181

R/zzz.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.onLoad <- function(libname, pkgname) {
22
if (in_r_cmd_check()) {
3-
options(progressr.demo.delay = 0.01)
3+
msg <- sprintf("%s:::.onLoad(): Detected 'R CMD check'", pkgname)
4+
packageStartupMessage(msg)
5+
options(progressr.demo.delay = 0.0)
46
}
57
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Design motto:
1818
|-------------------------------|-----------------------------|
1919
| `p <- progressor(n)` | `with_progress(expr)` |
2020
| `p <- progressor(along = x)` | `handlers(...)` |
21-
| `p(msg, ...)` | `options(progressr.*=...)` |
21+
| `p(msg, ...)` | |
2222

2323

2424

@@ -77,7 +77,7 @@ This progress handler will present itself as:
7777
[==================>---------------------------] 40% Added 4
7878
```
7979

80-
To set the default progress handler(s) in all your R sessions, call `progressr::handlers(...)` in your <code>~/.Rprofile</code> file. An alternative, which avoids loading the **progressr** package if never used, is to set `options(progressr.handlers = progress_handler)`.
80+
To set the default progress handler(s) in all your R sessions, call `progressr::handlers(...)` in your <code>~/.Rprofile</code> file.
8181

8282

8383

incl/debug_handler.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
res <- progressr:::query_r_cmd_check()
2+
print(res)
3+
str(res)
4+
print(getOption("progressr.demo.delay", NA_real_))
5+
16
handlers("debug")
27
with_progress({ y <- slow_sum(1:10) })
38
print(y)

man/debug_handler.Rd

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

tests/incl/start,load-only.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ mdebug <- progressr:::mdebug
1515
mprint <- progressr:::mprint
1616
mprintf <- progressr:::mprintf
1717
mstr <- progressr:::mstr
18+
query_r_cmd_check <- progressr:::query_r_cmd_check
1819
in_r_cmd_check <- progressr:::in_r_cmd_check
1920
stop_if_not <- progressr:::stop_if_not
2021
printf <- function(...) cat(sprintf(...))

tests/utils.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,20 @@ print(TRUE %||% FALSE)
8989

9090
message("*** %||% ... done")
9191

92+
message("*** query_r_cmd_check() ...")
93+
94+
print(query_r_cmd_check())
95+
96+
cat("Command line arguments:\n")
97+
args <- commandArgs()
98+
print(args)
99+
100+
cat("Working directory:\n")
101+
pwd <- getwd()
102+
print(pwd)
103+
104+
message("*** query_r_cmd_check() ... done")
105+
92106
message("*** in_r_cmd_check() ...")
93107

94108
print(in_r_cmd_check())

0 commit comments

Comments
 (0)