Skip to content

Commit

Permalink
Merge branch 'release/0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Dec 11, 2020
2 parents ed9c86b + f73e681 commit 61355f9
Show file tree
Hide file tree
Showing 77 changed files with 3,248 additions and 962 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Expand Up @@ -20,7 +20,6 @@ jobs:
- { os: macOS-latest, r: '3.6'}
- { os: macOS-latest, r: '4.0'}
- { os: macOS-latest, r: 'devel'}
- { os: ubuntu-16.04, r: '3.4', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
- { os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
- { os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
- { os: ubuntu-16.04, r: '4.0', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
Expand Down Expand Up @@ -78,6 +77,8 @@ jobs:
shell: Rscript {0}

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

Expand Down
147 changes: 101 additions & 46 deletions CONDUCT.md
@@ -1,74 +1,129 @@

# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to a positive environment for our
community include:

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

Examples of unacceptable behavior by participants include:
Examples of unacceptable behavior include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
## Enforcement Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

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

## Scope

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

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported to the project lead.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [https://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
11 changes: 7 additions & 4 deletions DESCRIPTION
@@ -1,25 +1,28 @@
Package: progressr
Version: 0.6.0
Title: A Inclusive, Unifying API for Progress Updates
Version: 0.7.0
Title: An Inclusive, Unifying API for Progress Updates
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.
Authors@R: c(
person("Henrik", "Bengtsson", role=c("aut", "cre", "cph"),
email = "henrikb@braju.com"))
License: GPL (>= 3)
Depends:
R (>= 3.5.0)
Imports:
digest,
utils
Suggests:
graphics,
tcltk,
beepr,
crayon,
pbmcapply,
progress,
purrr,
foreach,
plyr,
doFuture,
future (>= 1.16.0),
future,
future.apply,
furrr,
shiny,
Expand All @@ -29,5 +32,5 @@ Suggests:
VignetteBuilder: progressr
URL: https://github.com/HenrikBengtsson/progressr
BugReports: https://github.com/HenrikBengtsson/progressr/issues
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
Roxygen: list(markdown = TRUE)
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -7,3 +7,7 @@ vignettes/progressr-intro.md: OVERVIEW.md vignettes/incl/clean.css
sed -i 's/vignettes\///g' $@

vigs: vignettes/progressr-intro.md

spelling:
$(R_SCRIPT) -e "spelling::spell_check_package()"
$(R_SCRIPT) -e "spelling::spell_check_files(c('NEWS', dir('vignettes', pattern='[.](md|rsp)$$', full.names=TRUE)), ignore=readLines('inst/WORDLIST', warn=FALSE))"
2 changes: 2 additions & 0 deletions NAMESPACE
@@ -1,5 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method(conditionMessage,progression)
S3method(print,progression)
S3method(print,progression_handler)
S3method(print,progressor)
Expand All @@ -9,6 +10,7 @@ export(handler_debug)
export(handler_filesize)
export(handler_newline)
export(handler_notifier)
export(handler_pbcol)
export(handler_pbmcapply)
export(handler_progress)
export(handler_shiny)
Expand Down
79 changes: 69 additions & 10 deletions NEWS
@@ -1,16 +1,75 @@
Package: progressr
==================

Version: 0.7.0 [2020-12-11]

SIGNIFICANT CHANGES:

* The user can how use handlers(global = TRUE) to enable progress reports
everywhere without having to use with_progress(). This only works in
R (>= 4.0.0) because it requires global calling handlers.

* with_progress() now reports on progress from multiple consecutive
progressors, e.g. with_progress({ a <- slow_sum(1:3); b <- slow_sum(1:3) }).

* A progressor must not be created in the global environment unless wrapped
in with_progress() or without_progress() call. Ideally, a progressor is
created within a function or a local() environment.

* Package now requires R (>= 3.5.0) in order to protect against interrupts.

NEW FEATURES:

* progressor() gained argument 'enable' to control whether or not the
progressor signals 'progression' conditions. It defaults to option
'progressr.enable' so that progress updates can be disabled globally.
The 'enable' argument makes it easy for package developers who already
provide a 'progress = TRUE/FALSE' argument in their functions to migrate
to the 'progressr' package without having to change their existing API,
e.g. the setup becomes 'p <- progressor(along = x, enabled = progress)'.
The p() function created by p <- progressor(..., enable = FALSE) is an
empty function with near-zero overhead.

* Now with_progress() and without_progress() returns the value of the
evaluated expression.

* The progression message can now be created dynamically based on the
information in the 'progression' condition. Specifically, if 'message' is
a function, then that function will called with the 'progression' condition
as the first argument. This function should return a character string.
Importantly, it is only when the progression handler receives the
progression update and calls conditionMessage(p) on it that this function
is called.

* progressor() gained argument 'message' to set the default message of all
progression updates, unless otherwise specified.

* progressor() gained argument 'on_exit = TRUE'.

* Now the 'progress' handler shows also a spinner by default.

* Add the 'pbcol' handler, which renders the progress as a colored progress
bar in the terminal with any messages written in the front.

* Progression handlers now return invisibly whether or not they are finished.

BUG FIXES:

* Zero-amount progress updates never reached the progress handlers.

* Argument 'enable' for with_progress() had no effect.


Version: 0.6.0 [2020-05-18]

SIGNIFICANT CHANGES:

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

NEW FEATURES:

Expand All @@ -36,7 +95,7 @@ NEW FEATURES:
BUG FIXES:

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

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

NEW FEATURES:

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

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

* Now progression handlers ignore a re-signalled progression condition if it
* Now progression handlers ignore a re-signaled progression condition if it
has already been processed previously.

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

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

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

* Add 'progressr.interval' for controlling the minimum number of seconds
that needs to ellapse before reporting on the next update.
that needs to elapse before reporting on the next update.


Version: 0.0.0-9000 [2019-04-11]
Expand Down

0 comments on commit 61355f9

Please sign in to comment.