From 8666fb5fa38f1278c918c79472be48938b281c6e Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:27:51 +0100 Subject: [PATCH 01/11] init --- .github/workflows/check-link-rot.yml | 49 +++++++++++++++++++++++++ .github/workflows/check-spelling.yml | 49 +++++++++++++++++++++++++ .github/workflows/html-5-check.yml | 54 ++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 .github/workflows/check-link-rot.yml create mode 100644 .github/workflows/check-spelling.yml create mode 100644 .github/workflows/html-5-check.yml diff --git a/.github/workflows/check-link-rot.yml b/.github/workflows/check-link-rot.yml new file mode 100644 index 00000000..fefcd848 --- /dev/null +++ b/.github/workflows/check-link-rot.yml @@ -0,0 +1,49 @@ +name: check-link-rot + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + check-link-rot: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + with: + pandoc-version: "latest" + + - uses: r-lib/actions/setup-r@v2 + with: + #r-version: "devel" + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + pak-version: devel + upgrade: "TRUE" + cache-version: 2 + dependencies: '"hard"' + extra-packages: | + any::rcmdcheck + r-lib/urlchecker + + - name: Run URL checker + run: | + options(crayon.enabled = TRUE) + rotten_links <- urlchecker::url_check(progress = FALSE) + print(rotten_links) + if (length(rotten_links$URL) > 0L) { + cli::cli_abort("Some URLs are outdated and need to be updated.") + } + shell: Rscript {0} diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml new file mode 100644 index 00000000..0ec2f2f3 --- /dev/null +++ b/.github/workflows/check-spelling.yml @@ -0,0 +1,49 @@ +name: check-spelling + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + check-spelling: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + with: + pandoc-version: "latest" + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + pak-version: devel + upgrade: "TRUE" + cache-version: 2 + dependencies: '"hard"' + extra-packages: | + any::rcmdcheck + any::rlang + any::spelling + + - name: Spell check + run: | + options(crayon.enabled = TRUE) + spelling_mistakes <- spelling::spell_check_package() + cli::cli_rule() + if (length(spelling_mistakes$word) > 0L) { + print(spelling_mistakes) + cli::cli_abort("Spelling errors found. Either correct them or update `inst/WORDLIST` using `spelling::update_wordlist()`.") + } else { + cli::cli_alert_success("No spelling errors found.") + } + cli::cli_rule() + shell: Rscript {0} diff --git a/.github/workflows/html-5-check.yml b/.github/workflows/html-5-check.yml new file mode 100644 index 00000000..6f3dd3f0 --- /dev/null +++ b/.github/workflows/html-5-check.yml @@ -0,0 +1,54 @@ +name: html-5-check + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + html-5-check: + runs-on: ubuntu-latest + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + #_R_CHECK_RD_VALIDATE_RD2HTML_: true + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + #r-version: "devel" + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + pak-version: devel + upgrade: "TRUE" + cache-version: 2 + extra-packages: | + any::rcmdcheck + any::V8 + dependencies: "character()" + + - name: Install pdflatex + run: sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra + + - name: Install tidy + run: sudo apt install tidy + + - uses: r-lib/actions/check-r-package@v2 + with: + args: 'c("--as-cran", "--no-codoc", "--no-examples", "--no-tests", "--no-vignettes", "--no-build-vignettes", "--ignore-vignettes", "--no-install")' + build_args: 'c("--no-build-vignettes")' + error-on: '"note"' + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + _R_CHECK_CRAN_INCOMING_: false + _R_CHECK_RD_XREFS_: false From ecae0008beb4b86108782c265feadfd71ca4f2ab Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:33:52 +0100 Subject: [PATCH 02/11] more --- .github/workflows/check-link-rot.yml | 4 +++- .github/workflows/check-spelling.yml | 3 +++ .github/workflows/check.yml | 2 +- .github/workflows/html-5-check.yml | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-link-rot.yml b/.github/workflows/check-link-rot.yml index fefcd848..23775c21 100644 --- a/.github/workflows/check-link-rot.yml +++ b/.github/workflows/check-link-rot.yml @@ -25,8 +25,10 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: - #r-version: "devel" use-public-rspm: true + extra-repositories: 'https://community.r-multiverse.org' + env: + NOT_CRAN: true - uses: r-lib/actions/setup-r-dependencies@v2 with: diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml index 0ec2f2f3..d09a5e5c 100644 --- a/.github/workflows/check-spelling.yml +++ b/.github/workflows/check-spelling.yml @@ -22,6 +22,9 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + extra-repositories: 'https://community.r-multiverse.org' + env: + NOT_CRAN: true - uses: r-lib/actions/setup-r-dependencies@v2 with: diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index b2ea6bcf..2eea885d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: include: - - {os: macOS-12, r: 'release'} + - {os: macOS-latest, r: 'release'} - {os: ubuntu-latest, r: 'release'} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/html-5-check.yml b/.github/workflows/html-5-check.yml index 6f3dd3f0..47d286cd 100644 --- a/.github/workflows/html-5-check.yml +++ b/.github/workflows/html-5-check.yml @@ -24,8 +24,10 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: - #r-version: "devel" use-public-rspm: true + extra-repositories: 'https://community.r-multiverse.org' + env: + NOT_CRAN: true - uses: r-lib/actions/setup-r-dependencies@v2 with: From 0ffad2643fd68ab113238765543f499de1e50eb0 Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:42:55 +0100 Subject: [PATCH 03/11] do not install deps for cheking links and spelling --- .github/workflows/check-link-rot.yml | 14 +------------- .github/workflows/check-spelling.yml | 17 ++--------------- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/.github/workflows/check-link-rot.yml b/.github/workflows/check-link-rot.yml index 23775c21..896f64da 100644 --- a/.github/workflows/check-link-rot.yml +++ b/.github/workflows/check-link-rot.yml @@ -26,22 +26,10 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - extra-repositories: 'https://community.r-multiverse.org' - env: - NOT_CRAN: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - pak-version: devel - upgrade: "TRUE" - cache-version: 2 - dependencies: '"hard"' - extra-packages: | - any::rcmdcheck - r-lib/urlchecker - name: Run URL checker run: | + install.packages("urlchecker", "cli") options(crayon.enabled = TRUE) rotten_links <- urlchecker::url_check(progress = FALSE) print(rotten_links) diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml index d09a5e5c..ed17fd64 100644 --- a/.github/workflows/check-spelling.yml +++ b/.github/workflows/check-spelling.yml @@ -22,23 +22,10 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - extra-repositories: 'https://community.r-multiverse.org' - env: - NOT_CRAN: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - pak-version: devel - upgrade: "TRUE" - cache-version: 2 - dependencies: '"hard"' - extra-packages: | - any::rcmdcheck - any::rlang - any::spelling - + - name: Spell check run: | + install.packages("spelling", "cli") options(crayon.enabled = TRUE) spelling_mistakes <- spelling::spell_check_package() cli::cli_rule() From 2501e6a3540d8b45c861f3df4f79e766e2aa38af Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:44:41 +0100 Subject: [PATCH 04/11] typo --- .github/workflows/{check.yml => R-CMD-check.yml} | 0 .github/workflows/check-link-rot.yml | 2 +- .github/workflows/check-spelling.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{check.yml => R-CMD-check.yml} (100%) diff --git a/.github/workflows/check.yml b/.github/workflows/R-CMD-check.yml similarity index 100% rename from .github/workflows/check.yml rename to .github/workflows/R-CMD-check.yml diff --git a/.github/workflows/check-link-rot.yml b/.github/workflows/check-link-rot.yml index 896f64da..95cbe166 100644 --- a/.github/workflows/check-link-rot.yml +++ b/.github/workflows/check-link-rot.yml @@ -29,7 +29,7 @@ jobs: - name: Run URL checker run: | - install.packages("urlchecker", "cli") + install.packages(c("urlchecker", "cli")) options(crayon.enabled = TRUE) rotten_links <- urlchecker::url_check(progress = FALSE) print(rotten_links) diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml index ed17fd64..c699c377 100644 --- a/.github/workflows/check-spelling.yml +++ b/.github/workflows/check-spelling.yml @@ -25,7 +25,7 @@ jobs: - name: Spell check run: | - install.packages("spelling", "cli") + install.packages(c("spelling", "cli")) options(crayon.enabled = TRUE) spelling_mistakes <- spelling::spell_check_package() cli::cli_rule() From 12b312a98d5b8aaf435337cac836c429c301a322 Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:48:39 +0100 Subject: [PATCH 05/11] fix --- R/as_tibble.R | 5 ++- inst/WORDLIST | 68 +++++++++++++++++++++++++++++++++++++ man/as_tibble.tidypolars.Rd | 2 +- 3 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 inst/WORDLIST diff --git a/R/as_tibble.R b/R/as_tibble.R index 9c714bea..ce88a878 100644 --- a/R/as_tibble.R +++ b/R/as_tibble.R @@ -17,7 +17,7 @@ #' `int64` values will depend on the options set in `polars`. Use #' `options(polars.int64_conversion =)` to specify how int64 variables should #' be handled. See the [documentation in -#' `polars`](https://rpolars.github.io/man/polars_options.html#details) for +#' `polars`](https://rpolars.github.io/man/polars_options.html) for #' the possible options. #' #' @export @@ -29,8 +29,7 @@ as_tibble.tidypolars <- function( x, int64_conversion = polars::polars_options()$int64_conversion, - ... - ) { + ...) { dplyr::as_tibble(as.data.frame(x, int64_conversion = int64_conversion, ...)) } diff --git a/inst/WORDLIST b/inst/WORDLIST new file mode 100644 index 00000000..ca78e3a5 --- /dev/null +++ b/inst/WORDLIST @@ -0,0 +1,68 @@ +Acknowledgements +Appsilon +BOM +Codecov +DataFrame +DataFrames +DataType +Datetime +DuckDB +GCP +Github +Hałun +HuggingFace +IPC +JSON +LazyFrame +LazyFrames +Lossy +NDJSON +Polars +Tidyverse +UDF +UDFs +Uncount +aren +autogenerated +aws +brotli +chrono +csv +datatypes +datetime +deprecations +downup +dplyr +dtype +dtypes +equalities +gcp +globbing +gzip +ipc +json +lz +lzo +markfairbanks +maths +natively +ndjson +nows +occurence +ofccurences +parallelizes +polars +prefiltered +rechunk +regexes +repo +subplans +tibble +tidyselect +tidyverse +timeunit +ungrouped +upcast +updown +vectorised +zstd diff --git a/man/as_tibble.tidypolars.Rd b/man/as_tibble.tidypolars.Rd index 5dd5e5ea..2b357e7f 100644 --- a/man/as_tibble.tidypolars.Rd +++ b/man/as_tibble.tidypolars.Rd @@ -27,7 +27,7 @@ in R (the package \code{bit64} helps with that). Since \code{tidypolars} is simply a wrapper around \code{polars}, the behavior of \code{int64} values will depend on the options set in \code{polars}. Use \code{options(polars.int64_conversion =)} to specify how int64 variables should -be handled. See the \href{https://rpolars.github.io/man/polars_options.html#details}{documentation in \code{polars}} for +be handled. See the \href{https://rpolars.github.io/man/polars_options.html}{documentation in \code{polars}} for the possible options. } From 83175b89fe43c602fa42d464d6d10877106c2d96 Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:49:32 +0100 Subject: [PATCH 06/11] don't need pandoc --- .github/workflows/check-link-rot.yml | 4 ---- .github/workflows/check-spelling.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/check-link-rot.yml b/.github/workflows/check-link-rot.yml index 95cbe166..c5ad93ce 100644 --- a/.github/workflows/check-link-rot.yml +++ b/.github/workflows/check-link-rot.yml @@ -19,10 +19,6 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v2 - with: - pandoc-version: "latest" - - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml index c699c377..2f3a3689 100644 --- a/.github/workflows/check-spelling.yml +++ b/.github/workflows/check-spelling.yml @@ -15,10 +15,6 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v2 - with: - pandoc-version: "latest" - - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true From c0d99c83dc868db67f10f199ea710d53ff75f3f6 Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:50:55 +0100 Subject: [PATCH 07/11] simplify --- .github/workflows/check-link-rot.yml | 3 --- .github/workflows/check-spelling.yml | 7 ++++--- .github/workflows/html-5-check.yml | 5 ----- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check-link-rot.yml b/.github/workflows/check-link-rot.yml index c5ad93ce..be13be87 100644 --- a/.github/workflows/check-link-rot.yml +++ b/.github/workflows/check-link-rot.yml @@ -13,9 +13,6 @@ concurrency: jobs: check-link-rot: runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml index 2f3a3689..18511c71 100644 --- a/.github/workflows/check-spelling.yml +++ b/.github/workflows/check-spelling.yml @@ -6,12 +6,13 @@ on: pull_request: branches: [main, master] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + jobs: check-spelling: runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/html-5-check.yml b/.github/workflows/html-5-check.yml index 47d286cd..7f9da90c 100644 --- a/.github/workflows/html-5-check.yml +++ b/.github/workflows/html-5-check.yml @@ -14,11 +14,6 @@ jobs: html-5-check: runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - #_R_CHECK_RD_VALIDATE_RD2HTML_: true - steps: - uses: actions/checkout@v4 From 2cdbd7a8588384719904b8ee649fc89fa64683a5 Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:51:44 +0100 Subject: [PATCH 08/11] pandoc needed actually --- .github/workflows/check-link-rot.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check-link-rot.yml b/.github/workflows/check-link-rot.yml index be13be87..061513ca 100644 --- a/.github/workflows/check-link-rot.yml +++ b/.github/workflows/check-link-rot.yml @@ -15,6 +15,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: r-lib/actions/setup-pandoc@v2 + with: + pandoc-version: "latest" - uses: r-lib/actions/setup-r@v2 with: From 0510055fe189c0a342f70fdec62130a5ae87771a Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:53:42 +0100 Subject: [PATCH 09/11] fix --- R/as_tibble.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/as_tibble.R b/R/as_tibble.R index ce88a878..5b5f541b 100644 --- a/R/as_tibble.R +++ b/R/as_tibble.R @@ -17,7 +17,7 @@ #' `int64` values will depend on the options set in `polars`. Use #' `options(polars.int64_conversion =)` to specify how int64 variables should #' be handled. See the [documentation in -#' `polars`](https://rpolars.github.io/man/polars_options.html) for +#' `polars`](https://pola-rs.github.io/r-polars/man/polars_options.html) for #' the possible options. #' #' @export From a9c84b08a24179fd4f34854f079a934f50cd7820 Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 10:55:56 +0100 Subject: [PATCH 10/11] fix --- man/as_tibble.tidypolars.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/as_tibble.tidypolars.Rd b/man/as_tibble.tidypolars.Rd index 2b357e7f..6af0d232 100644 --- a/man/as_tibble.tidypolars.Rd +++ b/man/as_tibble.tidypolars.Rd @@ -27,7 +27,7 @@ in R (the package \code{bit64} helps with that). Since \code{tidypolars} is simply a wrapper around \code{polars}, the behavior of \code{int64} values will depend on the options set in \code{polars}. Use \code{options(polars.int64_conversion =)} to specify how int64 variables should -be handled. See the \href{https://rpolars.github.io/man/polars_options.html}{documentation in \code{polars}} for +be handled. See the \href{https://pola-rs.github.io/r-polars/man/polars_options.html}{documentation in \code{polars}} for the possible options. } From afec8d871a43c1e7d20e5c8faebd86a3467d0d10 Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Thu, 21 Nov 2024 11:01:11 +0100 Subject: [PATCH 11/11] drop the html5 check --- .github/workflows/html-5-check.yml | 51 ------------------------------ 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/html-5-check.yml diff --git a/.github/workflows/html-5-check.yml b/.github/workflows/html-5-check.yml deleted file mode 100644 index 7f9da90c..00000000 --- a/.github/workflows/html-5-check.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: html-5-check - -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} - cancel-in-progress: true - -jobs: - html-5-check: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - extra-repositories: 'https://community.r-multiverse.org' - env: - NOT_CRAN: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - pak-version: devel - upgrade: "TRUE" - cache-version: 2 - extra-packages: | - any::rcmdcheck - any::V8 - dependencies: "character()" - - - name: Install pdflatex - run: sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra - - - name: Install tidy - run: sudo apt install tidy - - - uses: r-lib/actions/check-r-package@v2 - with: - args: 'c("--as-cran", "--no-codoc", "--no-examples", "--no-tests", "--no-vignettes", "--no-build-vignettes", "--ignore-vignettes", "--no-install")' - build_args: 'c("--no-build-vignettes")' - error-on: '"note"' - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - _R_CHECK_CRAN_INCOMING_: false - _R_CHECK_RD_XREFS_: false