Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full package review for v0.1.0 release #13

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6f58309
Automatic readme update
actions-user Oct 25, 2024
1b9a334
write DESCRIPTION for {epiparameterDB}
joshwlambert Oct 28, 2024
4754a77
update LICENSE and LICENSE.md to CC0
joshwlambert Oct 28, 2024
7d8ed22
write README for {epiparameterDB}
joshwlambert Oct 28, 2024
d2ea6f6
draft NEWS.md for initial release
joshwlambert Oct 28, 2024
1753ae0
write _pkgdown.yml for {epiparameterDB}
joshwlambert Oct 28, 2024
34e32c8
add data-raw script
joshwlambert Oct 28, 2024
04e35c7
add data/epiparameterDB.rda
joshwlambert Oct 28, 2024
2fe3e3f
add data documentation
joshwlambert Oct 28, 2024
666f81c
add .read_db and .is_pkg_installed functions
joshwlambert Oct 28, 2024
fbd64cf
add .cite_author function
joshwlambert Oct 28, 2024
bad9a10
add parameters.json and data_dictionary.json to extdata
joshwlambert Oct 28, 2024
f772f9a
update documentation
joshwlambert Oct 28, 2024
dc76fc3
added unit tests for internal functions
joshwlambert Oct 28, 2024
f7c80c9
write design-principles vignette for {epiparameterDB}
joshwlambert Oct 28, 2024
15ba1b7
add database.Rmd vignette
joshwlambert Oct 28, 2024
c241ae6
add data-raw to .Rbuildignore
joshwlambert Oct 28, 2024
7632bd6
add .Rproj
joshwlambert Oct 28, 2024
f4d44bf
add pkgdown/
joshwlambert Oct 28, 2024
f80eb38
add validate-json GHA workflow
joshwlambert Oct 28, 2024
58ff043
update WORDLIST
joshwlambert Oct 28, 2024
85c6e3c
Automatic readme update
actions-user Oct 28, 2024
4a233eb
add articles to _pkgdown.yml
joshwlambert Oct 28, 2024
d240917
use exported data directly in database.Rmd
joshwlambert Oct 28, 2024
b27de62
fix typo in .read_db
joshwlambert Oct 28, 2024
5fdf287
use R recommended package to test .is_pkg_installed
joshwlambert Oct 28, 2024
cc6b2ad
remove old use_data call from data-raw/parameters.R
joshwlambert Oct 28, 2024
27eff09
add pkg logo
joshwlambert Oct 28, 2024
3e1556a
update pkgdown favicons
joshwlambert Oct 28, 2024
7a93b6b
rerun pkgdown::build_favicons
joshwlambert Oct 28, 2024
7e44bb5
Update `CITATION.cff`
joshwlambert Oct 28, 2024
e5e719f
Bump untitaker/hyperlink from 0.1.32 to 0.1.35
dependabot[bot] Oct 25, 2024
81b7140
bump to version 0.1.0
joshwlambert Oct 28, 2024
d070acf
remove LICENSE file
joshwlambert Oct 28, 2024
402b524
bump untitaker/hyperlink in pkgdown workflow
joshwlambert Oct 28, 2024
761d856
bump action versions in pkgdown workflow
joshwlambert Nov 20, 2024
6695bd9
run `pkgdown::build_favicons(overwrite = TRUE)` with {pkgdown} v2.1.1
joshwlambert Nov 20, 2024
fe90654
Update `CITATION.cff`
joshwlambert Nov 20, 2024
d207f34
add package Description to DESCRIPTION file
joshwlambert Nov 21, 2024
6099017
update WORDLIST
joshwlambert Nov 21, 2024
70c00a3
use single quotes instead of curly bracket for package name in DESCRI…
joshwlambert Nov 21, 2024
57051b1
Update `CITATION.cff`
joshwlambert Nov 21, 2024
6fdb921
add cran-comments
joshwlambert Nov 21, 2024
c705093
add CRAN install instructions to README
joshwlambert Nov 21, 2024
f596a3f
remove extra whitespace from DESCRIPTION
joshwlambert Nov 21, 2024
cc4492e
change Title in DESCRIPTION to title case
joshwlambert Nov 21, 2024
e83f684
fix MIT license badge URL flagged by urlchecker::url_check()
joshwlambert Nov 21, 2024
54b3fb7
Automatic readme update
actions-user Nov 21, 2024
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
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
^docs$
^pkgdown$
^tools$
^data-raw$
^cran-comments\.md$
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ jobs:
shell: Rscript {0}

- name: Check website links
uses: untitaker/[email protected].32
uses: untitaker/[email protected].43
with:
args: docs/

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'merge_group' && github.event_name != 'pull_request'
uses: JamesIves/[email protected].8
uses: JamesIves/[email protected].9
with:
# We clean on releases because we want to remove old vignettes,
# figures, etc. that have been deleted from the `main` branch.
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/validate-json.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Validate JSONs

on:
push:
branches: [main, master]
paths:
- 'R/sysdata.rda'
- 'inst/extdata/**'
- 'data-raw/parameters.R'
- '.github/workflows/validate-json.yaml'
merge_group:
pull_request:
paths:
- 'R/sysdata.rda'
- 'inst/extdata/**'
- 'data-raw/parameters.R'
- '.github/workflows/validate-json.yaml'

jobs:
validate-json:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
any::jsonvalidate

- name: Validate JSON
run: |
jsonvalidate::json_validate(
json = file.path("inst", "extdata", "parameters.json"),
schema = file.path("inst", "extdata", "data_dictionary.json"),
engine = "ajv",
verbose = TRUE,
greedy = TRUE,
strict = FALSE,
error = TRUE
)
shell: Rscript {0}
171 changes: 171 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------

cff-version: 1.2.0
message: 'To cite package "epiparameterDB" in publications use:'
type: software
license: CC0-1.0
title: 'epiparameterDB: Database of epidemiological parameters'
version: 0.1.0
identifiers:
- type: url
value: https://epiverse-trace.github.io/epiparameterDB/
abstract: A data package containing a database of epidemiological parameters. It stores
the data for the 'epiparameter' R package. Epidemiological parameter estimates are
extracted from the literature.
authors:
- family-names: Lambert
given-names: Joshua W.
email: [email protected]
orcid: https://orcid.org/0000-0001-5218-3046
- family-names: Kucharski
given-names: Adam
email: [email protected]
orcid: https://orcid.org/0000-0001-8814-9421
- family-names: Tamayo
given-names: Carmen
email: [email protected]
orcid: https://orcid.org/0000-0003-4184-2864
repository-code: https://github.com/epiverse-trace/epiparameterDB
url: https://github.com/epiverse-trace/epiparameterDB/
contact:
- family-names: Lambert
given-names: Joshua W.
email: [email protected]
orcid: https://orcid.org/0000-0001-5218-3046
keywords:
- data-package
- epidemiology
- epiverse
- r
- r-package
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: '2024'
version: '>= 4.0.0'
- type: software
title: DT
abstract: 'DT: A Wrapper of the JavaScript Library ''DataTables'''
notes: Suggests
url: https://github.com/rstudio/DT
repository: https://CRAN.R-project.org/package=DT
authors:
- family-names: Xie
given-names: Yihui
- family-names: Cheng
given-names: Joe
email: [email protected]
- family-names: Tan
given-names: Xianying
year: '2024'
doi: 10.32614/CRAN.package.DT
- type: software
title: jsonlite
abstract: 'jsonlite: A Simple and Robust JSON Parser and Generator for R'
notes: Suggests
url: https://jeroen.r-universe.dev/jsonlite
repository: https://CRAN.R-project.org/package=jsonlite
authors:
- family-names: Ooms
given-names: Jeroen
email: [email protected]
orcid: https://orcid.org/0000-0002-4035-0289
year: '2024'
doi: 10.32614/CRAN.package.jsonlite
- 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: [email protected]
orcid: https://orcid.org/0000-0003-0645-5666
year: '2024'
doi: 10.32614/CRAN.package.knitr
- 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: [email protected]
- family-names: Xie
given-names: Yihui
email: [email protected]
orcid: https://orcid.org/0000-0003-0645-5666
- family-names: Dervieux
given-names: Christophe
email: [email protected]
orcid: https://orcid.org/0000-0003-4474-2498
- family-names: McPherson
given-names: Jonathan
email: [email protected]
- family-names: Luraschi
given-names: Javier
- family-names: Ushey
given-names: Kevin
email: [email protected]
- family-names: Atkins
given-names: Aron
email: [email protected]
- family-names: Wickham
given-names: Hadley
email: [email protected]
- family-names: Cheng
given-names: Joe
email: [email protected]
- family-names: Chang
given-names: Winston
email: [email protected]
- family-names: Iannone
given-names: Richard
email: [email protected]
orcid: https://orcid.org/0000-0003-3925-190X
year: '2024'
doi: 10.32614/CRAN.package.rmarkdown
- 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: [email protected]
orcid: https://orcid.org/0000-0002-4035-0289
- family-names: Hester
given-names: Jim
email: [email protected]
year: '2024'
doi: 10.32614/CRAN.package.spelling
- 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: [email protected]
year: '2024'
doi: 10.32614/CRAN.package.testthat
version: '>= 3.0.0'

43 changes: 20 additions & 23 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
Package: packagetemplate
Title: Your Package Title in Titlecase
Version: 0.0.1
Package: epiparameterDB
Title: Database of Epidemiological Parameters
Version: 0.1.0
Authors@R: c(
person("James M.", "Azam", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0001-5782-7330")),
person("Hugo", "Gruson", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-4094-1476")),
person("Pratik", "Gupte", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0001-5294-7819")),
person("Joshua W.", "Lambert", , "[email protected]", role = "aut",
person("Joshua W.", "Lambert", , "[email protected]", role = c("cre", "aut", "cph"),
comment = c(ORCID = "0000-0001-5218-3046")),
person("Karim", "Mané", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-9892-2999")),
person("Jaime A.", "Pavlich-Mariscal", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0002-3892-6680")),
person("Chris", "Hartgerink", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0003-1050-6809"))
person("Adam", "Kucharski", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0001-8814-9421")),
person("Carmen", "Tamayo", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0003-4184-2864"))
)
Description: Your package description. It must end with a period (".") and
include relevant bibliographical references if applicable, using the
following format: Author et al. (2023) <doi:10.5281/zenodo.6619350>.
License: MIT + file LICENSE
Description: A data package containing a database of epidemiological
parameters. It stores the data for the 'epiparameter' R package.
Epidemiological parameter estimates are extracted from the literature.
License: CC0
URL: https://github.com/epiverse-trace/epiparameterDB/,
https://epiverse-trace.github.io/epiparameterDB/
BugReports: https://github.com/epiverse-trace/epiparameterDB/issues
Depends:
R (>= 4.0.0)
Suggests:
Suggests:
DT,
jsonlite,
knitr,
rmarkdown,
spelling,
Expand All @@ -32,8 +29,8 @@ VignetteBuilder:
knitr
Config/Needs/website: epiverse-trace/epiversetheme
Config/testthat/edition: 3
Config/testthat/parallel: true
Encoding: UTF-8
Language: en-GB
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
2 changes: 0 additions & 2 deletions LICENSE

This file was deleted.

64 changes: 43 additions & 21 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,43 @@
# MIT License

Copyright (c) 2022 the package authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
## creative commons

# CC0 1.0 Universal

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.

### Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.

For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.

1. __Copyright and Related Rights.__ A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:

i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;

ii. moral rights retained by the original author(s) and/or performer(s);

iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;

iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;

v. rights protecting the extraction, dissemination, use and reuse of data in a Work;

vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and

vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.

2. __Waiver.__ To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.

3. __Public License Fallback.__ Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.

4. __Limitations and Disclaimers.__

a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.

b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.

c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.

d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
19 changes: 15 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# 0.1.0
# epiparameterDB 0.1.0

* This project now includes a
[`NEWS.md`](https://r-pkgs.org/other-markdown.html#sec-news) file to inform
users about changes and new features.
This is the first minor release of the `{epiparameterDB}` R package. It contains the epidemiological parameter database originally part of the `{epiparameter}` R package.

## New features

* The first release contains the parameter database (`parameters.json`) from the `{epiparameter}` package v0.3.0.
* Functionality to read the JSON file (`parameters.json`), render the database as a vignette (`database.Rmd`), and validate the JSON database with a data dictionary (`data_dictionary.json`) using a GitHub actions workflow (`validate-json.yaml`) have been copied from the original `{epiparameter}` implementation.

## Bug fixes

* None

## Deprecated and defunct

* None
9 changes: 9 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#' A list of epidemiological parameters.
#'
#' @format ## `epiparameterDB`
#' A `list` of epidemiological parameters read from `extdata/parameters.json`
#' with `r length(epiparameterDB::epiparameterDB)` database entries. The object
#' is tagged with the class attribute `<epiparamterDB>` to validate the
#' parameter library has been loaded using the `{epiparameterDB}` package.
#'
"epiparameterDB"
Loading
Loading