Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Mar 25, 2023
2 parents 8e6c82a + 862cf0e commit 6c02376
Show file tree
Hide file tree
Showing 53 changed files with 3,779 additions and 1,378 deletions.
11 changes: 6 additions & 5 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
^.git
^.make
^.local
INSTALL[.]md
OVERVIEW[.]md
README[.]md
CONDUCT[.]md
CONTRIBUTING[.]md
INSTALL[.]md$
OVERVIEW[.]md$
README[.]md$
CONDUCT[.]md$
CONTRIBUTING[.]md$
^docs
^pkgdown
^_pkgdown\.yml$
Expand All @@ -29,3 +29,4 @@ Rplots.pdf$
[.]Rdump/
^revdep/*
^.*[.]tar[.]gz$
^.Rdump
91 changes: 48 additions & 43 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: R-CMD-check

jobs:
R-CMD-check:
if: "! contains(github.event.head_commit.message, '[ci skip]')"
if: "! contains(github.event.head_commit.message, '[ci skip]')"

timeout-minutes: 15
timeout-minutes: 30

runs-on: ${{ matrix.config.os }}

Expand All @@ -24,18 +24,16 @@ jobs:
- {os: macOS-latest, r: 'oldrel' }
# - {os: ubuntu-20.04, r: 'devel' }
- {os: ubuntu-20.04, r: 'release' }
- {os: ubuntu-20.04, r: 'release', future_plan: 'multicore', label: 'w/ multicore' }
- {os: ubuntu-20.04, r: 'release', future_plan: 'multisession', label: 'w/ multisession' }
# - {os: ubuntu-20.04, r: 'release', future_plan: 'future.batchtools::batchtools_local', label: 'w/ batchtools_local' }
# - {os: ubuntu-20.04, r: 'release', future_plan: 'future.callr::callr', label: 'w/ callr' }
- {os: ubuntu-20.04, r: 'oldrel' }
- {os: ubuntu-20.04, r: 'oldrel-1' }
- {os: ubuntu-20.04, r: 'oldrel-2' }
- {os: ubuntu-20.04, r: '3.4' }
- {os: ubuntu-20.04, r: 'release' , plan: multicore, label: 'w/ multicore' }
- {os: ubuntu-20.04, r: 'release' , plan: multisession, label: 'w/ multisession' }

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest
R_KEEP_PKG_SOURCE: yes
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
## R CMD check
_R_CHECK_CRAN_INCOMING_: false
Expand All @@ -44,67 +42,74 @@ jobs:
_R_CHECK_MATRIX_DATA_: true
_R_CHECK_SUGGESTS_ONLY_: true
_R_CHECK_THINGS_IN_TEMP_DIR_: true
## Specific to 'rcmdcheck'
RCMDCHECK_ERROR_ON: note
## Specific to futures
R_FUTURE_RNG_ONMISUSE: error
R_FUTURE_PLAN: ${{ matrix.config.future_plan }}
R_FUTURE_PLAN: ${{ matrix.config.plan }}
## FIXME: Eventually update to 'R_FUTURE_GLOBALS_ONREFERENCE=error'
R_FUTURE_GLOBALS_ONREFERENCE: "warning"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-pandoc@master

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
extra-packages: any::rcmdcheck
needs: check

- name: Install dependencies
- name: Install package itself (special case)
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
install.packages(".", repos = NULL, type = "source") ## needed for parallel tests
install.packages(".", repos = NULL, type = "source") ## needed by parallel workers
lapply(c("future.batchtools", "future.callr"), FUN = function(pkg) if (grepl(pkg, "${{ matrix.config.future_plan }}")) install.packages(pkg))
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
parallelly::availableCores(which = "all")
sapply(c(physical_cores = FALSE, logical_cores = TRUE), parallel::detectCores)
if (require(RhpcBLASctl, quietly=TRUE)) c(get_num_procs = get_num_procs(), get_num_cores = get_num_cores(), blas_get_num_procs = blas_get_num_procs(), omp_get_num_procs = omp_get_num_procs(), omp_get_max_threads = omp_get_max_threads())
capabilities()
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
## Verify LANGUAGE settings by generating a translatable error
cat(sprintf("LANGUAGE=%s\n", sQuote(Sys.getenv("LANGUAGE"))))
cat(sprintf("locales: %s\n", sQuote(Sys.getlocale())))
tryCatch(log("a"), error = conditionMessage)
shell: Rscript {0}

- name: Check (!Windows)
if: runner.os != 'Windows'
run: |
if (nzchar(Sys.getenv("R_FUTURE_PLAN")) || getRversion() < "3.5.0") Sys.setenv(RCMDCHECK_ERROR_ON = "error")
rcmdcheck::rcmdcheck(
build_args = if (getRversion() < "3.5.0") "--no-build-vignettes",
args = c("--no-manual", "--as-cran", if (getRversion() < "3.5.0") c("--no-vignettes", "--no-build-vignettes", "--ignore-vignettes")),
check_dir = "check"
)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "note", check_dir = "check")
- name: Check (Windows)
if: runner.os == 'Windows'
run: |
rcmdcheck::rcmdcheck(
args = c("--no-manual", "--as-cran", if (.Platform$OS.type == "windows" && getRversion() >= "4.2.0") "--no-multiarch"),
check_dir = "check"
)
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
10 changes: 5 additions & 5 deletions .github/workflows/covr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
_R_CHECK_CRAN_INCOMING_: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: release

- uses: r-lib/actions/setup-pandoc@master

- name: Query dependencies
run: |
install.packages('remotes')
Expand All @@ -42,7 +42,7 @@ jobs:
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/doFuture.tests.extra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,21 @@ jobs:
_R_CHECK_LENGTH_1_LOGIC2_: true
_R_CHECK_MATRIX_DATA_: true
_R_CHECK_CRAN_INCOMING_: false
## Specific to futures
## Specific to 'rcmdcheck'
RCMDCHECK_ERROR_ON: warning
## Specific to Futureverse
# R_FUTURE_RNG_ONMISUSE: error
_R_CHECK_FUTURE_STRATEGIES_: ${{ matrix.config.strategies }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@master

- name: Query dependencies
run: |
install.packages('remotes')
Expand All @@ -53,7 +55,7 @@ jobs:

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
Expand Down Expand Up @@ -95,7 +97,7 @@ jobs:
- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-doFuture.tests.extra-results
path: check
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Package: doFuture
Version: 0.12.2
Title: A Universal Foreach Parallel Adapter using the Future API of the 'future' Package
Version: 1.0.0
Title: Use Foreach to Parallelize via the Future Framework
Depends:
foreach (>= 1.5.0),
future (>= 1.22.1)
future (>= 1.32.0)
Imports:
future.apply,
globals,
iterators,
parallel,
Expand All @@ -17,11 +18,10 @@ VignetteBuilder:
R.rsp
Authors@R: c(person("Henrik", "Bengtsson", role=c("aut", "cre", "cph"),
email = "[email protected]"))
Description: Provides a '%dopar%' adapter such that any type of futures can
be used as backends for the 'foreach' framework.
Description: The 'future' package provides a unifying parallelization framework for R that supports many parallel and distributed backends. The 'foreach' package provides a powerful API for iterating over an R expression in parallel. The 'doFuture' package brings the best of the two together. There are two alternative ways to use this package. The first is the traditional 'foreach' approach by registering the 'foreach' adapter 'registerDoFuture()' and so that 'y <- foreach(...) %dopar% { ... }' runs in parallelizes with the 'future' framework. The other alternative is to use 'y <- foreach(...) %dofuture% { ... }', which does not require using 'registerDoFuture()' and has many advantages over '%dopar%'.
License: LGPL (>= 2.1)
LazyLoad: TRUE
URL: https://doFuture.futureverse.org, https://github.com/HenrikBengtsson/doFuture
BugReports: https://github.com/HenrikBengtsson/doFuture/issues
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include .make/Makefile

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

export("%dofuture%")
export(registerDoFuture)
export(withDoRNG)
import(future.apply)
importFrom(foreach,getErrorIndex)
importFrom(foreach,getErrorValue)
importFrom(foreach,getResult)
Expand Down
Loading

0 comments on commit 6c02376

Please sign in to comment.