From 52bf61f9a07c58ccbbeb3cd199df531350125811 Mon Sep 17 00:00:00 2001 From: Ernest Guevarra Date: Thu, 6 Feb 2025 11:40:12 +0000 Subject: [PATCH] add spellcheck workflow, update pkgdown, and add CITATTION.cff; fix #12; fix #21; fix #23 --- .Rbuildignore | 1 + CITATION.cff | 147 +++++++++++++++++++++++++++++++++++++++++++ DESCRIPTION | 6 +- pkgdown/_pkgdown.yml | 42 ++++++++----- tests/spelling.R | 3 + 5 files changed, 181 insertions(+), 18 deletions(-) create mode 100644 CITATION.cff create mode 100644 tests/spelling.R diff --git a/.Rbuildignore b/.Rbuildignore index bfdd772..294a5f2 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -8,3 +8,4 @@ ^pkgdown$ ^codecov\.yml$ ^_pkgdown\.yml$ +^CITATION\.cff$ diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..f42db44 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,147 @@ +# -------------------------------------------- +# CITATION file created with {cffr} R package +# See also: https://docs.ropensci.org/cffr/ +# -------------------------------------------- + +cff-version: 1.2.0 +message: 'To cite package "riycf" in publications use:' +type: software +license: GPL-3.0-or-later +title: 'riycf: Utilities for Calculating Infant and Young Child Feeding Indicators' +version: 0.1.0.9000 +identifiers: +- type: url + value: https://github.com/nutriverse/riycf +abstract: 'This package aims to generate updated indicators to assess infant and young + child feeding (IYCF) practices at the individual under 2 years old children level. + The indicators were developed using the technical guideline from the Indicators + for assessing infant and young child feeding practices: definitions and measurement + methods .' +authors: +- family-names: Tint Zaw + given-names: Nicholus + email: nicholustintzaw@katilingban.io +- family-names: Guevarra + given-names: Ernest + email: ernest@guevarra.io + orcid: https://orcid.org/0000-0002-4887-4415 +repository-code: https://github.com/nutriverse/mwana +url: https://nutriverse.io/riycf/ +contact: +- family-names: Tint Zaw + given-names: Nicholus + email: nicholustintzaw@katilingban.io +references: +- type: software + title: 'R: A Language and Environment for Statistical Computing' + notes: Depends + url: https://www.R-project.org/ + authors: + - name: R Core Team + institution: + name: R Foundation for Statistical Computing + address: Vienna, Austria + year: '2025' + version: '>= 2.10' +- type: software + title: rmarkdown + abstract: 'rmarkdown: Dynamic Documents for R' + notes: Suggests + url: https://pkgs.rstudio.com/rmarkdown/ + repository: https://CRAN.R-project.org/package=rmarkdown + authors: + - family-names: Allaire + given-names: JJ + email: jj@posit.co + - family-names: Xie + given-names: Yihui + email: xie@yihui.name + orcid: https://orcid.org/0000-0003-0645-5666 + - family-names: Dervieux + given-names: Christophe + email: cderv@posit.co + orcid: https://orcid.org/0000-0003-4474-2498 + - family-names: McPherson + given-names: Jonathan + email: jonathan@posit.co + - family-names: Luraschi + given-names: Javier + - family-names: Ushey + given-names: Kevin + email: kevin@posit.co + - family-names: Atkins + given-names: Aron + email: aron@posit.co + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + - family-names: Cheng + given-names: Joe + email: joe@posit.co + - family-names: Chang + given-names: Winston + email: winston@posit.co + - family-names: Iannone + given-names: Richard + email: rich@posit.co + orcid: https://orcid.org/0000-0003-3925-190X + year: '2025' + doi: 10.32614/CRAN.package.rmarkdown +- type: software + title: knitr + abstract: 'knitr: A General-Purpose Package for Dynamic Report Generation in R' + notes: Suggests + url: https://yihui.org/knitr/ + repository: https://CRAN.R-project.org/package=knitr + authors: + - family-names: Xie + given-names: Yihui + email: xie@yihui.name + orcid: https://orcid.org/0000-0003-0645-5666 + year: '2025' + doi: 10.32614/CRAN.package.knitr +- type: software + title: testthat + abstract: 'testthat: Unit Testing for R' + notes: Suggests + url: https://testthat.r-lib.org + repository: https://CRAN.R-project.org/package=testthat + authors: + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + year: '2025' + doi: 10.32614/CRAN.package.testthat + version: '>= 3.0.0' +- type: software + title: covr + abstract: 'covr: Test Coverage for Packages' + notes: Suggests + url: https://covr.r-lib.org + repository: https://CRAN.R-project.org/package=covr + authors: + - family-names: Hester + given-names: Jim + email: james.f.hester@gmail.com + year: '2025' + doi: 10.32614/CRAN.package.covr +- type: software + title: spelling + abstract: 'spelling: Tools for Spell Checking in R' + notes: Suggests + url: https://ropensci.r-universe.dev/spelling + repository: https://CRAN.R-project.org/package=spelling + authors: + - family-names: Ooms + given-names: Jeroen + email: jeroen@berkeley.edu + orcid: https://orcid.org/0000-0002-4035-0289 + - family-names: Hester + given-names: Jim + email: james.hester@rstudio.com + year: '2025' + identifiers: + - type: url + value: https://docs.ropensci.org/spelling/ + doi: 10.32614/CRAN.package.spelling + diff --git a/DESCRIPTION b/DESCRIPTION index 4980833..5e93cb1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: riycf Type: Package Title: Utilities for Calculating Infant and Young Child Feeding Indicators -Version: 0.0.0.9000 +Version: 0.1.0.9000 Authors@R: c( person("Nicholus", "Tint Zaw", email = "nicholustintzaw@katilingban.io", role = c("aut", "cre")), @@ -21,8 +21,10 @@ Suggests: rmarkdown, knitr, testthat (>= 3.0.0), - covr + covr, + spelling Encoding: UTF-8 +Language: en-GB LazyData: true RoxygenNote: 7.3.2 Roxygen: list(markdown = TRUE) diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 5849cb6..91f9d19 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -2,18 +2,25 @@ title: riycf url: https://nutriverse.io/riycf/ +development: + mode: unreleased + template: bootstrap: 5 - bootswatch: lumen - theme: haddock - ganalytics: # + theme: breeze-light + math-rendering: mathjax + ganalytics: "G-R8CGGM89XC" + bslib: + bootswatch: pulse + pkgdown-nav-height: 100px + success: "#004225" navbar: - bg: primary - type: light + bg: success + type: dark structure: - left: [home, reference, articles, news] - right: [twitter, linkedin, github] + left: [home, intro, reference, articles, news] + right: [search, website, mastodon, bluesky, github] components: articles: @@ -27,15 +34,18 @@ navbar: href: articles/cf_oth.html - text: "WHO IYCF Questionnaire XLSForms" href: articles/iycf_xlsform.html - twitter: - icon: "fab fa-twitter fa-lg" - href: https://twitter.com/katilingban - linkedin: - icon: "fab fa-linkedin fa-lg" - href: https://www.linkedin.com/company/katilingban - github: - icon: "fab fa-github fa-lg" - href: https://github.com/nutriverse/riycf + website: + icon: "fa-globe" + aria-label: Website + href: https://nutriverse.io + mastodon: + icon: "fab fa-mastodon fa-lg" + aria-label: Mastodon + href: https://mastodon.social/@nutriverse + bluesky: + icon: "fab fa-bluesky fa-lg" + aria-label: Bluesky + href: https://bsky.app/profile/nutriverse.io home: links: diff --git a/tests/spelling.R b/tests/spelling.R new file mode 100644 index 0000000..6713838 --- /dev/null +++ b/tests/spelling.R @@ -0,0 +1,3 @@ +if(requireNamespace('spelling', quietly = TRUE)) + spelling::spell_check_test(vignettes = TRUE, error = FALSE, + skip_on_cran = TRUE)