From e1fba8e685401e7944df176d0f31425c40a7f47c Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Mon, 28 Oct 2024 00:33:46 -0700 Subject: [PATCH] Transfer GitHub repo HenrikBengtsson/progressr to futureverse/progressr --- .github/workflows/R-CMD-check.yaml | 2 - .github/workflows/covr.yaml | 84 ---------------------------- .github/workflows/test-coverage.yaml | 56 +++++++++++++++++++ CONTRIBUTING.md | 4 +- DESCRIPTION | 6 +- R/handler_filesize.R | 2 +- README.md | 6 +- incl/OVERVIEW.md | 2 +- pkgdown/_pkgdown.yml | 2 +- vignettes/progressr-intro.md | 2 +- 10 files changed, 68 insertions(+), 98 deletions(-) delete mode 100644 .github/workflows/covr.yaml create mode 100644 .github/workflows/test-coverage.yaml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 29c2cec4..07c8c93c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -38,8 +38,6 @@ jobs: LANGUAGE: ${{ matrix.config.language }} ## R CMD check _R_CHECK_CRAN_INCOMING_: false - _R_CHECK_LENGTH_1_CONDITION_: true - _R_CHECK_LENGTH_1_LOGIC2_: true _R_CHECK_MATRIX_DATA_: true _R_CHECK_SUGGESTS_ONLY_: true _R_CHECK_THINGS_IN_TEMP_DIR_: true diff --git a/.github/workflows/covr.yaml b/.github/workflows/covr.yaml deleted file mode 100644 index 302000e9..00000000 --- a/.github/workflows/covr.yaml +++ /dev/null @@ -1,84 +0,0 @@ -on: [push] - -name: covr - -jobs: - covr: - if: "! contains(github.event.head_commit.message, '[ci skip]')" - - timeout-minutes: 10 - - runs-on: ubuntu-latest - - name: covr - - strategy: - fail-fast: false - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - ## R CMD check - _R_CHECK_CRAN_INCOMING_: false - _R_CHECK_LENGTH_1_CONDITION_: true - _R_CHECK_LENGTH_1_LOGIC2_: true - _R_CHECK_MATRIX_DATA_: true - _R_CHECK_SUGGESTS_ONLY_: true - _R_CHECK_THINGS_IN_TEMP_DIR_: true - - steps: - - uses: actions/checkout@v3 - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: release - - - 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 - uses: actions/cache@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 - 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" - - - name: Install dependencies - run: | - install.packages(c("covr", "sessioninfo")) - remotes::install_deps(dependencies = TRUE) - install.packages(".", repos=NULL, type="source") - shell: Rscript {0} - - - name: Session info - run: | - options(width = 100) - pkgs <- installed.packages()[, "Package"] - sessioninfo::session_info(pkgs, include_base = TRUE) - shell: Rscript {0} - - - name: Test coverage - run: | - ## 1. Get 'Repository Upload Token' from Codecov: - ## https://app.codecov.io/gh///settings - ## 2. Set 'CODECOV_TOKEN' in GitHub Secrets: - ## https://github.com///settings/environments/ - coverage <- covr::package_coverage() - print(coverage) - covr::codecov(coverage = coverage, token="${{secrets.CODECOV_TOKEN}}") - shell: Rscript {0} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml new file mode 100644 index 00000000..cd2c74a8 --- /dev/null +++ b/.github/workflows/test-coverage.yaml @@ -0,0 +1,56 @@ +on: [push] + +name: test-coverage.yaml + +permissions: read-all + +jobs: + test-coverage: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v4 + + - name: Assert CODECOV_TOKEN is set + run: | + if [[ -z "${{secrets.CODECOV_TOKEN}}" ]]; then + >&2 echo "::error::ERROR: 'secrets.CODECOV_TOKEN' not set" + exit 1 + fi + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::covr, any::xml2 + needs: coverage + + - name: Test coverage + run: | + cov <- covr::package_coverage( + quiet = FALSE, + clean = FALSE, + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") + ) + print(cov) + covr::to_cobertura(cov) + shell: Rscript {0} + + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} + file: ./cobertura.xml + plugin: noop + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: coverage-test-failures + path: ${{ runner.temp }}/package diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b99a84da..71af02b0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ # Contributing to the 'progressr' package -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). +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/futureverse/progressr/tree/develop) branch contains the latest contributions and other code that will appear in the next release, and the [`master`](https://github.com/futureverse/progressr) branch contains the code of the latest release, which is exactly what is currently on [CRAN](https://cran.r-project.org/package=progressr). -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 GitHub Actions and when the PR is submitted. +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/futureverse/progressr). Your PR should pass `R CMD check --as-cran`, which will also be checked by GitHub Actions and when the PR is submitted. We abide to the [Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) of Contributor Covenant. diff --git a/DESCRIPTION b/DESCRIPTION index a4d36f92..3aecdfea 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: progressr -Version: 0.14.0-9008 +Version: 0.14.0-9009 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(), cli::cli_progress_bar(), in a graphical user interface using utils::winProgressBar(), tcltk::tkProgressBar() or shiny::withProgress(), via the speakers using beepr::beep(), 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. Authors@R: c(person("Henrik", "Bengtsson", @@ -34,7 +34,7 @@ Suggests: base64enc, tools VignetteBuilder: progressr -URL: https://progressr.futureverse.org, https://github.com/HenrikBengtsson/progressr -BugReports: https://github.com/HenrikBengtsson/progressr/issues +URL: https://progressr.futureverse.org, https://github.com/futureverse/progressr +BugReports: https://github.com/futureverse/progressr/issues RoxygenNote: 7.3.2 Roxygen: list(markdown = TRUE) diff --git a/R/handler_filesize.R b/R/handler_filesize.R index c591f72c..47325978 100644 --- a/R/handler_filesize.R +++ b/R/handler_filesize.R @@ -27,7 +27,7 @@ handler_filesize <- function(file = "default.progress", intrusiveness = getOption("progressr.intrusiveness.file", 5), target = "file", enable = getOption("progressr.enable", TRUE), ...) { reporter <- local({ set_file_size <- function(config, state, progression, message = state$message) { - ## Troubleshoot https://github.com/HenrikBengtsson/progressr/issues/168 + ## Troubleshoot https://github.com/futureverse/progressr/issues/168 stop_if_not( length(config$max_steps) == 1L, is.numeric(config$max_steps), !is.na(config$max_steps), is.finite(config$max_steps), diff --git a/README.md b/README.md index e652358f..fc361deb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
-CRAN check status R CMD check status Top reverse-dependency checks status Coverage Status Life cycle: maturing +CRAN check status R CMD check status Top reverse-dependency checks status Coverage Status Life cycle: maturing
# progressr: An Inclusive, Unifying API for Progress Updates @@ -874,7 +874,7 @@ depends on it. The roadmap for developing the API is roughly: additional progression handlers For a more up-to-date view on what features might be added, see -. +. ## Appendix @@ -1054,7 +1054,7 @@ install.packages("progressr") To install the pre-release version that is available in Git branch `develop` on GitHub, use: ```r -remotes::install_github("HenrikBengtsson/progressr", ref="develop") +remotes::install_github("futureverse/progressr", ref="develop") ``` This will install the package from source. diff --git a/incl/OVERVIEW.md b/incl/OVERVIEW.md index 250fc60b..4ca505a7 100644 --- a/incl/OVERVIEW.md +++ b/incl/OVERVIEW.md @@ -866,7 +866,7 @@ depends on it. The roadmap for developing the API is roughly: additional progression handlers For a more up-to-date view on what features might be added, see -. +. ## Appendix diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index c7e78275..b27632aa 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -3,7 +3,7 @@ url: https://progressr.futureverse.org home: links: - text: Roadmap/Milestones - href: https://github.com/HenrikBengtsson/progressr/milestones + href: https://github.com/futureverse/progressr/milestones - text: The Futureverse Project href: https://www.futureverse.org/ - text: Futureverse User Forum diff --git a/vignettes/progressr-intro.md b/vignettes/progressr-intro.md index 8fa9cb80..6fbd026c 100644 --- a/vignettes/progressr-intro.md +++ b/vignettes/progressr-intro.md @@ -877,7 +877,7 @@ depends on it. The roadmap for developing the API is roughly: additional progression handlers For a more up-to-date view on what features might be added, see -. +. ## Appendix