Skip to content

Commit 61355f9

Browse files
Merge branch 'release/0.7.0'
2 parents ed9c86b + f73e681 commit 61355f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3248
-962
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
- { os: macOS-latest, r: '3.6'}
2121
- { os: macOS-latest, r: '4.0'}
2222
- { os: macOS-latest, r: 'devel'}
23-
- { os: ubuntu-16.04, r: '3.4', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
2423
- { os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
2524
- { os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
2625
- { os: ubuntu-16.04, r: '4.0', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
@@ -78,6 +77,8 @@ jobs:
7877
shell: Rscript {0}
7978

8079
- name: Check
80+
env:
81+
_R_CHECK_CRAN_INCOMING_: false
8182
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
8283
shell: Rscript {0}
8384

CONDUCT.md

Lines changed: 101 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,129 @@
1+
12
# Contributor Covenant Code of Conduct
23

34
## Our Pledge
45

5-
In the interest of fostering an open and welcoming environment, we as
6-
contributors and maintainers pledge to making participation in our project and
7-
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, gender identity and expression, level of experience,
9-
nationality, personal appearance, race, religion, or sexual identity and
10-
orientation.
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, religion, or sexual identity
11+
and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
1115

1216
## Our Standards
1317

14-
Examples of behavior that contributes to creating a positive environment
15-
include:
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
1620

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the
27+
overall community
2228

23-
Examples of unacceptable behavior by participants include:
29+
Examples of unacceptable behavior include:
2430

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
31+
* The use of sexualized language or imagery, and sexual attention or
32+
advances of any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
2834
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
35+
* Publishing others' private information, such as a physical or email
36+
address, without their explicit permission
3137
* Other conduct which could reasonably be considered inappropriate in a
3238
professional setting
3339

34-
## Our Responsibilities
40+
## Enforcement Responsibilities
3541

36-
Project maintainers are responsible for clarifying the standards of acceptable
37-
behavior and are expected to take appropriate and fair corrective action in
38-
response to any instances of unacceptable behavior.
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
3946

40-
Project maintainers have the right and responsibility to remove, edit, or
41-
reject comments, commits, code, wiki edits, issues, and other contributions
42-
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
44-
threatening, offensive, or harmful.
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
4551

4652
## Scope
4753

48-
This Code of Conduct applies both within project spaces and in public spaces
49-
when an individual is representing the project or its community. Examples of
50-
representing a project or community include using an official project e-mail
51-
address, posting via an official social media account, or acting as an appointed
52-
representative at an online or offline event. Representation of a project may be
53-
further defined and clarified by project maintainers.
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
5459

5560
## Enforcement
5661

5762
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team. All
59-
complaints will be reviewed and investigated and will result in a response that
60-
is deemed necessary and appropriate to the circumstances. The project team is
61-
obligated to maintain confidentiality with regard to the reporter of an incident.
62-
Further details of specific enforcement policies may be posted separately.
63+
reported to the project lead.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
6387

64-
Project maintainers who do not follow or enforce the Code of Conduct in good
65-
faith may face temporary or permanent repercussions as determined by other
66-
members of the project's leadership.
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
67114

68115
## Attribution
69116

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at [https://contributor-covenant.org/version/1/4][version]
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.
72129

73-
[homepage]: https://contributor-covenant.org
74-
[version]: https://contributor-covenant.org/version/1/4/

DESCRIPTION

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
Package: progressr
2-
Version: 0.6.0
3-
Title: A Inclusive, Unifying API for Progress Updates
2+
Version: 0.7.0
3+
Title: An Inclusive, Unifying API for Progress Updates
44
Description: A minimal, unifying API for scripts and packages to report progress updates from anywhere including when using parallel processing. The package is designed such that the developer can to focus on what progress should be reported on without having to worry about how to present it. The end user has full control of how, where, and when to render these progress updates, e.g. in the terminal using utils::txtProgressBar() or progress::progress_bar(), in a graphical user interface using utils::winProgressBar(), tcltk::tkProgressBar() or shiny::withProgress(), via the speakers using beep::beepr(), or on a file system via the size of a file. Anyone can add additional, customized, progression handlers. The 'progressr' package uses R's condition framework for signaling progress updated. Because of this, progress can be reported from almost anywhere in R, e.g. from classical for and while loops, from map-reduce APIs like the lapply() family of functions, 'purrr', 'plyr', and 'foreach'. It will also work with parallel processing via the 'future' framework, e.g. future.apply::future_lapply(), furrr::future_map(), and 'foreach' with 'doFuture'. The package is compatible with Shiny applications.
55
Authors@R: c(
66
person("Henrik", "Bengtsson", role=c("aut", "cre", "cph"),
77
email = "[email protected]"))
88
License: GPL (>= 3)
9+
Depends:
10+
R (>= 3.5.0)
911
Imports:
1012
digest,
1113
utils
1214
Suggests:
1315
graphics,
1416
tcltk,
1517
beepr,
18+
crayon,
1619
pbmcapply,
1720
progress,
1821
purrr,
1922
foreach,
2023
plyr,
2124
doFuture,
22-
future (>= 1.16.0),
25+
future,
2326
future.apply,
2427
furrr,
2528
shiny,
@@ -29,5 +32,5 @@ Suggests:
2932
VignetteBuilder: progressr
3033
URL: https://github.com/HenrikBengtsson/progressr
3134
BugReports: https://github.com/HenrikBengtsson/progressr/issues
32-
RoxygenNote: 7.1.0
35+
RoxygenNote: 7.1.1
3336
Roxygen: list(markdown = TRUE)

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ vignettes/progressr-intro.md: OVERVIEW.md vignettes/incl/clean.css
77
sed -i 's/vignettes\///g' $@
88

99
vigs: vignettes/progressr-intro.md
10+
11+
spelling:
12+
$(R_SCRIPT) -e "spelling::spell_check_package()"
13+
$(R_SCRIPT) -e "spelling::spell_check_files(c('NEWS', dir('vignettes', pattern='[.](md|rsp)$$', full.names=TRUE)), ignore=readLines('inst/WORDLIST', warn=FALSE))"

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Generated by roxygen2: do not edit by hand
22

3+
S3method(conditionMessage,progression)
34
S3method(print,progression)
45
S3method(print,progression_handler)
56
S3method(print,progressor)
@@ -9,6 +10,7 @@ export(handler_debug)
910
export(handler_filesize)
1011
export(handler_newline)
1112
export(handler_notifier)
13+
export(handler_pbcol)
1214
export(handler_pbmcapply)
1315
export(handler_progress)
1416
export(handler_shiny)

NEWS

Lines changed: 69 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,75 @@
11
Package: progressr
22
==================
33

4+
Version: 0.7.0 [2020-12-11]
5+
6+
SIGNIFICANT CHANGES:
7+
8+
* The user can how use handlers(global = TRUE) to enable progress reports
9+
everywhere without having to use with_progress(). This only works in
10+
R (>= 4.0.0) because it requires global calling handlers.
11+
12+
* with_progress() now reports on progress from multiple consecutive
13+
progressors, e.g. with_progress({ a <- slow_sum(1:3); b <- slow_sum(1:3) }).
14+
15+
* A progressor must not be created in the global environment unless wrapped
16+
in with_progress() or without_progress() call. Ideally, a progressor is
17+
created within a function or a local() environment.
18+
19+
* Package now requires R (>= 3.5.0) in order to protect against interrupts.
20+
21+
NEW FEATURES:
22+
23+
* progressor() gained argument 'enable' to control whether or not the
24+
progressor signals 'progression' conditions. It defaults to option
25+
'progressr.enable' so that progress updates can be disabled globally.
26+
The 'enable' argument makes it easy for package developers who already
27+
provide a 'progress = TRUE/FALSE' argument in their functions to migrate
28+
to the 'progressr' package without having to change their existing API,
29+
e.g. the setup becomes 'p <- progressor(along = x, enabled = progress)'.
30+
The p() function created by p <- progressor(..., enable = FALSE) is an
31+
empty function with near-zero overhead.
32+
33+
* Now with_progress() and without_progress() returns the value of the
34+
evaluated expression.
35+
36+
* The progression message can now be created dynamically based on the
37+
information in the 'progression' condition. Specifically, if 'message' is
38+
a function, then that function will called with the 'progression' condition
39+
as the first argument. This function should return a character string.
40+
Importantly, it is only when the progression handler receives the
41+
progression update and calls conditionMessage(p) on it that this function
42+
is called.
43+
44+
* progressor() gained argument 'message' to set the default message of all
45+
progression updates, unless otherwise specified.
46+
47+
* progressor() gained argument 'on_exit = TRUE'.
48+
49+
* Now the 'progress' handler shows also a spinner by default.
50+
51+
* Add the 'pbcol' handler, which renders the progress as a colored progress
52+
bar in the terminal with any messages written in the front.
53+
54+
* Progression handlers now return invisibly whether or not they are finished.
55+
56+
BUG FIXES:
57+
58+
* Zero-amount progress updates never reached the progress handlers.
59+
60+
* Argument 'enable' for with_progress() had no effect.
61+
62+
463
Version: 0.6.0 [2020-05-18]
564

665
SIGNIFICANT CHANGES:
766

867
* Now with_progress() makes sure that any output produced while reporting on
9-
progress will not interfer with the progress output and vice versa, which
68+
progress will not interfere with the progress output and vice versa, which
1069
otherwise is a common problem with progress frameworks that output to the
11-
terminal, e.g. progress-bar output output is interweaved with printed
12-
objects. In contrast, when using 'progressr' we can use message() and
13-
print() as usual regardless of progress being reported or not.
70+
terminal, e.g. progress-bar output is interweaved with printed objects.
71+
In contrast, when using 'progressr' we can use message() and print() as
72+
usual regardless of progress being reported or not.
1473

1574
NEW FEATURES:
1675

@@ -36,7 +95,7 @@ NEW FEATURES:
3695
BUG FIXES:
3796

3897
* Limiting the frequency of progress reporting via handler arguments 'times',
39-
'interval' or 'intrusivness' did not work and was effectively ignored.
98+
'interval' or 'intrusiveness' did not work and was effectively ignored.
4099

41100
* The 'progress' handler, which uses progress::progress_bar(), did not support
42101
colorization of the 'format' string when done by the 'crayon' package.
@@ -109,7 +168,7 @@ Version: 0.1.5 [2019-10-26]
109168

110169
NEW FEATURES:
111170

112-
* Add withProgress2(), which is a plug-in backward compatibily replacement
171+
* Add withProgress2(), which is a plug-in backward compatibility replacement
113172
for shiny::withProgress() wrapped in progressr::with_progress() where the
114173
the "shiny" progression handler is by default added to the list of
115174
progression handlers used.
@@ -208,7 +267,7 @@ NEW FEATURES:
208267
* Add support for times = 1L for progression handlers which when used will
209268
cause the progression to only be presented upon completion (= last step).
210269

211-
* The 'shutdown' control_progression signalled by with_progress() on exit
270+
* The 'shutdown' control_progression signaled by with_progress() on exit
212271
now contains the 'status' of the evaluation. If the evaluation was
213272
successful, then status = "ok", otherwise "incomplete". Examples
214273
of incomplete evaluations are errors and interrupts.
@@ -302,7 +361,7 @@ NEW FEATURES:
302361
* Visual progression handler will now always render the complete update state
303362
when 'clear' is FALSE.
304363

305-
* Now progression handlers ignore a re-signalled progression condition if it
364+
* Now progression handlers ignore a re-signaled progression condition if it
306365
has already been processed previously.
307366

308367
* Now each progression condition holds unique identifiers for the R session
@@ -351,7 +410,7 @@ NEW FEATURES:
351410

352411
* Add 'intrusiveness' parameter that specifies how intrusive/disruptive a
353412
certain progress reporter is. For instance, an auditory reporter is
354-
relatively more distruptive than a visual progress bar part of the
413+
relatively more disruptive than a visual progress bar part of the
355414
status bar.
356415

357416
* Simplified the API for creating new types of progress reporters.
@@ -382,7 +441,7 @@ NEW FEATURES:
382441
updates are rendered.
383442

384443
* Add 'progressr.interval' for controlling the minimum number of seconds
385-
that needs to ellapse before reporting on the next update.
444+
that needs to elapse before reporting on the next update.
386445

387446

388447
Version: 0.0.0-9000 [2019-04-11]

0 commit comments

Comments
 (0)