diff --git a/.github/workflows/mirror-codeberg.yaml b/.github/workflows/mirror-codeberg.yaml new file mode 100644 index 0000000..3f0095f --- /dev/null +++ b/.github/workflows/mirror-codeberg.yaml @@ -0,0 +1,19 @@ +name: Mirror to other git server +on: + push: + branches: + - main + tags: + - "*" +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: yesolutions/mirror-action@master + with: + REMOTE: https://codeberg.org/nutriverse/dietry + GIT_USERNAME: ${{ secrets.CODEBERG_USERNAME }} + GIT_PASSWORD: ${{ secrets.CODEBERG_TOKEN }} diff --git a/.github/workflows/netlify.yaml b/.github/workflows/netlify.yaml new file mode 100644 index 0000000..10c6fe1 --- /dev/null +++ b/.github/workflows/netlify.yaml @@ -0,0 +1,53 @@ +on: + pull_request: + branches: [main, master] + +name: pkgdown-pr + +jobs: + netlify: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-tinytex@v2 + + - 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: Install package + run: R CMD INSTALL . + + - name: Create website + run: | + pkgdown::build_site() + shell: Rscript {0} + + - name: Create index file + run: | + echo ' ' > ./docs/index.html + + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v3.0 + with: + publish-dir: './docs' + production-branch: main + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: + 'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})' + # these default to 'true' + enable-commit-comment: false + enable-github-deployment: false + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 1b644bc..0ab748d 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -14,7 +14,6 @@ jobs: runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} steps: - uses: actions/checkout@v4 @@ -35,15 +34,16 @@ jobs: clean = FALSE, install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") ) + print(cov) covr::to_cobertura(cov) shell: Rscript {0} - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: # Fail if error if not on PR, or if on PR and token is given fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }} - file: ./cobertura.xml - plugin: noop + files: ./cobertura.xml + plugins: noop disable_search: true token: ${{ secrets.CODECOV_TOKEN }} diff --git a/DESCRIPTION b/DESCRIPTION index b1d7d62..2d35041 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: dietry Type: Package Title: Utilities for Calculating Dietary Intake Indicators for Food Security Assessments -Version: 0.0.0.9000 +Version: 0.0.0.9001 Authors@R: person("Ernest", "Guevarra", comment = c(ORCID = "0000-0002-4887-4415"), email = "ernest@guevarra.io", role = c("aut", "cre")) @@ -22,7 +22,7 @@ Suggests: Encoding: UTF-8 Language: en-GB LazyData: true -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 Roxygen: list(markdown = TRUE) URL: https://nutriverse.io/dietry/, https://github.com/nutriverse/dietry BugReports: https://github.com/nutriverse/dietry/issues diff --git a/README.Rmd b/README.Rmd index c7cd003..7893b26 100644 --- a/README.Rmd +++ b/README.Rmd @@ -19,24 +19,24 @@ knitr::opts_chunk$set( [![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![R-CMD-check](https://github.com/nutriverse/dietry/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/nutriverse/dietry/actions/workflows/R-CMD-check.yaml) -[![Codecov test coverage](https://codecov.io/gh/nutriverse/dietry/branch/main/graph/badge.svg)](https://app.codecov.io/gh/nutriverse/dietry?branch=main) +[![Codecov test coverage](https://codecov.io/gh/nutriverse/dietry/graph/badge.svg)](https://app.codecov.io/gh/nutriverse/dietry) [![CodeFactor](https://www.codefactor.io/repository/github/nutriverse/dietry/badge)](https://www.codefactor.io/repository/github/nutriverse/dietry) [![DOI](https://zenodo.org/badge/477273747.svg)](https://zenodo.org/badge/latestdoi/477273747) Food security assessments utilise several dietary intake indicators as proxy measures for diet quality, diet sufficiency, and food availability either at individual or household level. Utilities for recoding and calculating these indicators support in establishing consistent and reliable results. -## What does `dietry` do? +## What does the package do? -Currently, the `dietry` package has functions for: +Currently, the `{dietry}` package has functions for: * Cleaning, processing, scoring, and classifying the [Food Consumption Score](https://resources.vam.wfp.org/data-analysis/quantitative/food-security/food-consumption-score). ## Installation -The `dietry` package is still in active development and not yet available on [CRAN](https://cran.r-project.org/). +The `{dietry}` package is still in active development and not yet available on [CRAN](https://cran.r-project.org/). -You can install the development version of `dietry` from the [nutriverse R Universe](https://nutriverse.r-universe.dev) with: +You can install the development version of `{dietry}` from the [nutriverse R Universe](https://nutriverse.r-universe.dev) with: ``` r install.packages( @@ -47,7 +47,7 @@ install.packages( ## Citation -If you find the `dietry` package useful, please cite using the suggested citation provided by a call to the `citation` function as follows: +If you find the `{dietry}` package useful, please cite using the suggested citation provided by a call to the `citation` function as follows: ```{r cite} citation("dietry") @@ -59,3 +59,6 @@ Feedback, bug reports, and feature requests are welcome; file issues or seek sup This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. +
+ +[![This is part of the nutriverse project under the Oxford iHealth initiative of the MSc in International Health and Tropical Medicine, Nuffield Department of Medicine, University of Oxford](https://github.com/nutriverse/nutriverse-images/blob/main/nutriverse/nutriverse_footer.png?raw=true)](https://nutriverse.io) \ No newline at end of file diff --git a/README.md b/README.md index fc546be..f09745a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostat experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![R-CMD-check](https://github.com/nutriverse/dietry/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/nutriverse/dietry/actions/workflows/R-CMD-check.yaml) [![Codecov test -coverage](https://codecov.io/gh/nutriverse/dietry/branch/main/graph/badge.svg)](https://app.codecov.io/gh/nutriverse/dietry?branch=main) +coverage](https://codecov.io/gh/nutriverse/dietry/graph/badge.svg)](https://app.codecov.io/gh/nutriverse/dietry) [![CodeFactor](https://www.codefactor.io/repository/github/nutriverse/dietry/badge)](https://www.codefactor.io/repository/github/nutriverse/dietry) [![DOI](https://zenodo.org/badge/477273747.svg)](https://zenodo.org/badge/latestdoi/477273747) @@ -23,20 +23,20 @@ either at individual or household level. Utilities for recoding and calculating these indicators support in establishing consistent and reliable results. -## What does `dietry` do? +## What does the package do? -Currently, the `dietry` package has functions for: +Currently, the `{dietry}` package has functions for: - - Cleaning, processing, scoring, and classifying the [Food Consumption - Score](https://resources.vam.wfp.org/data-analysis/quantitative/food-security/food-consumption-score). +- Cleaning, processing, scoring, and classifying the [Food Consumption + Score](https://resources.vam.wfp.org/data-analysis/quantitative/food-security/food-consumption-score). ## Installation -The `dietry` package is still in active development and not yet +The `{dietry}` package is still in active development and not yet available on [CRAN](https://cran.r-project.org/). -You can install the development version of `dietry` from the [nutriverse -R Universe](https://nutriverse.r-universe.dev) with: +You can install the development version of `{dietry}` from the +[nutriverse R Universe](https://nutriverse.r-universe.dev) with: ``` r install.packages( @@ -47,8 +47,9 @@ install.packages( ## Citation -If you find the `dietry` package useful, please cite using the suggested -citation provided by a call to the `citation` function as follows: +If you find the `{dietry}` package useful, please cite using the +suggested citation provided by a call to the `citation` function as +follows: ``` r citation("dietry") @@ -56,7 +57,7 @@ citation("dietry") #> #> Ernest Guevarra (2024). _dietry: Utilities for Dietary Intake #> Indicators for Food Security Assessments_. R package version -#> 0.0.0.9000, . +#> 0.0.0.9001, . #> #> A BibTeX entry for LaTeX users is #> @@ -64,7 +65,7 @@ citation("dietry") #> title = {dietry: Utilities for Dietary Intake Indicators for Food Security Assessments}, #> author = {{Ernest Guevarra}}, #> year = {2024}, -#> note = {R package version 0.0.0.9000}, +#> note = {R package version 0.0.0.9001}, #> url = {https://nutriverse.io/dietry/}, #> } ``` @@ -79,3 +80,10 @@ guidelines](https://nutriverse.io/dietry/CONTRIBUTING.html). This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. + +
+ +[![This is part of the nutriverse project under the Oxford iHealth +initiative of the MSc in International Health and Tropical Medicine, +Nuffield Department of Medicine, University of +Oxford](https://github.com/nutriverse/nutriverse-images/blob/main/nutriverse/nutriverse_footer.png?raw=true)](https://nutriverse.io) diff --git a/inst/CITATION b/inst/CITATION index 4ca8418..15446f2 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -4,7 +4,7 @@ bibentry( title = "dietry: Utilities for Dietary Intake Indicators for Food Security Assessments", author = person("Ernest Guevarra"), year = "2024", - note = "R package version 0.0.0.9000", + note = "R package version 0.0.0.9001", url = "https://nutriverse.io/dietry/" ) diff --git a/inst/WORDLIST b/inst/WORDLIST index 842eee1..595048f 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -14,6 +14,7 @@ FCSVeg FIES HFIAS HHS +IYCF LCSI Lifecycle MDD @@ -31,5 +32,6 @@ csv fcs github households’ +iHealth nutriverse offs diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 06cb921..70a13e6 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -8,18 +8,28 @@ development: template: bootstrap: 5 theme: breeze-light - ganalytics: "G-D5YV0NJKN4" bslib: bootswatch: pulse pkgdown-nav-height: 100px success: "#004225" + includes: + in_header: | + + + navbar: bg: success type: dark structure: left: [home, intro, reference, articles, news] - right: [search, mastodon, github] + right: [search, website, mastodon, bluesky, linkedin github] components: articles: @@ -27,10 +37,22 @@ navbar: menu: - text: Food Consumption Score href: articles/fcs.html + website: + icon: "fa-globe" + href: https://nutriverse.io + aria-label: Website mastodon: icon: fab fa-mastodon fa-lg - aria-label: Mastodon href: https://mastodon.social/@nutriverse + aria-label: Mastodon + bluesky: + icon: "fab fa-bluesky fa-lg" + href: https://bsky.app/profile/nutriverse.io + aria-label: Bluesky + linkedin: + icon: "fab fa-linkedin fa-lg" + href: https://www.linkedin.com/company/nutriverse-community + aria-label: LinkedIn # home: # links: