From d9f4ad24fdb07f1f501ee1e95152844a49d5a2dd Mon Sep 17 00:00:00 2001 From: Jyoti Bhogal Date: Fri, 12 Sep 2025 16:17:33 +0100 Subject: [PATCH 1/3] update readme --- README.Rmd | 17 ++++++++++++ README.md | 77 +++++++++++++++++++++++++++++++++++++++++++++++++-- inst/WORDLIST | 8 ++++++ 3 files changed, 100 insertions(+), 2 deletions(-) diff --git a/README.Rmd b/README.Rmd index 7bf5892..3dfae05 100644 --- a/README.Rmd +++ b/README.Rmd @@ -21,6 +21,23 @@ You can install the development version of glossary from [GitHub](https://github pak::pak("r-devel/glossary") ``` +## With `Write` permissions: + +Steps to add pre-commit: + +1. Do the following in the Terminal application of your machine. Do not do this in RStudio Terminal: + 1. For windows `pip3 install pre-commit --user` + 2. For mac `brew install pre-commit` +2. Clone the repo https://github.com/r-devel/glossary to a local folder. +3. Go to RStudio Console and type +```{r} +install.packages("devtools") +install.packages("precommit") +precommit::use_precommit() +``` + +This will open pre-commit interface in browser. Sign into it with GitHub. + ## Example This is a basic example which shows you how to solve a common problem: diff --git a/README.md b/README.md index 0727974..3140780 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,68 @@ You can install the development version of glossary from pak::pak("r-devel/glossary") ``` +## With `Write` permissions: + +Steps to add pre-commit: + +1. Do the following in the Terminal application of your machine. Do not + do this in RStudio Terminal: + 1. For windows `pip3 install pre-commit --user` + 2. For mac `brew install pre-commit` +2. Clone the repo to a local + folder. +3. Go to RStudio Console and type + +``` r +install.packages("devtools") +``` + + ## Installing package into '/private/var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T/Rtmp8NpaOv/temp_libpath11ffa4c8e05e2' + ## (as 'lib' is unspecified) + + ## + ## The downloaded binary packages are in + ## /var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T//Rtmpvoicpp/downloaded_packages + +``` r +install.packages("precommit") +``` + + ## Installing package into '/private/var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T/Rtmp8NpaOv/temp_libpath11ffa4c8e05e2' + ## (as 'lib' is unspecified) + + ## + ## The downloaded binary packages are in + ## /var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T//Rtmpvoicpp/downloaded_packages + +``` r +precommit::use_precommit() +``` + + ## ℹ Using local config from /private/var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T/Rtmp8NpaOv/temp_libpath11ffa4c8e05e2/precommit/pre-commit-config-pkg.yaml. + + ## ℹ There is already a pre-commit configuration file in /Users/jyotibhogal/Documents/GitHub/glossary. Use `force = TRUE` to replace .pre-commit-config.yaml. + + ## • Edit .precommit-config.yaml to (de)activate the hooks you want to use. + + ## • All available hooks: https://pre-commit.com/hooks.html + + ## • R specific hooks: https://github.com/lorenzwalthert/precommit + + ## ✔ Ran `pre-commit autoupdate ()` to get the latest version of the hooks. + + ## ℹ Installing hooks in non-blocking background process. If you experience problems or prefer a blocking process, use `options("precommit.block_install_hooks" = TRUE)`. + + ## • Sign in with GitHub to authenticate and then come + ## back to complete the set-up process. + + ## • It seems like you are using the roxygenize hook. This requires further edits + ## in your `.pre-commit-config.yaml`, please run + ## `precommit::snippet_generate('additional-deps-roxygenize')` to proceed. + +This will open pre-commit interface in browser. Sign into it with +GitHub. + ## Example This is a basic example which shows you how to solve a common problem: @@ -38,32 +100,43 @@ library(glossary) ## Contributors - + + -All contributions to this project are gratefully acknowledged using the [`allcontributors` package](https://github.com/ropensci/allcontributors) following the [all-contributors](https://allcontributors.org) specification. Contributions of any kind are welcome! +All contributions to this project are gratefully acknowledged using the +[`allcontributors` package](https://github.com/ropensci/allcontributors) +following the [all-contributors](https://allcontributors.org) +specification. Contributions of any kind are welcome! + + +
+
SaranjeetKaur
+
rivaquiroga
+ + diff --git a/inst/WORDLIST b/inst/WORDLIST index 2fdeb2d..50c5d48 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,8 +1,16 @@ allcontributors aut +Bhogal CMD cre +Dev http +Kaur ORCID +pre +repo Roxygen RoxygenNote +RSE +RStudio +Saranjeet From 4758a81ffdf5940aaecbbc080f4469c27e7c0925 Mon Sep 17 00:00:00 2001 From: Jyoti Bhogal Date: Mon, 15 Sep 2025 14:40:26 +0530 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Saranjeet Kaur --- README.Rmd | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.Rmd b/README.Rmd index 3dfae05..5f34ecc 100644 --- a/README.Rmd +++ b/README.Rmd @@ -21,22 +21,24 @@ You can install the development version of glossary from [GitHub](https://github pak::pak("r-devel/glossary") ``` -## With `Write` permissions: +## Using precommit -Steps to add pre-commit: +This repository uses precommit. To install and run the same, follow the steps below: -1. Do the following in the Terminal application of your machine. Do not do this in RStudio Terminal: - 1. For windows `pip3 install pre-commit --user` - 2. For mac `brew install pre-commit` -2. Clone the repo https://github.com/r-devel/glossary to a local folder. -3. Go to RStudio Console and type -```{r} +- In an external terminal run `pip3 install pre-commit --user` (for Windows) or `brew install pre-commit` (for macOS) +- Based on the level of permissions you have, either directly clone this repository or clone a fork of this repository to a local directory. + +``` zsh +git clone https://github.com/r-devel/glossary (or git clone https://github.com/USER_NAME/glossary, if it is your fork of the repo) +cd glossary +- Install the {devtools} and {precommit} package +```{r, eval=F, echo=T} install.packages("devtools") install.packages("precommit") -precommit::use_precommit() ``` -This will open pre-commit interface in browser. Sign into it with GitHub. +- Run `precommit::use_precommit()` + ## Example From 17d2a6ebfaf206473670951441253c6e2a20508c Mon Sep 17 00:00:00 2001 From: Jyoti Bhogal Date: Mon, 15 Sep 2025 10:21:35 +0100 Subject: [PATCH 3/3] add suggestions from review --- README.Rmd | 2 +- README.md | 64 +++++++++++------------------------------------------- 2 files changed, 14 insertions(+), 52 deletions(-) diff --git a/README.Rmd b/README.Rmd index 3ded876..674afdf 100644 --- a/README.Rmd +++ b/README.Rmd @@ -21,7 +21,7 @@ You can install the development version of glossary from [GitHub](https://github pak::pak("r-devel/glossary") ``` -## Using precommit +## Using precommit when contributing This repository uses precommit. To install and run the same, follow the steps below: diff --git a/README.md b/README.md index 3140780..fdc4afe 100644 --- a/README.md +++ b/README.md @@ -27,67 +27,29 @@ You can install the development version of glossary from pak::pak("r-devel/glossary") ``` -## With `Write` permissions: +## Using precommit when contributing -Steps to add pre-commit: +This repository uses precommit. To install and run the same, follow the +steps below: -1. Do the following in the Terminal application of your machine. Do not - do this in RStudio Terminal: - 1. For windows `pip3 install pre-commit --user` - 2. For mac `brew install pre-commit` -2. Clone the repo to a local - folder. -3. Go to RStudio Console and type +- In an external terminal run `pip3 install pre-commit --user` (for + Windows) or `brew install pre-commit` (for macOS). +- Based on the level of permissions you have, either directly clone this + repository or clone a fork of this repository to a local directory. -``` r -install.packages("devtools") +``` zsh +git clone https://github.com/r-devel/glossary (or git clone https://github.com/USER_NAME/glossary, if it is your fork of the repo) +cd glossary ``` - ## Installing package into '/private/var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T/Rtmp8NpaOv/temp_libpath11ffa4c8e05e2' - ## (as 'lib' is unspecified) - - ## - ## The downloaded binary packages are in - ## /var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T//Rtmpvoicpp/downloaded_packages +- Install the {devtools} and {precommit} package. ``` r +install.packages("devtools") install.packages("precommit") ``` - ## Installing package into '/private/var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T/Rtmp8NpaOv/temp_libpath11ffa4c8e05e2' - ## (as 'lib' is unspecified) - - ## - ## The downloaded binary packages are in - ## /var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T//Rtmpvoicpp/downloaded_packages - -``` r -precommit::use_precommit() -``` - - ## ℹ Using local config from /private/var/folders/7k/kpyh33yd4mlbp_p2j8m4810m0000gn/T/Rtmp8NpaOv/temp_libpath11ffa4c8e05e2/precommit/pre-commit-config-pkg.yaml. - - ## ℹ There is already a pre-commit configuration file in /Users/jyotibhogal/Documents/GitHub/glossary. Use `force = TRUE` to replace .pre-commit-config.yaml. - - ## • Edit .precommit-config.yaml to (de)activate the hooks you want to use. - - ## • All available hooks: https://pre-commit.com/hooks.html - - ## • R specific hooks: https://github.com/lorenzwalthert/precommit - - ## ✔ Ran `pre-commit autoupdate ()` to get the latest version of the hooks. - - ## ℹ Installing hooks in non-blocking background process. If you experience problems or prefer a blocking process, use `options("precommit.block_install_hooks" = TRUE)`. - - ## • Sign in with GitHub to authenticate and then come - ## back to complete the set-up process. - - ## • It seems like you are using the roxygenize hook. This requires further edits - ## in your `.pre-commit-config.yaml`, please run - ## `precommit::snippet_generate('additional-deps-roxygenize')` to proceed. - -This will open pre-commit interface in browser. Sign into it with -GitHub. +- Run `precommit::use_precommit()` in the console. ## Example