Skip to content

Commit 16d7dcb

Browse files
Merge branch 'release/0.9.0'
2 parents 5d4eeb1 + c6f2076 commit 16d7dcb

32 files changed

+627
-263
lines changed

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

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,39 @@ name: R-CMD-check
44

55
jobs:
66
R-CMD-check:
7+
if: "! contains(github.event.head_commit.message, '[ci skip]')"
8+
79
runs-on: ${{ matrix.config.os }}
10+
811
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
9-
if: "! contains(github.event.head_commit.message, '[ci skip]')"
10-
12+
1113
strategy:
1214
fail-fast: false
1315
matrix:
1416
config:
15-
- {os: windows-latest, r: 'devel' }
17+
# - {os: windows-latest, r: 'devel'}
1618
- {os: windows-latest, r: 'release'}
17-
- {os: windows-latest, r: 'oldrel' }
18-
- {os: macOS-latest, r: 'devel' }
19-
- {os: macOS-latest, r: 'release'}
20-
- {os: macOS-latest, r: 'oldrel' }
21-
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
22-
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
23-
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
24-
- {os: ubuntu-20.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
19+
- {os: windows-latest, r: 'oldrel'}
20+
- {os: macOS-latest, r: 'devel'}
21+
#2020-09-24# - {os: macOS-latest, r: 'release'}
22+
- {os: macOS-latest, r: 'oldrel'}
23+
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
24+
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
25+
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26+
- {os: ubuntu-20.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
27+
- {os: ubuntu-20.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
2528

2629
env:
30+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
31+
RSPM: ${{ matrix.config.rspm }}
2732
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
28-
CRAN: ${{ matrix.config.cran }}
29-
30-
33+
## R CMD check
34+
_R_CHECK_CRAN_INCOMING_: false
35+
_R_CHECK_LENGTH_1_CONDITION_: true
36+
_R_CHECK_LENGTH_1_LOGIC2_: true
37+
_R_CHECK_MATRIX_DATA_: true
38+
_R_CHECK_SUGGESTS_ONLY_: true
39+
3140
steps:
3241
- uses: actions/checkout@v2
3342

@@ -49,8 +58,8 @@ jobs:
4958
uses: actions/cache@v1
5059
with:
5160
path: ${{ env.R_LIBS_USER }}
52-
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }}
53-
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-
61+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
62+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
5463

5564
- name: Install system dependencies
5665
if: runner.os == 'Linux'
@@ -65,7 +74,7 @@ jobs:
6574
run: |
6675
remotes::install_deps(dependencies = TRUE)
6776
remotes::install_cran("rcmdcheck")
68-
install.packages("progressr") ## 'self' vignette engine
77+
install.packages(".", repos = NULL, type = "source") ## self vignette engine
6978
shell: Rscript {0}
7079

7180
- name: Session info
@@ -74,10 +83,8 @@ jobs:
7483
pkgs <- installed.packages()[, "Package"]
7584
sessioninfo::session_info(pkgs, include_base = TRUE)
7685
shell: Rscript {0}
77-
86+
7887
- name: Check
79-
env:
80-
_R_CHECK_CRAN_INCOMING_: false
8188
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
8289
shell: Rscript {0}
8390

@@ -87,8 +94,3 @@ jobs:
8794
with:
8895
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
8996
path: check
90-
91-
- name: Test coverage
92-
if: matrix.config.os == 'ubuntu-16.04' && matrix.config.r == '3.6-9000'
93-
run: |
94-
Rscript -e "install.packages('covr')" -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")'

.github/workflows/covr.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
on: [push]
2+
3+
name: covr
4+
5+
jobs:
6+
covr:
7+
if: "! contains(github.event.head_commit.message, '[ci skip]')"
8+
9+
runs-on: ubuntu-20.04
10+
11+
name: covr
12+
13+
strategy:
14+
fail-fast: false
15+
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
19+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
20+
## R CMD check
21+
_R_CHECK_LENGTH_1_CONDITION_: true
22+
_R_CHECK_LENGTH_1_LOGIC2_: true
23+
_R_CHECK_MATRIX_DATA_: true
24+
_R_CHECK_CRAN_INCOMING_: false
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
29+
- uses: r-lib/actions/setup-r@master
30+
with:
31+
r-version: release
32+
33+
- uses: r-lib/actions/setup-pandoc@master
34+
35+
- name: Query dependencies
36+
run: |
37+
install.packages('remotes')
38+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
39+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
40+
shell: Rscript {0}
41+
42+
- name: Cache R packages
43+
uses: actions/cache@v1
44+
with:
45+
path: ${{ env.R_LIBS_USER }}
46+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
47+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
48+
49+
- name: Install system dependencies
50+
env:
51+
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
52+
run: |
53+
Rscript -e "remotes::install_github('r-hub/sysreqs')"
54+
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
55+
sudo -s eval "$sysreqs"
56+
57+
- name: Install dependencies
58+
run: |
59+
install.packages(c("covr", "sessioninfo"))
60+
remotes::install_deps(dependencies = TRUE)
61+
install.packages(".", repos=NULL, type="source")
62+
shell: Rscript {0}
63+
64+
- name: Session info
65+
run: |
66+
options(width = 100)
67+
pkgs <- installed.packages()[, "Package"]
68+
sessioninfo::session_info(pkgs, include_base = TRUE)
69+
shell: Rscript {0}
70+
71+
- name: Test coverage
72+
run: |
73+
## 1. Get 'Repository Upload Token' from Codecov:
74+
## https://app.codecov.io/gh/<org>/<repo>/settings
75+
## 2. Set 'CODECOV_TOKEN' in GitHub Secrets:
76+
## https://github.com/<org>/<repo>/settings/environments/
77+
coverage <- covr::package_coverage()
78+
print(coverage)
79+
covr::codecov(coverage = coverage, token="${{secrets.CODECOV_TOKEN}}")
80+
shell: Rscript {0}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
on: [push, pull_request]
2+
3+
name: revdepcheck-top
4+
5+
jobs:
6+
R-CMD-check:
7+
if: "! contains(github.event.head_commit.message, '[ci skip]')"
8+
9+
runs-on: ubuntu-20.04
10+
11+
name: ${{ matrix.config.pkg }} (${{ matrix.config.r }})
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
config:
17+
- { r: "release", pkg: "cSEM" }
18+
- { r: "release", pkg: "dipsaus" }
19+
- { r: "release", pkg: "EFAtools" }
20+
- { r: "release", pkg: "fxTWAPLS" }
21+
# - { r: "release", pkg: "gtfs2gps" }
22+
env:
23+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24+
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
25+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
26+
## R CMD check
27+
_R_CHECK_LENGTH_1_CONDITION_: true
28+
_R_CHECK_LENGTH_1_LOGIC2_: true
29+
_R_CHECK_MATRIX_DATA_: true
30+
_R_CHECK_CRAN_INCOMING_: false
31+
32+
steps:
33+
- uses: actions/checkout@v2
34+
35+
- uses: r-lib/actions/setup-r@master
36+
with:
37+
r-version: ${{ matrix.config.r }}
38+
39+
- uses: r-lib/actions/setup-pandoc@master
40+
41+
- name: Query dependencies
42+
run: |
43+
install.packages('remotes')
44+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
45+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
46+
shell: Rscript {0}
47+
48+
- name: Cache R packages
49+
if: runner.os != 'Windows'
50+
uses: actions/cache@v1
51+
with:
52+
path: ${{ env.R_LIBS_USER }}
53+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
54+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
55+
56+
- name: Install system dependencies (Linux)
57+
if: runner.os == 'Linux'
58+
env:
59+
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
60+
run: |
61+
Rscript -e "remotes::install_github('r-hub/sysreqs')"
62+
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
63+
sudo -s eval "$sysreqs"
64+
65+
- name: Install dependencies
66+
run: |
67+
remotes::install_deps(dependencies = TRUE)
68+
remotes::install_cran("rcmdcheck")
69+
remotes::install_cran("${{ matrix.config.pkg }}", dependencies=TRUE)
70+
shell: Rscript {0}
71+
72+
- name: Session info
73+
run: |
74+
options(width = 100)
75+
pkgs <- installed.packages()[, "Package"]
76+
sessioninfo::session_info(pkgs, include_base = TRUE)
77+
shell: Rscript {0}
78+
79+
- name: Check reverse dependency package
80+
run: |
81+
url=$(Rscript -e "cat(remotes:::download_version_url('${{ matrix.config.pkg }}', version=NULL, repos='https://cloud.r-project.org', type='source'))")
82+
wget "$url"
83+
R CMD check --no-manual --as-cran "$(basename "$url")"
84+
85+
- name: Upload check results
86+
if: failure()
87+
uses: actions/upload-artifact@master
88+
with:
89+
name: ${{ runner.os }}-r${{ matrix.config.r }}-revdep${{ matrix.config.pkg }}-results
90+
path: check

.travis.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
This Git repository uses the [Git Flow](https://nvie.com/posts/a-successful-git-branching-model/) branching model (the [`git flow`](https://github.com/petervanderdoes/gitflow-avh) extension is useful for this). The [`develop`](https://github.com/HenrikBengtsson/progressr/tree/develop) branch contains the latest contributions and other code that will appear in the next release, and the [`master`](https://github.com/HenrikBengtsson/progressr) branch contains the code of the latest release, which is exactly what is currently on [CRAN](https://cran.r-project.org/package=progressr).
55

6-
Contributing to this package is easy. Just send a [pull request](https://help.github.com/articles/using-pull-requests/). When you send your PR, make sure `develop` is the destination branch on the [progressr repository](https://github.com/HenrikBengtsson/progressr). Your PR should pass `R CMD check --as-cran`, which will also be checked by <a href="https://github.com/HenrikBengtsson/progressr/actions?query=workflow%3AR-CMD-check">GitHub Actions</a>, <a href="https://travis-ci.org/HenrikBengtsson/progressr">Travis CI</a>, and <a href="https://ci.appveyor.com/project/HenrikBengtsson/progressr">AppVeyor CI</a> when the PR is submitted.
6+
Contributing to this package is easy. Just send a [pull request](https://help.github.com/articles/using-pull-requests/). When you send your PR, make sure `develop` is the destination branch on the [progressr repository](https://github.com/HenrikBengtsson/progressr). Your PR should pass `R CMD check --as-cran`, which will also be checked by <a href="https://github.com/HenrikBengtsson/progressr/actions?query=workflow%3AR-CMD-check">GitHub Actions</a> and when the PR is submitted.
77

88
We abide to the [Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) of Contributor Covenant.

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: progressr
2-
Version: 0.8.0
2+
Version: 0.9.0
33
Title: An Inclusive, Unifying API for Progress Updates
4-
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.
4+
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 API:s 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]"))
@@ -33,5 +33,5 @@ Suggests:
3333
VignetteBuilder: progressr
3434
URL: https://progressr.futureverse.org, https://github.com/HenrikBengtsson/progressr
3535
BugReports: https://github.com/HenrikBengtsson/progressr/issues
36-
RoxygenNote: 7.1.1
36+
RoxygenNote: 7.1.2
3737
Roxygen: list(markdown = TRUE)

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ importFrom(digest,digest)
3434
importFrom(utils,capture.output)
3535
importFrom(utils,file_test)
3636
importFrom(utils,flush.console)
37+
importFrom(utils,object.size)
3738
importFrom(utils,setTxtProgressBar)
3839
importFrom(utils,str)
3940
importFrom(utils,txtProgressBar)

NEWS

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
Package: progressr
22
==================
33

4+
Version: 0.9.0 [2021-09-24]
5+
6+
PERFORMANCE:
7+
8+
* The progressor function created by progressor() no longer "inherit" objects
9+
from the calling environment, which would, for instance, result in those
10+
objects to be exported to parallel workers together with the progressor
11+
function, which in turn would come with large time and memory costs.
12+
13+
* progressor() no longer records the call stack for progressions by default,
14+
because that significantly increases the size of these condition objects,
15+
e.g. instead of being 5 kB it may be 500 kB. If a large number of progress
16+
updates are signaled and collected, as done, for instance, by futures, then
17+
the memory consumption on the collecting end could become very large. The
18+
large sizes would also have a negative impact on the performance in
19+
parallelization with futures because of the extra overhead of transferring
20+
these extra large conditions from the parallel workers back to the main R
21+
session. These issues has been there since progressr 0.7.0 (December 2020).
22+
To revert to the previous behavior, use progressor(..., trace = TRUE).
23+
24+
NEW FEATURES:
25+
26+
* progressor() gained argument 'trace' to control whether or not the call
27+
stack should be recorded in each progression condition.
28+
29+
* Now print() for 'progressor' functions and 'progression' conditions report
30+
also on the size of the object, i.e. the number of bytes it requires when
31+
serialized, for instance, to and from a parallel worker.
32+
33+
BUG FIXES:
34+
35+
* Registered progression handlers would report on progress also when in a
36+
_forked_ parallel child processes, e.g. when using parallel::mclapply().
37+
This would give a false impression that progressr updates would work when
38+
using parallel::mclapply(), which is not true. Note however, that it does
39+
indeed work when using the future 'multicore' backend, which uses forks.
40+
41+
442
Version: 0.8.0 [2021-06-09]
543

644
SIGNIFICANT CHANGES:

0 commit comments

Comments
 (0)