Skip to content

Commit

Permalink
edit pkgdown template; fix #85
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestguevarra committed Oct 29, 2024
1 parent cac6565 commit f7c2211
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@

* Fork this repository to your Github account

* Clone your version on your account down to your machine from your account
* Clone your version on your account down to your machine from your account

```
git clone https://github.com/<yourgithubusername>/squeacr.git
```

* Make sure to track progress upstream i.e., on our version of `intergrowth`
at `nutriverse/squeacr`, by doing
* Make sure to track progress upstream i.e., on our version of `squeacr`
at `nutriverse/squeacr`, by doing

```
git remote add upstream https://github.com/nutriverse/squeacr.git
```

* Before making changes make sure to pull changes in from `upstream` by doing
either `git fetch upstream` then merge later or `git pull upstream` to fetch
* Before making changes make sure to pull changes in from `upstream` by doing
either `git fetch upstream` then merge later or `git pull upstream` to fetch
and merge in one step

* Make your changes on a new feature branch

* Please write a test or tests for your changes if they affect code and not just
* Please write a test or tests for your changes if they affect code and not just
documentation

* Push up changes to your account
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
# You can update this file to a newer version using the rhub2 package:
#
# rhub::rhub_setup()
#
# It is unlikely that you need to modify this file manually.

name: R-hub
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"

on:
workflow_dispatch:
inputs:
config:
description: 'A comma separated list of R-hub platforms to use.'
type: string
default: 'linux,windows,macos'
name:
description: 'Run name. You can leave this empty now.'
type: string
id:
description: 'Unique ID. You can leave this empty now.'
type: string

jobs:

setup:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.rhub-setup.outputs.containers }}
platforms: ${{ steps.rhub-setup.outputs.platforms }}

steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/actions/setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup

linux-containers:
needs: setup
if: ${{ needs.setup.outputs.containers != '[]' }}
runs-on: ubuntu-latest
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.containers) }}
container:
image: ${{ matrix.config.container }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/run-check@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}

other-platforms:
needs: setup
if: ${{ needs.setup.outputs.platforms != '[]' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.platforms) }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/setup-r@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/run-check@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Imports:
Suggests:
knitr,
rmarkdown,
testthat,
testthat (>= 3.0.0),
covr,
spelling,
readxl,
Expand All @@ -37,7 +37,8 @@ Encoding: UTF-8
Language: en-GB
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
VignetteBuilder: knitr
URL: https://nutriverse.io/squeacr/, https://github.com/nutriverse/squeacr
BugReports: https://github.com/nutriverse/squeacr/issues
Config/testthat/edition: 3
4 changes: 2 additions & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
bibentry(
bibtype = "Manual",
header = "To cite squeacr in publications use:",
title = "squeacr: Semi-Quantitative Evaluation of Access and Coverage (SQUEAC) Tools in R",
title = "squeacr: Semi-Quantitative Evaluation of Access and Coverage ('SQUEAC') Tools in R",
author = person("Ernest Guevarra"),
year = "2023",
year = "2024",
note = "R package version 0.0.0.9000",
url = "https://nutriverse.io/squeacr/",
doi = "10.5281/zenodo.7509665"
Expand Down
2 changes: 1 addition & 1 deletion inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Medani
MoH
Myatt
Naher
Nutriverse
ORCID
RUTF
SLEAC
Expand All @@ -52,6 +51,7 @@ kgs
kwashiorkor
lifecycle
muac
nutriverse
singlecoverage
sudan
tibble
Expand Down
15 changes: 7 additions & 8 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ development:

template:
bootstrap: 5
bootswatch: cosmo
theme: haddock
ganalytics: UA-102485058-6
bootswatch: pulse
theme: breeze-light
ganalytics: G-C6TYX2E6RD
bslib:
pkgdown-nav-height: 100px

navbar:
bg: success
type: light
structure:
left: [home, intro, reference, articles, news]
right: [mastodon, linkedin, github]
right: [search, mastodon, github]

components:
# articles:
Expand All @@ -32,10 +34,7 @@ navbar:
# href: articles/iodine-deficiency.html
mastodon:
icon: "fab fa-mastodon fa-lg"
href: https://fosstodon.org/@katilingban
linkedin:
icon: "fab fa-linkedin fa-lg"
href: https://www.linkedin.com/company/katilingban
href: https://fosstodon.org/@nutriverse

home:
links:
Expand Down
8 changes: 8 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# This file is part of the standard setup for testthat.
# It is recommended that you do not modify it.
#
# Where should you do additional test configuration?
# Learn more about the roles of various files in:
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
# * https://testthat.r-lib.org/articles/special-files.html

library(testthat)
library(squeacr)

Expand Down

0 comments on commit f7c2211

Please sign in to comment.