Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/mirror-codeberg.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
53 changes: 53 additions & 0 deletions .github/workflows/netlify.yaml
Original file line number Diff line number Diff line change
@@ -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 '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;URL=/dev/index.html" /> <script language="javascript"> window.location.replace('/dev/index.html')</script></head></html>' > ./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 }}
8 changes: 4 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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
Expand Down
15 changes: 9 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!-- badges: end -->

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(
Expand All @@ -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")
Expand All @@ -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.

<br/>

[![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)
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!-- badges: end -->
Expand All @@ -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(
Expand All @@ -47,24 +47,25 @@ 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")
#> To cite dietry in publications, use:
#>
#> Ernest Guevarra (2024). _dietry: Utilities for Dietary Intake
#> Indicators for Food Security Assessments_. R package version
#> 0.0.0.9000, <https://nutriverse.io/dietry/>.
#> 0.0.0.9001, <https://nutriverse.io/dietry/>.
#>
#> A BibTeX entry for LaTeX users is
#>
#> @Manual{,
#> 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/},
#> }
```
Expand All @@ -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.

<br/>

[![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)
2 changes: 1 addition & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
)

2 changes: 2 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ FCSVeg
FIES
HFIAS
HHS
IYCF
LCSI
Lifecycle
MDD
Expand All @@ -31,5 +32,6 @@ csv
fcs
github
households’
iHealth
nutriverse
offs
28 changes: 25 additions & 3 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,51 @@ development:
template:
bootstrap: 5
theme: breeze-light
ganalytics: "G-D5YV0NJKN4"
bslib:
bootswatch: pulse
pkgdown-nav-height: 100px
success: "#004225"
includes:
in_header: |
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-D5YV0NJKN4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-D5YV0NJKN4');
</script>

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:
text: Articles
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:
Expand Down