Skip to content

Commit

Permalink
Merge pull request #46 from nutriverse/dev
Browse files Browse the repository at this point in the history
refactor tests; fix #43; fix #44; fix #45
  • Loading branch information
ernestguevarra authored Oct 29, 2024
2 parents 396f974 + df11424 commit 1001ab7
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 35 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
^_pkgdown\.yml$
^cran-comments\.md$
^CRAN-SUBMISSION$
^README\.html$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
.DS_Store
inst/doc
docs

README.html
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Suggests:
Encoding: UTF-8
Language: en-GB
LazyData: true
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
URL: https://nutriverse.io/micronutr/, https://github.com/nutriverse/micronutr
BugReports: https://github.com/nutriverse/micronutr/issues
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# micronutr 0.1.1.9000

This is a GitHub-only and R Universe-only development release. In this release:

## Bug fixes

* refactor tests for haemoglobin correction functions to resolve warning messages.

## General updates

* update `_pkgdown.yml` website template to match nutriverse theme.


# micronutr 0.1.1

Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ You can install `micronutr` from [CRAN](https://cran.r-project.org) with:
install.packages("micronutr")
```

You can install the development version of `micronutr` from [nutriverse r-universe](https://nutriverse.r-universe.dev) with:
You can install the development version of `micronutr` from [nutriverse R Universe](https://nutriverse.r-universe.dev) with:

```{r install-r-universe, echo = TRUE, eval = FALSE}
install.packages(
Expand Down
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ The `micronutr` package provides tools for determining select vitamin
and mineral deficiencies using R. Currently, `micronutr` has functions
for:

- Detecting **haemoglobinaemia** or anaemia based on an individual’s
*serum haemoglobin* level;
- Detecting **haemoglobinaemia** or anaemia based on an individual’s
*serum haemoglobin* level;

- Detecting **inflammation** status based on *c-reactive protein (CRP)*
and *alpha(1)-acid-glycoprotein (AGP)*;
- Detecting **inflammation** status based on *c-reactive protein
(CRP)* and *alpha(1)-acid-glycoprotein (AGP)*;

- Detecting **iron deficiency** status based on an individual’s *serum
ferritin* level;
- Detecting **iron deficiency** status based on an individual’s *serum
ferritin* level;

- Detecting **iodine deficiency** status based on a population’s mean
urinary iodine concentration.
- Detecting **iodine deficiency** status based on a population’s mean
urinary iodine concentration.

## Installation

Expand All @@ -64,7 +64,7 @@ install.packages("micronutr")
```

You can install the development version of `micronutr` from [nutriverse
r-universe](https://nutriverse.r-universe.dev) with:
R Universe](https://nutriverse.r-universe.dev) with:

``` r
install.packages(
Expand All @@ -78,17 +78,17 @@ install.packages(
`micronutr` comes packaged with vignettes that show how to use the
package for the purposes described above.

- [Detecting
**haemoglobinaemia**](https://nutriverse.io/micronutr/articles/haemoglobinaemia.html)
- [Detecting
**haemoglobinaemia**](https://nutriverse.io/micronutr/articles/haemoglobinaemia.html)

- [Detecting
**inflammation**](https://nutriverse.io/micronutr/articles/inflammation.html)
- [Detecting
**inflammation**](https://nutriverse.io/micronutr/articles/inflammation.html)

- [Detecting **iron
deficiency**](https://nutriverse.io/micronutr/articles/iron-deficiency.html)
- [Detecting **iron
deficiency**](https://nutriverse.io/micronutr/articles/iron-deficiency.html)

- [Detecting **iodine
deficiency**](https://nutriverse.io/micronutr/articles/iodine-deficiency.html)
- [Detecting **iodine
deficiency**](https://nutriverse.io/micronutr/articles/iodine-deficiency.html)

## Citation

Expand All @@ -102,8 +102,9 @@ citation("micronutr")
#>
#> Ernest Guevarra, Nicholus Tint Zaw (2024). _micronutr: Determining
#> Vitamin and Mineral Status of Populations_.
#> doi:10.5281/zenodo.7503846 <https://doi.org/10.5281/zenodo.7503846>,
#> R package version 0.1.1, <https://nutriverse.io/micronutr/>.
#> doi:10.5281/zenodo.7503846
#> <https://doi.org/10.5281/zenodo.7503846>, R package version 0.1.1,
#> <https://nutriverse.io/micronutr/>.
#>
#> A BibTeX entry for LaTeX users is
#>
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: #
bootswatch: pulse
theme: breeze-light
ganalytics: G-1V9EDVDNEZ
bslib:
pkgdown-nav-height: 100px

navbar:
bg: success
type: light
structure:
left: [home, reference, articles, news]
right: [mastodon, linkedin, github]
right: [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
Binary file modified pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions pkgdown/favicon/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions pkgdown/favicon/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
Binary file added pkgdown/favicon/web-app-manifest-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/web-app-manifest-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions tests/testthat/test-01-correct_haemoglobin.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,8 @@ test_that("correction factor for altitude errors", {


test_that("correct haemoglobin output is correct", {
expect_type(
correct_hb(hb = mnData$hb[1]), "double"
)
expect_type(
correct_hb(hb = mnData$hb[1], alt = mnData$altitude[1]), "double"
)
expect_warning(correct_hb(hb = mnData$hb[1]))
expect_warning(correct_hb(hb = mnData$hb[1], alt = mnData$altitude[1]))
expect_type(
correct_hb(hb = mnData$hb[1], alt = mnData$altitude[1], smoke = 0),
"double"
Expand Down

0 comments on commit 1001ab7

Please sign in to comment.