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

Second full review cfr v0.1.0 #103

Closed
wants to merge 381 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
381 commits
Select commit Hold shift + click to select a range
eef365e
Corrections to estimate_time_varying()
pratikunterwegs Jun 7, 2023
47d938f
Update default options for get_default_burn_in()
pratikunterwegs Jun 7, 2023
459c7b2
Corrections to known_outcomes()
pratikunterwegs Jun 7, 2023
954e67c
Remove format_output()
pratikunterwegs Jun 7, 2023
c54ae77
Update examples and comments
pratikunterwegs Jun 7, 2023
b3dc62b
Remove package documentation
pratikunterwegs Jun 7, 2023
a7ab82c
Minor updates to test files, add snaphots
pratikunterwegs Jun 7, 2023
38ac876
Remove format_output() from vignettes
pratikunterwegs Jun 7, 2023
10ded3b
Correct example in known_outcomes()
pratikunterwegs Jun 7, 2023
b59a134
Updates to README - rm bad plots
pratikunterwegs Jun 7, 2023
7d96525
Update DESCRIPTION and NAMESPACE
pratikunterwegs Jun 7, 2023
551e087
Re-add {epiparameter} remote for package install
pratikunterwegs Jun 7, 2023
223635b
Static severity vignette no longer uses plot_ fns
pratikunterwegs Jun 7, 2023
4d83493
Correct plotting code in estimate_static vignette
pratikunterwegs Jun 7, 2023
1da9448
Vignette estimate_time_varying: use ggplot, no custom fns
pratikunterwegs Jun 7, 2023
d7aad32
Correct references in ascertainment vignette
pratikunterwegs Jun 7, 2023
9827242
Formatting in known_outcomes documentation
pratikunterwegs Jun 8, 2023
bdfd4f7
Edit Readme to trigger Md build
pratikunterwegs Jun 8, 2023
ef9c07b
Automatic readme update
actions-user Jun 8, 2023
543f885
Correct docu for ebola1976 and estimate_static
pratikunterwegs Jun 8, 2023
324d7c0
Remove setup vignette
pratikunterwegs Jun 8, 2023
f1a7017
Add Get started vignette
pratikunterwegs Jun 8, 2023
01a3822
Use ggplot in ascertainment vignette
pratikunterwegs Jun 8, 2023
d9e523d
Minor edits to static_severity vignette
pratikunterwegs Jun 8, 2023
2de0167
Add Camacho 2014 reference to library
pratikunterwegs Jun 8, 2023
872aae7
Correct estimate_ascertainment vignette
pratikunterwegs Jun 8, 2023
65e44e0
Fn known_outcomes() does not require deaths
pratikunterwegs Jun 13, 2023
b319f22
Update Readme
pratikunterwegs Jun 13, 2023
a74eda0
Correct function linking in vignettes
pratikunterwegs Jun 13, 2023
5ecd7ac
Errors TRUE on spelling, update wordlist and docs
pratikunterwegs Jun 13, 2023
7325329
Automatic readme update
actions-user Jun 13, 2023
1648abe
Add contributing guide
pratikunterwegs Jun 14, 2023
8996ff6
Fixes to vignettes
pratikunterwegs Jun 14, 2023
7b40f59
Minor fixes to documentation, comments
pratikunterwegs Jun 14, 2023
0d10ca4
Reword usage of epiparameter
pratikunterwegs Jun 14, 2023
2ece8c5
Remove {kableExtra} from suggests
pratikunterwegs Jun 14, 2023
845b538
Edits to documentation
pratikunterwegs Jun 14, 2023
f19c3da
Automatic readme update
actions-user Jun 14, 2023
2b96537
Explain result of known_outcomes() in vignette
pratikunterwegs Jun 15, 2023
fc51c65
Add estimate_rolling(), WIP #45
pratikunterwegs Jun 15, 2023
426af48
Add estimate_rolling example to README
pratikunterwegs Jun 15, 2023
0bafa66
Fn estimate_severity() takes numbers of cases, deaths, outcomes
pratikunterwegs Jun 15, 2023
bda65c8
Minor corrections to estimate_static from estimate_severity
pratikunterwegs Jun 15, 2023
10aaca2
Add tests for estimate_rolling, update snaphots and other tests
pratikunterwegs Jun 15, 2023
5834c3b
Update documentation and NAMESPACE
pratikunterwegs Jun 15, 2023
7608e6d
Automatic readme update
actions-user Jun 15, 2023
fd77065
Update wordlist to include ggplot
pratikunterwegs Jun 16, 2023
b640608
Apply suggestions from code review
pratikunterwegs Jun 16, 2023
1a501c4
Automatic readme update
actions-user Jun 16, 2023
e4a7ccb
Use double quotes to avoid spelling errors
pratikunterwegs Jun 16, 2023
69415b2
Automatic readme update
actions-user Jun 16, 2023
b835345
Remove plotting functions
pratikunterwegs Jun 15, 2023
72fb442
Preliminary prepare_data() generic and incidence2 method, WIP #39
pratikunterwegs Jun 16, 2023
f6f9409
Preliminary vignette for preparing data, WIP #39
pratikunterwegs Jun 16, 2023
c33a019
Fn prepare_data() better handles incidence2 objects
pratikunterwegs Jun 19, 2023
b53a7af
Better documentation for prepare_data() generic and method
pratikunterwegs Jun 19, 2023
2c8b5d5
Basic tests for prepare_data()
pratikunterwegs Jun 19, 2023
68ef11b
Add test snapshot for prepare_data()
pratikunterwegs Jun 19, 2023
31e78a0
Minimal vignette for prepare_data()
pratikunterwegs Jun 19, 2023
94c72ca
Update DESCRIPTION, WORDLIST, prepare_data() docs
pratikunterwegs Jun 19, 2023
47e42b4
Add details to prepare_data vignette
pratikunterwegs Jun 19, 2023
d2d0ce7
Use incidence2 getters
pratikunterwegs Jun 20, 2023
6810107
Count col using getter, remove aggregation
pratikunterwegs Jun 20, 2023
b54f51f
Update tests and documentation for prepare_data()
pratikunterwegs Jun 20, 2023
1f2970f
Remove region grouping in vignette
pratikunterwegs Jun 20, 2023
eb1c419
Add "ebola" to WORDLIST
pratikunterwegs Jun 20, 2023
4b8e483
prepare_data() fill_NA argument defaults FALSE
pratikunterwegs Jun 21, 2023
8957bb6
Rename package from {datadelay} to {cfr}
pratikunterwegs Jul 12, 2023
29c130e
Ignore pkgdown directory
pratikunterwegs Jul 12, 2023
9efd3d9
Automatic readme update
actions-user Jul 12, 2023
771900a
Add package logo
pratikunterwegs Jul 12, 2023
a526ebb
Increase logo elements size
pratikunterwegs Jul 12, 2023
55f8d4b
Change maintainer to PRG, add reviewers
pratikunterwegs Jul 12, 2023
eee1438
Add Tim T as reviewer
pratikunterwegs Jul 13, 2023
ef20c79
Add reference for ebola 1976 data
pratikunterwegs Jul 13, 2023
6ed57d2
Automatic readme update
actions-user Jul 13, 2023
619cb5f
Link to pkg in prepare_data() docs
pratikunterwegs Jul 13, 2023
5206bd4
Update WORDLIST with words in reference
pratikunterwegs Jul 13, 2023
21f3a4c
Do not ignore pkgdown/
pratikunterwegs Jul 20, 2023
c73cc33
Remove {covidregionaldata} from examples, WIP #51
pratikunterwegs Jul 26, 2023
b6ad61d
Minor fixes to final steps in estimate_reporting
pratikunterwegs Jul 26, 2023
83605f9
Correctly link {cfr} in prepare_data docs
pratikunterwegs Jul 26, 2023
408e7cc
Use covid example in estimate_time_varying() docs
pratikunterwegs Jul 26, 2023
b09ed3d
Fixes to examples: remove library calls, add comments
pratikunterwegs Jul 26, 2023
145b2ca
Update Rd files
pratikunterwegs Jul 26, 2023
ef06667
Update test snapshot
pratikunterwegs Jul 26, 2023
31e0eff
Disable indentation linter
pratikunterwegs Jul 26, 2023
59123c9
Fix license
Bisaloo Jul 27, 2023
4063418
Edits to static severity vignette
pratikunterwegs Jul 13, 2023
5a87d09
Update time varying vignette
pratikunterwegs Jul 13, 2023
e38f6ac
No colour for Details section time varying vignette
pratikunterwegs Jul 13, 2023
7b7b1ed
Update reporting vignette
pratikunterwegs Jul 13, 2023
7c8b508
Rename Rproj file
pratikunterwegs Jul 13, 2023
c43e486
Single-line sentences in static severity vignette
pratikunterwegs Jul 26, 2023
49274fa
Use data from incidence2 and OWID in vignettes
pratikunterwegs Jul 28, 2023
cc83827
Clean up static severity vignette
pratikunterwegs Jul 28, 2023
77421c8
Add structure to vignettes in website
pratikunterwegs Jul 28, 2023
7624544
Fixes to static_severity vignette
pratikunterwegs Jul 31, 2023
55107aa
Fix time_varying severity vignette
pratikunterwegs Jul 31, 2023
9d747d6
Fix ascertainment vignette
pratikunterwegs Jul 31, 2023
f31a0bf
Fix Get started vignette
pratikunterwegs Jul 31, 2023
965512a
Ignore favicons folder
pratikunterwegs Jul 31, 2023
0245bd9
Rename estimate_reporting to estimate_ascertainment
pratikunterwegs Jul 31, 2023
0fb9f06
Rename test file and functions to estimate_ascertainment
pratikunterwegs Jul 31, 2023
205d978
Rename R source file to estimate_ascertainment.R
pratikunterwegs Jul 31, 2023
a94165d
Update vignettes with new fn name estimate_ascertainment()
pratikunterwegs Jul 31, 2023
87ed473
Correct source in documentation
pratikunterwegs Jul 31, 2023
8990320
Rename epi_dist to epidist, fixes #63
pratikunterwegs Aug 2, 2023
d1f1b29
Update function arg to epidist in Readme
pratikunterwegs Aug 2, 2023
34679c3
Automatic readme update
actions-user Aug 2, 2023
5862071
Update title and fix license link
pratikunterwegs Aug 10, 2023
b6ce1f0
Automatic readme update
actions-user Aug 10, 2023
10fc2b1
Include covid data from {covidregionaldata}, WIP #71
pratikunterwegs Aug 11, 2023
2900c56
Remove data from {owidR} in examples and vignettes, fixes #71
pratikunterwegs Aug 11, 2023
bb51f5d
Add covid data as CSV, fixes #71
pratikunterwegs Aug 11, 2023
62d03a4
Add covidregionaldata reference as JSON
pratikunterwegs Aug 14, 2023
55a3450
Suggestions from code review on vignettes
pratikunterwegs Aug 14, 2023
80520f4
Correct ascertainment example - filter dates, fixes #73
pratikunterwegs Aug 14, 2023
3bc9502
Exclude weekly reporting countries from vignette examples
pratikunterwegs Aug 15, 2023
c1706dd
Move concept to Get started
pratikunterwegs Aug 15, 2023
a628c7a
Fix heading levels, fixes #70
pratikunterwegs Aug 15, 2023
a86c704
Heading levels, titles and references
pratikunterwegs Aug 15, 2023
480e9be
Clean up section and plot formatting for vignettes
pratikunterwegs Aug 15, 2023
f8c1d95
Automatic readme update
actions-user Aug 15, 2023
66bfa79
Add issue and PR templates, fixes #69
pratikunterwegs Aug 15, 2023
bb2145c
Edits to vignettes from code review
pratikunterwegs Sep 11, 2023
9a32987
Add further vignette suggestions from review
pratikunterwegs Sep 11, 2023
70955c2
Automatic readme update
actions-user Sep 11, 2023
72ceeeb
Remove dev packages from Suggests
pratikunterwegs Sep 11, 2023
68da8d3
Account for changes to epidist_db(), WIP #80
pratikunterwegs Sep 11, 2023
1683c9a
Remove creation of empty objects
pratikunterwegs Sep 11, 2023
1775d9a
Style vignettes and Readme, also WIP #80
pratikunterwegs Sep 11, 2023
575e765
Update fn get_default_burn_in() for better param access
pratikunterwegs Sep 11, 2023
34438c9
CFR: case fatality risk, use 'ascertainment ratio'
pratikunterwegs Sep 11, 2023
92b79b1
Update Readme.Rmd with details on {epiparameter}
pratikunterwegs Sep 11, 2023
1c72f01
Correct for delays is default, epidist has no default value
pratikunterwegs Sep 11, 2023
73d286e
Change outputs to use full names, e.g. 'mean' instead of 'me'
pratikunterwegs Sep 11, 2023
9ea1efc
Update documentation and miscellaneous fixes
pratikunterwegs Sep 11, 2023
185118a
Updates to vignettes
pratikunterwegs Sep 11, 2023
8c9fa6f
Update Readme.Rmd and DESCRIPTION
pratikunterwegs Sep 11, 2023
74f183c
Correct Readme.Rmd for correction by default
pratikunterwegs Sep 11, 2023
3d0c9d1
Automatic readme update
actions-user Sep 11, 2023
974fd8a
Update pkg data prep and documentation
pratikunterwegs Sep 13, 2023
5bb6b7b
Simplify estimate_rolling()
pratikunterwegs Sep 13, 2023
7f3fcd3
Minor tweaks to docs for estimate_severity()
pratikunterwegs Sep 13, 2023
2d4f399
Simplify estimate_ascertainment(), update docs
pratikunterwegs Sep 13, 2023
80eef05
Add method details to estimate_static(), correct arg order
pratikunterwegs Sep 13, 2023
bbc66fd
Add mthd details est_time_var(), correct arg order
pratikunterwegs Sep 13, 2023
44fe733
Check for parameterised epidist for get default burnin
pratikunterwegs Sep 13, 2023
d96a756
Add checks to known_outcomes(), edit docs
pratikunterwegs Sep 13, 2023
6cd7d85
Unify prepare_data generic and method docs
pratikunterwegs Sep 13, 2023
0139e4e
Basic tests for default burn in
pratikunterwegs Sep 13, 2023
c4d000b
Add tests for time varying ascertainment, add baseline value
pratikunterwegs Sep 13, 2023
0be6de7
Add test for prepare_data with NAs present
pratikunterwegs Sep 13, 2023
853abc1
Update test snapshots
pratikunterwegs Sep 13, 2023
d131482
Minor updates to vignettes
pratikunterwegs Sep 13, 2023
69352e6
Update all Rd files
pratikunterwegs Sep 13, 2023
843d199
Update GHA workflows
pratikunterwegs Sep 13, 2023
0259f3b
Update .gitignore, .lintr, .Rbuildignore
pratikunterwegs Sep 13, 2023
b3d3248
Add citation file
pratikunterwegs Sep 13, 2023
a9474ca
Allow coordinate expansion in Readme plot
pratikunterwegs Sep 13, 2023
068a7be
Automatic readme update
actions-user Sep 13, 2023
4668a31
Unquote dataframe col names on creation
pratikunterwegs Sep 13, 2023
703b4ce
Remove empty vector creation
pratikunterwegs Sep 14, 2023
557dfe9
Use mean method for epidist, fixes #81
pratikunterwegs Sep 14, 2023
84bf574
Rename CFR functions from estimate_* to cfr_*
pratikunterwegs Sep 14, 2023
92fe26c
Rm logical function args
pratikunterwegs Sep 14, 2023
20abcf8
Update Readme and add text to vignettes
pratikunterwegs Sep 14, 2023
6f72ca4
Automatic readme update
actions-user Sep 14, 2023
78b5ab5
Fn arg epidist defaults to NULL
pratikunterwegs Sep 15, 2023
856ed0a
Update fn arg documentation and maths
pratikunterwegs Sep 15, 2023
1dca260
Update math formatting in vignettes
pratikunterwegs Sep 15, 2023
d29fa97
Rename burn_in_value to burn_in, allow 0s
pratikunterwegs Sep 15, 2023
a7393dc
Minor formatting
pratikunterwegs Sep 15, 2023
e32f303
Update wordlist
pratikunterwegs Sep 15, 2023
7216294
Update documentation for burn_in arg
pratikunterwegs Sep 15, 2023
d200323
Update example for cfr_time_varying
pratikunterwegs Sep 15, 2023
65a7897
Update formatting for cfr_time_varying
pratikunterwegs Sep 15, 2023
4830e10
Small possible speed up to cfr_time_varying
pratikunterwegs Sep 15, 2023
6769a93
Test that known_outcomes gives no NAs
pratikunterwegs Sep 15, 2023
b9d3858
Vectorise loop in cfr_time_varying()
pratikunterwegs Sep 15, 2023
23c1fc7
Remove DS_Store file
pratikunterwegs Sep 15, 2023
a6902c2
Rename MLE to maximum likelihood estimate
pratikunterwegs Sep 15, 2023
824e8cf
Add citation for Covid-19 CFR estimate, add to ref library
pratikunterwegs Sep 15, 2023
2b6171a
Update Rd files with new documentation
pratikunterwegs Sep 15, 2023
fe70059
prepare_data() can handle incidence2 objects
pratikunterwegs Sep 15, 2023
57b4f7c
Remove unused variable in prepare_data()
pratikunterwegs Sep 15, 2023
a1a9762
Add data.table to Suggests
pratikunterwegs Sep 15, 2023
60e8ae4
Add input checking on data.frames
pratikunterwegs Sep 15, 2023
14da422
Add prepare_data docu for grouped incidence2 data
pratikunterwegs Sep 19, 2023
aca88a4
Update epidist access, fixes #84
pratikunterwegs Oct 2, 2023
450b0c0
Update known_outcomes() snapshot
pratikunterwegs Oct 2, 2023
e2ddbe9
Automatic readme update
actions-user Oct 2, 2023
ee443f9
Fix linter issues
pratikunterwegs Oct 2, 2023
1d402f1
Add new reviewer credits
pratikunterwegs Oct 13, 2023
5cefab5
Add helper fn for density from closure or epidist
pratikunterwegs Oct 16, 2023
53e6cee
Rename epidist to delay_dist and allow closure
pratikunterwegs Oct 16, 2023
1011115
Update vignettes to use delay_dist arg
pratikunterwegs Oct 16, 2023
24d7d50
Automatic readme update
actions-user Oct 16, 2023
8145afc
Rename delay_dist to delay_density, remove epidist support
pratikunterwegs Oct 19, 2023
7614cff
Remove get_density() and get_default_burn_in()
pratikunterwegs Oct 19, 2023
0d7e13e
Update tests with new fn args, remove epidists
pratikunterwegs Oct 19, 2023
5011da1
Remove tests for get_default_burn_in()
pratikunterwegs Oct 19, 2023
cf0d7ed
Update man pages and wordlist
pratikunterwegs Oct 19, 2023
f5c1032
Update Readme and vignettes to remove epiparameter
pratikunterwegs Oct 19, 2023
a47db65
Add vignette on delay distribution density functions
pratikunterwegs Oct 19, 2023
30f951e
Update DESCRIPTION, gitignore, and pkgdown yaml
pratikunterwegs Oct 19, 2023
df7dfce
Automatic readme update
actions-user Oct 19, 2023
17aed35
Strip whitespace
pratikunterwegs Oct 19, 2023
9a38e3d
Correct error message on `delay_density` arg
pratikunterwegs Oct 25, 2023
7dd9c1f
Remove n_args check on delay_density, fixes #89
pratikunterwegs Oct 26, 2023
c895524
Use parameter names for Gamma dist in tests
pratikunterwegs Oct 26, 2023
245f2c5
Edits to text and examples from code review
pratikunterwegs Oct 26, 2023
99efb15
Automatic readme update
actions-user Oct 26, 2023
173102d
Remove duplicate entry on website
pratikunterwegs Oct 30, 2023
c941fb9
Update `cfr_rolling()`, WIP #95 #97
pratikunterwegs Oct 31, 2023
5f30440
Update `cfr_time_varying()`, WIP #95
pratikunterwegs Oct 31, 2023
b17f57d
Update `estimate_severity()`, WIP #97
pratikunterwegs Oct 31, 2023
4f26d79
Update `known_outcomes()`, WIP #97
pratikunterwegs Oct 31, 2023
af1ed4f
Update tests and documentation
pratikunterwegs Oct 31, 2023
01f33e0
Add test for cfr_rolling vs cfr_time_varying returns
pratikunterwegs Oct 31, 2023
a942d14
Rename `known_outcomes()` to `estimate_outcomes()`
pratikunterwegs Oct 27, 2023
35d1bbe
Use `estimate_outcomes()` rather than `known_outcomes()`
pratikunterwegs Oct 27, 2023
edba0ea
Update documentation for `estimate_outcomes()`
pratikunterwegs Nov 1, 2023
80690ff
Update 'u_t' def in vignette
pratikunterwegs Nov 1, 2023
514dbdf
Add more checks on delay_density, fixes #89
pratikunterwegs Oct 27, 2023
415ce81
Add internal fn to check fn for N req args
pratikunterwegs Oct 31, 2023
69b7256
Tests for test_fn_req_args
pratikunterwegs Oct 31, 2023
92ae2e2
Use test_fn_req_args
pratikunterwegs Oct 31, 2023
06c6053
Update documentation for test_fn_req_args
pratikunterwegs Oct 31, 2023
61469b7
Remove checks on delay_density in some fns
pratikunterwegs Nov 1, 2023
81b5421
Add and use helper fn to check numeric output
pratikunterwegs Nov 2, 2023
77283f5
Fn test req args allows `...`
pratikunterwegs Nov 2, 2023
f69b0ce
Add tests and docs for delay_dens checkers
pratikunterwegs Nov 2, 2023
8bce11d
Add notes for delay_dens checking
pratikunterwegs Nov 2, 2023
a70dc1a
Update helper fns, add test for primitive fn
pratikunterwegs Nov 2, 2023
fe821ed
Test fn req args handles primitives appropriately
pratikunterwegs Nov 6, 2023
a0a8aae
Rename cfr_*() files, fixes #91
pratikunterwegs Nov 6, 2023
49072d5
Set fill_NA = TRUE by default with msg, update tests and vignettes
pratikunterwegs Nov 7, 2023
e3d03d5
Add fn for pkg install check and test prepare_data with mocking
pratikunterwegs Nov 7, 2023
68b0907
Update Rd files
pratikunterwegs Nov 7, 2023
50f6e16
Format pkg representation
pratikunterwegs Nov 8, 2023
2406430
is_pkg_installed Inherits params from requireNamespace
pratikunterwegs Nov 8, 2023
d21e3de
Escape curly braces for pkg notation in msg
pratikunterwegs Nov 8, 2023
2bea29f
Vapply avoids loops in cfr_rolling.R
pratikunterwegs Nov 16, 2023
8d7db4c
Correct known_onsets shifting
pratikunterwegs Nov 16, 2023
7babf50
Compact iteration in cfr_time_varying.R
pratikunterwegs Nov 16, 2023
fe9dd14
Remove duplicated date col in Readme.Rmd
pratikunterwegs Nov 16, 2023
83df8e8
Automatic readme update
actions-user Nov 16, 2023
d3332ac
Vignette edits from code review
pratikunterwegs Nov 16, 2023
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
18 changes: 18 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^\.github$
^codecov\.yml$
^README\.Rmd$
^\.lintr$
^\_pkgdown.yml$
^cran-comments\.md$
^doc$
^docs$
^Meta$
^pkgdown$
^data-raw$
^revdep$
^CRAN-SUBMISSION$
^_pkgdown\.yml$
^CITATION\.cff$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
41 changes: 41 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to _cfr_

This outlines how to propose a change to _cfr_.

## Making changes

If you want to make a change, it's a good idea to first file an issue and make sure someone from the team agrees that it’s needed.
If you’ve found a bug, please file an issue that illustrates the bug with a minimal
[reprex](https://www.tidyverse.org/help/#reprex) (this will also help you write a unit test, if needed). See [bug report template](https://github.com/epiverse-trace/cfr/issues/new?assignees=&labels=&template=bug_report.md&title=). If you have a feature request see [feature request](https://github.com/epiverse-trace/cfr/issues/new?assignees=&labels=&template=feature_request.md&title=).

### Pull request process

See [pull request template](https://github.com/epiverse-trace/cfr/blob/main/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md)

* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("epiverse-trace/cfr", fork = TRUE)`.

* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`.
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
* Create a Git branch for your pull request (PR). We recommend using `usethis::pr_init("brief-description-of-change")`.

* Make your changes, commit to git, and then create a PR by running `usethis::pr_push()`, and following the prompts in your browser.
The title of your PR should briefly describe the change.
The body of your PR should contain `Fixes #issue-number`.

* For user-facing changes, add a bullet to the top of `NEWS.md` (i.e. just below the first header). Follow the style described in <https://style.tidyverse.org/news.html>.

### Code style

* New code should follow the tidyverse [style guide](https://style.tidyverse.org).
You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR.

* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), for documentation.

* We use [testthat](https://cran.r-project.org/package=testthat) for unit tests.
Contributions with test cases included are easier to accept.

## Code of Conduct

Please note that the _cfr_ project is released with a
[Contributor Code of Conduct](https://github.com/epiverse-trace/.github/blob/main/CODE_OF_CONDUCT.md). By contributing to this
project you agree to abide by its terms.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

*Bugs* may include behaviour that does not impact package functionality, but which seems as though it might not be intended by the package developers.

Please place an "x" in all the boxes that apply
---------------------------------------------

- [ ] I have the most recent version of _cfr_ and R
- [ ] I have found a bug
- [ ] I have a [reproducible example](https://reprex.tidyverse.org/articles/reprex-dos-and-donts.html)
- [ ] I want to request a new feature

--------

Please include a brief description of the problem with a code example:

```r
# insert reprex here
```

---------
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest a feature to be added to this package
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. E.g. "When passing arguments as [...]"

**Describe the solution you would like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request here.
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
* **Please check if the pull request fulfills these requirements**

- [ ] I have read the CONTRIBUTING guidelines
- [ ] The commit message follows our guidelines
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)


* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)

* **What is the current behaviour?** (You can also link to an open issue here)

* **What is the new behaviour (if this is a feature change)?**

* **Does this PR introduce a breaking change?** (What changes might users need to make in their workflow due to this PR?)

* **Other information**:
94 changes: 94 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# Reproduce locally by running:
# ```r
# pak::pak(c("any::rcmdcheck", "."), dependencies = "Config/Needs/check")
# rcmdcheck::rcmdcheck()
# ```
on:
push:
branches: [main, master]
paths:
- 'data/**'
- 'R/**'
- 'inst/**'
- 'man/**'
- 'src/**'
- 'tests/**'
- 'vignettes/**'
- 'DESCRIPTION'
- 'NAMESPACE'
- 'LICENSE'
- '.Rbuildignore'
- '.github/workflows/R-CMD-check.yaml'
pull_request:
paths:
- 'data/**'
- 'R/**'
- 'inst/**'
- 'man/**'
- 'src/**'
- 'tests/**'
- 'vignettes/**'
- 'DESCRIPTION'
- 'NAMESPACE'
- 'LICENSE'
- '.Rbuildignore'
- '.github/workflows/R-CMD-check.yaml'

name: R-CMD-check

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
# Exists since R 4.3.0 but `false` by default
_R_CHECK_LENGTH_COLON_: true

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
id: rcmdcheck
with:
upload-snapshots: true

# fail-fast but only if rcmdcheck step fails
- name: Manual fail-fast
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: always() && steps.rcmdcheck.outcome == 'failure'
run: gh run cancel ${{ github.run_id }}
83 changes: 83 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# Reproduce locally by running:
# ```r
# pak::pak(c("any::pkgdown", "."), dependencies = "Config/Needs/website")
# pkgdown::build_site()
# ```
on:
push:
branches: [main, master]
paths:
- 'README.Rmd'
- 'README.md'
- 'index.Rmd'
- 'index.md'
- 'man/**'
- 'vignettes/**'
- '_pkgdown.yml'
- 'pkgdown/**'
- 'DESCRIPTION'
- '.Rbuildignore'
- '.github/**'
pull_request:
paths:
- 'README.Rmd'
- 'README.md'
- 'index.Rmd'
- 'index.md'
- 'man/**'
- 'vignettes/**'
- '_pkgdown.yml'
- 'pkgdown/**'
- 'DESCRIPTION'
- '.Rbuildignore'
- '.github/**'
release:
types: [published]
workflow_dispatch:

name: pkgdown

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pkgdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- 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: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
# We clean on releases because we want to remove old vignettes,
# figures, etc. that have been deleted from the `main` branch.
# But we clean ONLY on releases because we want to be able to keep
# both the 'stable' and 'dev' websites.
# Also discussed in https://github.com/r-lib/actions/issues/484
clean: ${{ github.event_name == 'release' }}
branch: gh-pages
folder: docs
70 changes: 70 additions & 0 deletions .github/workflows/render_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: render-readme

# Controls when the action will run. Triggers include:
#
# - button trigger from github action page
# - on changes to readme.Rmd

on:
workflow_dispatch:
push:
paths:
- 'README.Rmd'
- '.github/workflows/render_readme.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
render-readme:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repos
uses: actions/checkout@v3

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

- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v2

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rmarkdown, local::.

- name: Compile the readme
run: |
writeLines(
knitr::knit_expand(
"README.Rmd",
packagename = read.dcf("DESCRIPTION", "Package"),
gh_repo = Sys.getenv("GITHUB_REPOSITORY")
),
"README_expanded.Rmd"
)
rmarkdown::render(
"README_expanded.Rmd",
output_file = "README.md",
output_dir = "."
)
shell: Rscript {0}

- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add README.md
# Also add README figures if they exist
if [ -d man/figures ]
then
git add man/figures/
fi
git diff-index --quiet HEAD || git commit -m "Automatic readme update"
git push origin || echo "No changes to push"
Loading
Loading