From b34ba93d33028b359f91a2d91a3b94de6c226d32 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 13 Nov 2023 15:54:21 -0800 Subject: [PATCH 1/9] Add pkgdown website --- .Rbuildignore | 4 ++++ .gitignore | 1 + _pkgdown.yml | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 _pkgdown.yml diff --git a/.Rbuildignore b/.Rbuildignore index 67dd501..fcf8827 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,3 +9,7 @@ ^README\.Rmd$ ^CRAN-RELEASE$ ^\.github$ +^.*\.code-workspace$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/.gitignore b/.gitignore index 89fbe6c..c78e5fe 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ .DS_Store inst/doc CRAN-RELEASE +docs diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..5f58625 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: http://r-pkg.thecoatlessprofessor.com/errorist/ +template: + bootstrap: 5 + From 5274dcccb6d40a6e4771245a5f974766252ad696 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 13 Nov 2023 15:54:31 -0800 Subject: [PATCH 2/9] Add VS code workspace --- errorist.code-workspace | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 errorist.code-workspace diff --git a/errorist.code-workspace b/errorist.code-workspace new file mode 100644 index 0000000..876a149 --- /dev/null +++ b/errorist.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file From a42fa38b13c205b31fc65ab393a896affc81b6c3 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 13 Nov 2023 15:55:09 -0800 Subject: [PATCH 3/9] Add pkgdown config --- .github/workflows/pkgdown.yaml | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/pkgdown.yaml diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..ed7650c --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,48 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs From 0816d2f847c52cb3c0069d3bb09d603cdefbbac8 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 13 Nov 2023 15:55:18 -0800 Subject: [PATCH 4/9] Add CRAN fix --- R/handlers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/handlers.R b/R/handlers.R index 5c24779..b6b64ac 100644 --- a/R/handlers.R +++ b/R/handlers.R @@ -113,7 +113,7 @@ warning_handler = function(search_func = # Determines if a warning was triggered last_warning_value = warnings() - if (!is.null(last_warning_value)) { + if (!is.null(last_warning_value) && length(last_warning_value)) { warning_contents = warning_msg_format(last_warning_value) } else { warning_contents = NA From c8456e553423565332b594fe5123120c504b56b3 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 13 Nov 2023 15:55:45 -0800 Subject: [PATCH 5/9] Formatting --- R/handlers.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/R/handlers.R b/R/handlers.R index b6b64ac..57a65e7 100644 --- a/R/handlers.R +++ b/R/handlers.R @@ -43,9 +43,14 @@ #' disable_errorist() #' @export #' @rdname errorist_init -enable_errorist = function(error_search_func = getOption("errorist.warning", searcher::search_google), - warning_search_func = getOption("errorist.warning", searcher::search_google)) { - packageStartupMessage("Warnings and errors will automatically trigger a web search.") +enable_errorist = function( + error_search_func = getOption("errorist.warning", searcher::search_google), + warning_search_func = getOption("errorist.warning", searcher::search_google)) +{ + packageStartupMessage( + "Warnings and errors will automatically trigger a web search." + ) + enable_error_shim(error_search_func) enable_warning_shim(warning_search_func) } From c583909636cb9dea9fd409b07ea7a24f5ef33d48 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 13 Nov 2023 15:55:53 -0800 Subject: [PATCH 6/9] Update URLs --- DESCRIPTION | 6 +++--- man/errorist-package.Rd | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index dcc6dc5..cee906e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: errorist Title: Automatically Search Errors or Warnings -Version: 0.1.1 +Version: 0.1.2 Authors@R: c( person("James", "Balamuta", email = "balamut2@illinois.edu", @@ -10,8 +10,8 @@ Authors@R: c( ) Description: Provides environment hooks that obtain errors and warnings which occur during the execution of code to automatically search for solutions. -URL: https://github.com/r-assist/errorist -BugReports: https://github.com/r-assist/errorist/issues +URL: https://github.com/coatless-rpkg/errorist, http://r-pkg.thecoatlessprofessor.com/errorist/ +BugReports: https://github.com/coatless-rpkg/errorist/issues Depends: R (>= 3.0.0) Imports: searcher (>= 0.0.2) Suggests: testthat, diff --git a/man/errorist-package.Rd b/man/errorist-package.Rd index fb4f9f0..9472e0c 100644 --- a/man/errorist-package.Rd +++ b/man/errorist-package.Rd @@ -11,8 +11,9 @@ Provides environment hooks that obtain errors and warnings which occur during th \seealso{ Useful links: \itemize{ - \item \url{https://github.com/r-assist/errorist} - \item Report bugs at \url{https://github.com/r-assist/errorist/issues} + \item \url{https://github.com/coatless-rpkg/errorist} + \item \url{http://r-pkg.thecoatlessprofessor.com/errorist/} + \item Report bugs at \url{https://github.com/coatless-rpkg/errorist/issues} } } From ada695faaf566b535a0261433c899e961e216ae4 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 13 Nov 2023 15:57:04 -0800 Subject: [PATCH 7/9] Add notes --- NEWS.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/NEWS.md b/NEWS.md index 98850ba..f81ce76 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,17 @@ +# errorist 0.1.2 + +## Fixes + +- Revised the warning check as empty warnings no longer have a `NULL` return. + ([#13](https://github.com/coatless-rpkg/errorist/issues/13)) + +## Deployment + +- Added pkgdown website + ([#14](https://github.com/coatless-rpkg/errorist/pull/14)) +- Updated to the latest version of `r-lib` GitHub actions. + ([#14](https://github.com/coatless-rpkg/errorist/pull/14)) + # errorist 0.1.1 ## Fixes From 2f745c3fae2972943b7ba5e4d8dd8f3968e55b8f Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 13 Nov 2023 15:57:29 -0800 Subject: [PATCH 8/9] Switch from r-assist to coatless-rpkg --- NEWS.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/NEWS.md b/NEWS.md index f81ce76..653b9f5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -17,43 +17,43 @@ ## Fixes - Switched insertion shiv `message()` to `packageStartupMessage()`. - ([#12](https://github.com/r-assist/errorist/pull/12)) + ([#12](https://github.com/coatless-rpkg/errorist/pull/12)) - Removed `LazyData: true` from `DESCRIPTION`. - ([#12](https://github.com/r-assist/errorist/pull/12)) + ([#12](https://github.com/coatless-rpkg/errorist/pull/12)) - Switched URLs to using `https` instead of `http` and removed broken links. - ([#12](https://github.com/r-assist/errorist/pull/12)) + ([#12](https://github.com/coatless-rpkg/errorist/pull/12)) ## Deployment - Updated to the latest version of `r-lib` GitHub actions. - ([#12](https://github.com/r-assist/errorist/pull/12)) + ([#12](https://github.com/coatless-rpkg/errorist/pull/12)) # errorist 0.1.0 ## Feature - When multiple warnings occur, each unique warning is searched separately - instead of searching only the latest value. ([#9](https://github.com/r-assist/errorist/pull/9), - closing ([#7](https://github.com/r-assist/errorist/issues/7))) + instead of searching only the latest value. ([#9](https://github.com/coatless-rpkg/errorist/pull/9), + closing ([#7](https://github.com/coatless-rpkg/errorist/issues/7))) ## Fixes - Warning messages now have their locale specific prefix. - ([#9](https://github.com/r-assist/errorist/pull/9)) + ([#9](https://github.com/coatless-rpkg/errorist/pull/9)) - Ensured the `last.warning` object was created by setting `options('warn' = 0)`, which is the default value. Upon unload, the warning level is restored to - the old value. ([#8](https://github.com/r-assist/errorist/pull/8)) + the old value. ([#8](https://github.com/coatless-rpkg/errorist/pull/8)) - Fixed a spurious URL in README/NEWS.md ## Documentation - Improved the package vignette by providing examples of how the handler pick - up errors and warnings. ([#10](https://github.com/r-assist/errorist/pull/10)) + up errors and warnings. ([#10](https://github.com/coatless-rpkg/errorist/pull/10)) # errorist 0.0.3 From b0e971bf96bebcf510f6dd8740928308603f0fc1 Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 13 Nov 2023 16:05:22 -0800 Subject: [PATCH 9/9] https is required --- DESCRIPTION | 2 +- man/errorist-package.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cee906e..b6e926f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,7 +10,7 @@ Authors@R: c( ) Description: Provides environment hooks that obtain errors and warnings which occur during the execution of code to automatically search for solutions. -URL: https://github.com/coatless-rpkg/errorist, http://r-pkg.thecoatlessprofessor.com/errorist/ +URL: https://github.com/coatless-rpkg/errorist, https://r-pkg.thecoatlessprofessor.com/errorist/ BugReports: https://github.com/coatless-rpkg/errorist/issues Depends: R (>= 3.0.0) Imports: searcher (>= 0.0.2) diff --git a/man/errorist-package.Rd b/man/errorist-package.Rd index 9472e0c..9aab1ee 100644 --- a/man/errorist-package.Rd +++ b/man/errorist-package.Rd @@ -12,7 +12,7 @@ Provides environment hooks that obtain errors and warnings which occur during th Useful links: \itemize{ \item \url{https://github.com/coatless-rpkg/errorist} - \item \url{http://r-pkg.thecoatlessprofessor.com/errorist/} + \item \url{https://r-pkg.thecoatlessprofessor.com/errorist/} \item Report bugs at \url{https://github.com/coatless-rpkg/errorist/issues} }