From 5e9dfa2f8ea1230c32b54aae25eefec0b203de9c Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar (UMass)" Date: Fri, 20 Sep 2024 07:59:45 -0700 Subject: [PATCH 1/5] add release-based workflows --- .github/workflows/R-CMD-check.yaml | 29 +++++++++++++++++++++------- .github/workflows/test-coverage.yaml | 3 ++- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index bd3ca249..5d0b13e0 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -5,8 +5,9 @@ on: branches: [main, master] pull_request: branches: [main, master] + workflow_dispatch: schedule: - - cron: '0 0 * * *' + - cron: "47 14 * * 1" # <=== Set to run at 14:47 on Mondays (avoiding 00:00 and top of the hour runs gives us a better chance for getting server time) name: R-CMD-check @@ -31,21 +32,35 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v4 + - id: checkout + uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v2 + - name: Setup for Hotfix/Release Testing + id: release-setup + if: "${{ contains(github.event.pull_request.head.ref, '/hotfix/') || contains(github.event.pull_request.head.ref, '/release/') }}" + run: | + # remove the remote declarations from the DESCRIPTION so that we + # test the released version + sed -i -e '/ hubverse-org/d' DESCRIPTION - - uses: r-lib/actions/setup-r@v2 + - id: setup-pandoc + uses: r-lib/actions/setup-pandoc@v2 + + - id: setup-r + 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 + extra-repositories: https://hubverse-org.r-universe.dev - - uses: r-lib/actions/setup-r-dependencies@v2 + - id: fetch-dependencies + uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck, any::tzdb + extra-packages: any::rcmdcheck needs: check - - uses: r-lib/actions/check-r-package@v2 + - id: check + uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 960234cd..b1d9faed 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -20,6 +20,7 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + extra-repositories: https://hubverse-org.r-universe.dev - uses: r-lib/actions/setup-r-dependencies@v2 with: @@ -39,7 +40,7 @@ jobs: if: always() run: | ## -------------------------------------------------------------------- - find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true + find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true shell: bash - name: Upload test results From fc3aa6e71769ca60c846d5e8693fe3699715120d Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar (UMass)" Date: Fri, 20 Sep 2024 09:26:47 -0700 Subject: [PATCH 2/5] update installation instructions --- README.Rmd | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/README.Rmd b/README.Rmd index fdd3d4e9..4cc0e68c 100644 --- a/README.Rmd +++ b/README.Rmd @@ -4,7 +4,7 @@ output: github_document -```{r, include = FALSE} +```{r, include=FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", @@ -16,37 +16,49 @@ knitr::opts_chunk$set( # hubValidations hubValidations website + [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![Codecov test coverage](https://codecov.io/gh/hubverse-org/hubValidations/branch/main/graph/badge.svg)](https://app.codecov.io/gh/hubverse-org/hubValidations?branch=main) [![R-CMD-check](https://github.com/hubverse-org/hubValidations/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hubverse-org/hubValidations/actions/workflows/R-CMD-check.yaml) + The goal of hubValidations is to provide a testing framework for performing hubverse hub validations. ## Installation -You can install the development version of hubValidations like so: +### Latest + +You can install the [latest version of hubValidations from the R-universe](https://hubverse-org.r-universe.dev/hubAdmin): + +```r +install.packages("hubValidations", repos = c("https://hubverse-org.r-universe.dev", "https://cloud.r-project.org")) +``` + +### Development + +If you want to test out new features that have not yet been released, you can install the development version of hubValidations from [GitHub](https://github.com/) with: -``` r +```r remotes::install_github("hubverse-org/hubValidations") ``` -> ##### 💡 TIP +> [!NOTE] +> > `hubValidations` has a dependency on the `arrow` package. For troubleshooting `arrow` installation problems, please consult the [`arrow` package documentation](https://arrow.apache.org/docs/r/#installation). -> +> > You could also try installing the package from the [Apache R Universe repository](https://apache.r-universe.dev) with: -> +> > ```r > install.packages("arrow", repos = c("https://apache.r-universe.dev", "https://cran.r-project.org")) > ``` -*** +*** ## Code of Conduct Please note that the hubValidations package is released with a [Contributor Code of Conduct](.github/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms. - ## Contributing Interested in contributing back to the open-source Hubverse project? @@ -54,5 +66,7 @@ Learn more about how to [get involved in the Hubverse Community](https://hubvers ### Contributing new check functions -If submitting a new check function, please ensure you update `inst/check_table.csv` with metadata about the check. +If submitting a new check function, please ensure you update `inst/check_table.csv` with metadata about the check. See our [contributing guidelines](.github/CONTRIBUTING.md) for more details. + + From 1f5e37eea75bfe14f17591480659a780c5af1d33 Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar (UMass)" Date: Fri, 20 Sep 2024 09:33:29 -0700 Subject: [PATCH 3/5] render README --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c673ae9c..1f6072a9 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](h [![Codecov test coverage](https://codecov.io/gh/hubverse-org/hubValidations/branch/main/graph/badge.svg)](https://app.codecov.io/gh/hubverse-org/hubValidations?branch=main) [![R-CMD-check](https://github.com/hubverse-org/hubValidations/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hubverse-org/hubValidations/actions/workflows/R-CMD-check.yaml) + The goal of hubValidations is to provide a testing framework for @@ -17,13 +18,26 @@ performing hubverse hub validations. ## Installation -You can install the development version of hubValidations like so: +### Latest + +You can install the [latest version of hubValidations from the +R-universe](https://hubverse-org.r-universe.dev/hubAdmin): + +``` r +install.packages("hubValidations", repos = c("https://hubverse-org.r-universe.dev", "https://cloud.r-project.org")) +``` + +### Development + +If you want to test out new features that have not yet been released, +you can install the development version of hubValidations from +[GitHub](https://github.com/) with: ``` r remotes::install_github("hubverse-org/hubValidations") ``` -> ##### 💡 TIP +> \[!NOTE\] > > `hubValidations` has a dependency on the `arrow` package. For > troubleshooting `arrow` installation problems, please consult the @@ -49,8 +63,8 @@ contributing to this project, you agree to abide by its terms. Interested in contributing back to the open-source Hubverse project? Learn more about how to [get involved in the Hubverse -Community](https://hubverse.io/en/latest/overview/contribute.html) -or [how to contribute to hubValidations](.github/CONTRIBUTING.md). +Community](https://hubverse.io/en/latest/overview/contribute.html) or +[how to contribute to hubValidations](.github/CONTRIBUTING.md). ### Contributing new check functions From 1af8285dd7dc32f5940b72c7ee08df4cf8b8a6b7 Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar (UMass)" Date: Fri, 20 Sep 2024 09:47:10 -0700 Subject: [PATCH 4/5] use development mode for pages --- _pkgdown.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_pkgdown.yml b/_pkgdown.yml index 18b36391..f4ee35ca 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -65,3 +65,6 @@ navbar: - text: ------- - text: Including custom validation functions href: articles/custom-functions.html +development: + mode: auto + From 00e046c0942d24e77d121c69aa8414796a680150 Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar" Date: Tue, 24 Sep 2024 09:29:20 -0700 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Evan Ray --- README.Rmd | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.Rmd b/README.Rmd index 4cc0e68c..a6d1a5e8 100644 --- a/README.Rmd +++ b/README.Rmd @@ -29,7 +29,7 @@ The goal of hubValidations is to provide a testing framework for performing hubv ### Latest -You can install the [latest version of hubValidations from the R-universe](https://hubverse-org.r-universe.dev/hubAdmin): +You can install the [latest version of hubValidations from the R-universe](https://hubverse-org.r-universe.dev/hubValidations): ```r install.packages("hubValidations", repos = c("https://hubverse-org.r-universe.dev", "https://cloud.r-project.org")) diff --git a/README.md b/README.md index 1f6072a9..6e0c369b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ performing hubverse hub validations. ### Latest You can install the [latest version of hubValidations from the -R-universe](https://hubverse-org.r-universe.dev/hubAdmin): +R-universe](https://hubverse-org.r-universe.dev/hubValidations): ``` r install.packages("hubValidations", repos = c("https://hubverse-org.r-universe.dev", "https://cloud.r-project.org"))