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.3.0 #394

Closed
wants to merge 1,144 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1144 commits
Select commit Hold shift + click to select a range
e344b23
Update `CITATION.cff`
joshwlambert Jun 10, 2024
61f46c5
update clean_epidist_params to use switch and do.call instead of S3 d…
joshwlambert Jun 4, 2024
577ef07
updated clean_epidist_params functions documentation
joshwlambert Jun 4, 2024
fc5fbb0
update clean_epidist_params calls in accessors and new_epidist
joshwlambert Jun 4, 2024
ece1bdc
updated clean_epidist_params tests
joshwlambert Jun 4, 2024
fe9a010
add bullet point to design principles vignette on S3 dispatch vs swit…
joshwlambert Jun 4, 2024
759f1d7
add bullet point on dot prefix for internal functions to design princ…
joshwlambert Jun 4, 2024
03cf0e8
add dot prefix to clean_epidist_params and clean_epidist_params_* fun…
joshwlambert Jun 4, 2024
27c730f
update .clean_epidist_params documentation to group all .clean_epidis…
joshwlambert Jun 4, 2024
bd6036e
add probability distribution name for more informative error in .clea…
joshwlambert Jun 4, 2024
b4f80d1
add "lambda" as possible parameterisation for poisson distribution in…
joshwlambert Jun 4, 2024
aede4e9
fixed error messages from .clean_epidist_params in unit tests
joshwlambert Jun 4, 2024
a301d67
enforce stricter parameter matching in is_epidist_params
joshwlambert Jun 5, 2024
7327502
remove .clean_epidist_params_weibull as it only has one parameterisation
joshwlambert Jun 5, 2024
7df71f3
simplify .clean_epidist_params_* functions logic with after stricter …
joshwlambert Jun 5, 2024
d164ba3
fix is_epidist_params and .clean_epidist_params to work with truncate…
joshwlambert Jun 5, 2024
f38e099
only append mean to prob_dist_params if in set of dists in new_epidist
joshwlambert Jun 10, 2024
c402a9f
slightly increase tolerance in expect_equal for .read.epidist_db test
joshwlambert Jun 10, 2024
00ccde8
updated .clean_epidist_params documentation
joshwlambert Jun 10, 2024
2bde263
add exponential distribution to is_epidist_params, relates #328
joshwlambert Jun 4, 2024
496447e
added .clean_epidist_params_exp function, WIP #328
joshwlambert Jun 10, 2024
601340a
added exp option to switch in create_epidist_prob_dist, WIP #328
joshwlambert Jun 10, 2024
c59c5b5
added exponential option to switch in family.epidist, closes #328
joshwlambert Jun 10, 2024
57d1af3
added unit tests for .clean_epidist_params and create_epidist_prob_di…
joshwlambert Jun 10, 2024
665c5a1
refactor epireview_to_epidist and update as_epidist documentation, re…
joshwlambert Jun 12, 2024
25ab487
added unit test for as_epidist from issue #327
joshwlambert Jun 12, 2024
9838987
linting epireview_to_epidist
joshwlambert Jun 13, 2024
a10fae6
fixed region in epireview_to_epidist when location or country are NA
joshwlambert Jun 13, 2024
22ce679
add sd to summary stats when given as distribution parameter in epire…
joshwlambert Jun 13, 2024
09b196c
add unit test for as_epidist lasssa incubation period
joshwlambert Jun 13, 2024
5499038
rename summary_stats_type to param_type and use toString over paste(c…
joshwlambert Jun 13, 2024
77b3df4
add "Mean sd" pattern to gsub in epireview_to_epidist, relates #303
joshwlambert Jun 14, 2024
a7d6b96
added as_epidist unit test for ebola serial interval, relates #303
joshwlambert Jun 14, 2024
0f805b9
fixed sd_ and inference_method assignment and param_type subsetting i…
joshwlambert Jun 14, 2024
31d1bc5
add ability to specify prob_dist in epireview_to_epidist, relates #310
joshwlambert Jun 14, 2024
8194345
add unit tests for as_epidist specifying prob_dist
joshwlambert Jun 14, 2024
de3fb15
add section on specifying prob_dist in as_epidist in data_from_epirev…
joshwlambert Jun 14, 2024
ecaaa17
updated WORDLIST
joshwlambert Jun 14, 2024
b03b0cf
fix wording and add reference to data_from_epireview vignette
joshwlambert Jun 17, 2024
119b6f8
add Faye et al. to references JSON
joshwlambert Jun 17, 2024
a38f4d9
add nolint flag to epireview_to_epidist for cyclocomp
joshwlambert Jun 17, 2024
e87f090
add text to data_from_epireview vignette to clarify subsetting
joshwlambert Jun 24, 2024
325562f
add Config/Needs/check: mrc-ide/epireview to DESCRIPTION
joshwlambert Jun 24, 2024
78fe7ed
move from pkgdown development mode: auto -> unreleased (until CRAN re…
joshwlambert Jun 26, 2024
eca12de
add pkgdown favicons
joshwlambert Jun 26, 2024
584eaf8
add CC0 to LICENSE file, closes #300
joshwlambert Jun 26, 2024
aca9849
make LICENSE valid DCF
joshwlambert Jun 26, 2024
817a464
remove example stub in as_epidist.data.frame
joshwlambert Jun 27, 2024
75b697c
remove new_epidist example as function is internal and requires :::
joshwlambert Jun 27, 2024
dff50b5
add installation instructions from r-universe
joshwlambert Jun 27, 2024
a1aa66e
update WORDLIST
joshwlambert Jun 27, 2024
e4581a2
update sysdata
joshwlambert Jun 27, 2024
23d2823
clarify sysdata release_bullets point
joshwlambert Jun 27, 2024
c619781
re-compile extract-bias vignette
joshwlambert Jun 27, 2024
648aa0d
update dev-utils
joshwlambert Jun 27, 2024
9e1e805
update GHA workflows
joshwlambert Jun 27, 2024
96f777d
reduce validate-json CI triggers
joshwlambert Jun 27, 2024
bc5f4ce
set _R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_ to true in check.env
joshwlambert Jun 27, 2024
1404f90
draft NEWS.md for v0.2.0 release
joshwlambert Jun 27, 2024
6d8677d
Automatic readme update
actions-user Jun 27, 2024
c384032
Updates to data_from_epireview vignette
joshwlambert Jul 9, 2024
61ddfad
fix ebola delay variable in data_from_epireview
joshwlambert Jul 9, 2024
759ee47
clarify subsetting of multi-row entries in data_from_epireview
joshwlambert Jul 9, 2024
b1f733f
clarify wording on missing probability distribution in data_from_epir…
joshwlambert Jul 9, 2024
c70fd6c
add info on summary stat conversion in data_from_epireview
joshwlambert Jul 9, 2024
6d73c26
remove empty limitations section from data_from_epireview
joshwlambert Jul 9, 2024
b9cfa1a
Update URL in inst/CITATION
joshwlambert Jul 9, 2024
e142902
Return directly from switch() in as.function.epidist()
joshwlambert Jul 9, 2024
5d9ed55
Return directly from data.frame() in as.data.frame.epidist()
joshwlambert Jul 9, 2024
435b719
Remove dev/ from URL in print.multi_epidist()
joshwlambert Jul 9, 2024
0c0ee42
Remove unnecessary sprintf() from format.epidist()
joshwlambert Jul 9, 2024
b173023
Improve wording in README intro
joshwlambert Jul 9, 2024
71ed5bf
Automatic readme update
actions-user Jul 9, 2024
bb04233
Remove mention of loading {distributional} from epiparameter.Rmd
joshwlambert Jul 9, 2024
5ac05f3
Improve wording on epiparameter library in epiparameter.Rmd
joshwlambert Jul 9, 2024
2fc8966
Remove technical note on epidist list printing in epiparameter.Rmd
joshwlambert Jul 9, 2024
bdd0265
print tail of appended db in epiparameter.Rmd
joshwlambert Jul 9, 2024
6fcc6c5
Clarify adding entries to database locally in epiparameter.Rmd
joshwlambert Jul 9, 2024
cf6a147
Improve wording on contributing in epiparameter.Rmd
joshwlambert Jul 9, 2024
ddae8ac
Remove text on generic functions in extract_convert.Rmd
joshwlambert Jul 9, 2024
a1203c5
add link to database vignette in README
joshwlambert Jul 9, 2024
21685ae
update google sheet link in README
joshwlambert Jul 9, 2024
dc7ed9c
refactor epiparameter.Rmd by reducing technical information on classe…
joshwlambert Jul 9, 2024
42b29a2
added @seealso tags linking convert_params_to_summary_stats and conve…
joshwlambert Jul 9, 2024
16b5b1c
Automatic readme update
actions-user Jul 9, 2024
1f96e09
updated WORDLIST
joshwlambert Jul 10, 2024
f376e64
updated print.multi_epidist snapshots
joshwlambert Jul 10, 2024
bd50cc6
add info on WHO workshop to NEWS.md
joshwlambert Jul 10, 2024
1887291
remove as_is: true from vignettes
joshwlambert Jul 10, 2024
54a7708
increment minor version
joshwlambert Jul 10, 2024
2fa717a
Update `CITATION.cff`
joshwlambert Jul 10, 2024
d9039b3
Update `CITATION.cff`
joshwlambert Jul 10, 2024
710aaa4
add distribution parameters to JSON for Mpox incubation from Guzzetta…
joshwlambert Jul 2, 2024
389d712
update sysdata
joshwlambert Jul 2, 2024
b2f2b80
Add author name et al to DOI
jamesmbaazam Jul 3, 2024
ddb89b7
Fix linting issues
jamesmbaazam Jul 3, 2024
2bdcd15
add .citet function and tests and use in database vignette
joshwlambert Jul 15, 2024
e6428b9
bump to development version
joshwlambert Jul 15, 2024
9bf112b
Update `CITATION.cff`
joshwlambert Jul 15, 2024
d435022
remove <vb_epidist> class and methods
joshwlambert Jul 15, 2024
0bd919d
remove vb_epidist tests and snapshots
joshwlambert Jul 15, 2024
370b97f
remove header and vb args from print.epidist and format.epidist
joshwlambert Jul 15, 2024
781b0a9
remove vb_epidist from epidist_distribution_functions
joshwlambert Jul 15, 2024
e1e8922
improve wording in README
joshwlambert Jul 15, 2024
d4e8cbd
Automatic readme update
actions-user Jul 15, 2024
9c91e85
renamed epidist to epiparameter and multi_epidist to multi_epiparamet…
joshwlambert Jul 17, 2024
3bf30f1
remove epiparameter from create_*() and .clean_*() function names
joshwlambert Jul 17, 2024
9a632d4
Automatic readme update
actions-user Jul 17, 2024
33da14a
linting
joshwlambert Jul 17, 2024
820436b
bring back epidist_db with deprecation warning
joshwlambert Aug 12, 2024
f28ec86
update variable names used in documentation
joshwlambert Aug 12, 2024
700202b
Update `CITATION.cff`
joshwlambert Aug 12, 2024
4feb4e5
replace validate_epiparameter with assert_epiparameter, closes #361
joshwlambert Aug 12, 2024
a3c7a7b
improve error msg if elements are missing in assert_epiparameter
joshwlambert Aug 12, 2024
4f2177f
add test_epiparameter function, relates #364
joshwlambert Aug 12, 2024
874b4b1
add tests for test_epiparameter
joshwlambert Aug 12, 2024
d20c044
add bullet to design principles vignette on class design and <contact…
joshwlambert Aug 13, 2024
6a6c869
add test_epiparameter to _pkgdown.yml
joshwlambert Aug 13, 2024
0d76856
added c.epiparameter and c.multi_epiparameter functions, fixes #351
joshwlambert Aug 13, 2024
f51567a
added tests for c methods, relates #351
joshwlambert Aug 13, 2024
a5705c3
fix vignette using append()
joshwlambert Aug 14, 2024
794b42a
Add tr_() function
Bisaloo Aug 13, 2024
3b85059
Include context in translation strings
Bisaloo Aug 13, 2024
8d2b70d
Set explicit style for potools
Bisaloo Aug 13, 2024
c7ca53a
Extract translatable strings
Bisaloo Aug 13, 2024
f49e61c
Remove comment marker from translatable string
Bisaloo Aug 13, 2024
dcdab5d
use dot prefix for all internal functions, fixes #344
joshwlambert Aug 14, 2024
f4ba92a
add more info to design principles on internal function naming and ex…
joshwlambert Aug 14, 2024
a1a96a4
temporary fix for epireview subsetting until issue is fixed to pass t…
joshwlambert Aug 15, 2024
43f12e1
remove suppressWarnings calls when calling load_epidata as no longer …
joshwlambert Aug 15, 2024
aa7dbc9
removed duplicated load_epidata calls in coercion tests
joshwlambert Aug 15, 2024
4f70080
fix logic of if statement in coercion tests
joshwlambert Aug 15, 2024
465f677
add Chikungunya parameters to database
joshwlambert Sep 13, 2024
a8a9f3d
add case fatality risk as accepted epi_distribution to data_dictionar…
joshwlambert Sep 13, 2024
d4b8888
updated sysdata
joshwlambert Sep 13, 2024
1dd58f5
update tests that regression test the epiparameter database
joshwlambert Sep 13, 2024
b6ae203
clean prob_dist internally to resolve case sensitive matching, fixes …
joshwlambert Sep 13, 2024
c98a071
add conversion for lnorm median and dispersion to convert_summary_sta…
joshwlambert Sep 20, 2024
0777ae4
add test for lnorm median and dispersion conversion
joshwlambert Sep 20, 2024
1dbbfa8
add dispersion, dispersion_ci_limits and dispersion_ci to create_summ…
joshwlambert Sep 20, 2024
4881ddd
update outdated create_summary_stats function return documentation
joshwlambert Sep 20, 2024
53d3a2c
move lnorm dispersion from parameters into summary_statistics in JSON DB
joshwlambert Sep 20, 2024
71d2329
add properyNames to summary_statistic object to strengthen validation…
joshwlambert Sep 20, 2024
ff5766e
move negative binomial mean from summary statistics to params in JSON DB
joshwlambert Sep 23, 2024
4c00039
add propertyNames, mean and sd descriptions and if-else check for mea…
joshwlambert Sep 23, 2024
ce7484a
change validate-json workflow to `strict = FALSE` due to distribution…
joshwlambert Sep 23, 2024
3bfd80a
renamed create_prob_dist to create_prob_distribution
joshwlambert Sep 19, 2024
d7a7f8e
rename create_prob_dist R and test file to create_prob_distribution
joshwlambert Sep 19, 2024
02983a3
return character from create_prob_distribution if parameters not given
joshwlambert Sep 19, 2024
44ca884
rename create_prob_distribution args to prob_distribution and prob_di…
joshwlambert Sep 19, 2024
f07e7dd
clean prob_distribution in create_prob_distribution to prevent string…
joshwlambert Sep 19, 2024
1aee9a4
rename is_epiparameter_params args prob_distribution and prob_distrib…
joshwlambert Sep 19, 2024
79443e7
rename .clean_params args to prob_distribution and prob_distribution_…
joshwlambert Sep 19, 2024
3075209
add parameter standardisation to create_prob_distribution
joshwlambert Sep 19, 2024
128d9fd
update create_prob_distribution test error messages
joshwlambert Sep 19, 2024
27db2f5
rename .calc_dist_params args to prob_distribution and prob_distribut…
joshwlambert Sep 20, 2024
9755a81
remove prob_distribution_params argument from .calc_dist_params and c…
joshwlambert Sep 23, 2024
268e5e8
remove truncation argument from new_epiparameter
joshwlambert Sep 23, 2024
433ba6b
remove discretise argument from new_epiparameter
joshwlambert Sep 23, 2024
b3ea21d
remove copying mean from summary_stats to prob_dist_params in new_epi…
joshwlambert Sep 23, 2024
ca6711f
remove .clean_string call in new_epiparameter as its now called in cr…
joshwlambert Sep 23, 2024
08fe6b4
remove stopifnot that checks uncertainty and parameters match as this…
joshwlambert Sep 23, 2024
8bbd2c8
replace prob_dist and prob_dist_params arguments in new_epiparameter …
joshwlambert Sep 23, 2024
20dd6a0
simplified new_epiparameter with prob_distribution from create_prob_d…
joshwlambert Sep 23, 2024
0edf552
remove prob_distribution_params arg from epiparameter() and use creat…
joshwlambert Sep 23, 2024
0925c6b
replace assert_character with stopifnot to check for char or distribu…
joshwlambert Sep 23, 2024
1ce3a0e
move uncertainty checking after new_epiparameter call in epiparameter…
joshwlambert Sep 23, 2024
31c921a
remove prob_dist_params and rename prob_distribution argument from ne…
joshwlambert Sep 23, 2024
311607f
update assert_epiparameter and test_epiparameter to use prob_distribu…
joshwlambert Sep 23, 2024
74f2073
move prob_distribution and prob_distribution_params args documentatio…
joshwlambert Sep 23, 2024
b12ee3b
inherit arg documentation from create_prob_distribution in is_epipara…
joshwlambert Sep 23, 2024
de37fb6
remove discretise argument from epiparameter()
joshwlambert Sep 23, 2024
2e28cde
remove truncation argument from epiparameter()
joshwlambert Sep 23, 2024
e37f0c7
move auto_calc_params to last named argument in epiparameter() and ne…
joshwlambert Sep 23, 2024
fe2b128
add documentation for prob_distribution arg in epiparameter()
joshwlambert Sep 23, 2024
e06a44c
update $prob_dist to $prob_distribution in functions that use <epipar…
joshwlambert Sep 24, 2024
1077174
update $prob_dist to $prob_distribution in tests that use <epiparameter>
joshwlambert Sep 24, 2024
d34a155
reorganise logic in create_prob_distribution to handle NA parameters
joshwlambert Sep 24, 2024
bea371a
add %||%
joshwlambert Sep 24, 2024
edc7a31
improve handling of uncertainty in epiparameter()
joshwlambert Sep 24, 2024
a0e1234
temp fix for handling precision parameter in .format_params
joshwlambert Sep 24, 2024
a149940
update sysdata
joshwlambert Sep 24, 2024
0075017
update .epireview_to_epiparameter to use user specified distribution …
joshwlambert Sep 25, 2024
20deb62
add .clean_uncertainty to handle multitude of cases where uncertainty…
joshwlambert Sep 25, 2024
c3dac08
fix $prob_distribution in <epiparameter> methods
joshwlambert Sep 25, 2024
be6cd7e
simplify epiparameter() by calling .clean_uncertainty
joshwlambert Sep 25, 2024
31ce51f
update sysdata
joshwlambert Sep 25, 2024
db5524e
update vignettes with new epiparameter constructor
joshwlambert Sep 25, 2024
35656c4
update .calc_dist_params tests for removed argument
joshwlambert Sep 25, 2024
a62859e
update tests and snapshots using new epiparameter constructor signature
joshwlambert Sep 25, 2024
7ddc879
update as_epiparameter test to expect error
joshwlambert Sep 25, 2024
e64e98a
update function documentation for new function signatures
joshwlambert Sep 25, 2024
ef1b30d
update examples to use new epiparameter function signature
joshwlambert Sep 25, 2024
340c6a9
remove outdated argument documentation from new_epiparameter
joshwlambert Sep 25, 2024
da44319
correctly specify uncertainty in epiparameter() example
joshwlambert Sep 25, 2024
f2585e1
fix epiparameter example
joshwlambert Sep 25, 2024
27fdb68
fix as_parameter unit test due to {epireview} update
joshwlambert Sep 30, 2024
00a5cf0
bump min R version to >= 4.1.0
joshwlambert Sep 30, 2024
f31d0cc
add point to design principles vignette on bumping min R version agai…
joshwlambert Sep 30, 2024
1026239
Update `CITATION.cff`
joshwlambert Oct 1, 2024
7a87fc3
Add `<epiparameter>` diagram to design principles vignette (#383)
joshwlambert Oct 7, 2024
cfb50e7
Update `CITATION.cff`
joshwlambert Oct 7, 2024
21833aa
add get_parameters <multi_epiparameter> method
joshwlambert Oct 1, 2024
b1f939a
add aggregate <epiparameter> method, closes #271
joshwlambert Oct 1, 2024
089ed73
update is_parameter_params and .clean_params to work with mixture dis…
joshwlambert Oct 1, 2024
7580cfb
update as.data.frame <epiparameter> method to handle multiple citatio…
joshwlambert Oct 1, 2024
b95c7f8
update discretise and is_continuous to work with mxiture distributions
joshwlambert Oct 1, 2024
95945fe
update NAMESPACE
joshwlambert Oct 1, 2024
0c658af
combine metadata and method assessment in aggregate method
joshwlambert Oct 1, 2024
b88c0f4
add .get_mixture_family function
joshwlambert Oct 1, 2024
88356ef
add tests for .get_mixture_family
joshwlambert Oct 1, 2024
d4a86ce
improve <epiparameter> format method for aggregated objects
joshwlambert Oct 1, 2024
6287b6d
improve handling NA sample_size in aggregate method
joshwlambert Oct 1, 2024
553e00f
add aggregate unit tests
joshwlambert Oct 1, 2024
47496c3
suppress <epiparameter> messages in unit tests
joshwlambert Oct 1, 2024
ab2e88a
use vapply in .citet
joshwlambert Oct 2, 2024
e73e2a9
use toString over paste(..., collapse = ", ") in format method
joshwlambert Oct 2, 2024
3da021d
improve warning in aggregate()
joshwlambert Oct 7, 2024
127c0df
fix linting in aggregate
joshwlambert Oct 7, 2024
69c8644
use isTRUE to handle NAs from family in format.epiparameter
joshwlambert Oct 7, 2024
28dda5a
fix partial matching in as_epiparameter arg passed through ... in dat…
joshwlambert Oct 7, 2024
957f8f9
Subsetting incubation period directly using parameter_type column ins…
CarmenTamayo Aug 20, 2024
628f834
Renaming marburg entry to match previous direct selection of incubati…
CarmenTamayo Aug 20, 2024
bcf7d24
Adding step to visualise multi row entries
CarmenTamayo Aug 20, 2024
63dc4db
Adding text about checking entries manually and explanation from epir…
CarmenTamayo Aug 20, 2024
cdf10c4
Filtering generation time entries using their ids instead of row numbers
CarmenTamayo Aug 20, 2024
7b2b5b2
Subsetting parameter table directly to include only serial intervals
CarmenTamayo Aug 20, 2024
00c8e67
Selecting correct row using parameter id instead of row number
CarmenTamayo Aug 20, 2024
562dfd4
Automatic readme update
actions-user Oct 7, 2024
ddb91bf
linting data_from_epireview vignette
joshwlambert Oct 8, 2024
9fde97a
update as_epiparameter to use prob_distribution
joshwlambert Oct 8, 2024
d6c1c16
update WORDLIST
joshwlambert Oct 8, 2024
c07542d
- use epireview functions to get parameters
cm401 May 16, 2024
7875629
- update notes on vignette
cm401 May 16, 2024
d674f87
update data_from_epireview vignette
joshwlambert Oct 8, 2024
380f375
remove epireview::get_parameter from data_from_epireview vignette
joshwlambert Oct 8, 2024
c316732
clarify PERG work in data_from_epireview vignette
joshwlambert Oct 8, 2024
1006506
rename epi_dist arg to epi_name, closes #386
joshwlambert Oct 9, 2024
8c89ee4
renamed epi_distribution with epi_name in parameter DB and data dicti…
joshwlambert Oct 9, 2024
aff941a
updated sysdata
joshwlambert Oct 9, 2024
6da54ec
Automatic readme update
actions-user Oct 9, 2024
ccd68e2
add units to DB entries, closes #343
joshwlambert Oct 9, 2024
fa9ae5e
add units to data dictionary, relates #343
joshwlambert Oct 9, 2024
25a00d3
add units to create_metadata, relates #343
joshwlambert Oct 9, 2024
ae6289f
use units in .epireview_to_epiparameter
joshwlambert Oct 9, 2024
25bb82e
update plot.epiparameter to plot units if given, relates #343
joshwlambert Oct 9, 2024
c1a75db
update sysdata
joshwlambert Oct 9, 2024
e634b71
add plot.epiparameter test for plotting units, relates #343
joshwlambert Oct 9, 2024
30e10f1
ensure multi-row epireview entries have the same units in coercion
joshwlambert Oct 9, 2024
42fbb22
Update `NEWS.md` for v0.3.0 release (#392)
joshwlambert Oct 9, 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
19 changes: 19 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^\.github$
^codecov\.yml$
^README\.Rmd$
^_pkgdown\.yml$
^docs$
^pkgdown$
^CODE_OF_CONDUCT\.md$
^doc$
^Meta$
^.lintr$
^CITATION\.cff$
^data-raw$
^tools$
^vignettes/*.orig$
^vignettes/figure$
^vignettes/articles$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.bib -linguist-detectable
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
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'
merge_group:
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

steps:
- uses: actions/checkout@v4

- 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
error-on: '"note"'

# 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 }}
82 changes: 82 additions & 0 deletions .github/workflows/dependency-change.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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
on:
pull_request:
paths:
- 'DESCRIPTION'

name: Analyze dependency changes

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

permissions:
pull-requests: write

jobs:
dependency-changes:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: any::pak, glue, gh

- name: Analyze dependency changes
shell: Rscript {0}
run: |
deps_base <- pak::pkg_deps("${{ github.repository }}@${{ github.base_ref }}", dependencies = TRUE) |>
subset(!directpkg) |>
subset(is.na(priority))
# We install from PR number rather than branch to deal with the case
# of PR coming from forks
deps_head <- pak::pkg_deps("${{ github.repository }}#${{ github.event.number }}", dependencies = TRUE) |>
subset(!directpkg) |>
subset(is.na(priority))

deps_added <- deps_head |>
subset(!ref %in% deps_base$ref)

deps_removed <- deps_base |>
subset(!ref %in% deps_head$ref)

if (nrow(deps_added) + nrow(deps_removed) > 0) {

message("Dependencies have changed! Analyzing...")

if (nrow(deps_added) > 0) {
nudge <- "Reach out on slack (`#code-review` or `#help` channels) to double check if there are base R alternatives to the new dependencies.\n"
} else {
nudge <- ""
}

msg <- glue::glue(
.sep = "\n",
"This pull request:",
"- Adds {nrow(deps_added)} new dependencies (direct and indirect)",
"- Adds {length(unique(deps_added$sysreqs))} new system dependencies",
"- Removes {nrow(deps_removed)} existing dependencies (direct and indirect)",
"- Removes {length(unique(deps_removed$sysreqs))} existing system dependencies",
"",
nudge,
"(Note that results may be inaccurate if you branched from an outdated version of the target branch.)"
)

message("Posting results as a pull request comment.")

gh::gh(
"POST /repos/{repo}/issues/{issue_number}/comments",
repo = "${{ github.repository }}",
issue_number = "${{ github.event.number }}",
body = msg
)

}
53 changes: 53 additions & 0 deletions .github/workflows/lint-changed-files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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
on:
workflow_dispatch:
pull_request:
branches: [main, master]
paths:
- '**.R'
- '**.Rmd'
- '**/.lintr'
- '**/.lintr.R'

name: lint-changed-files

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

jobs:
lint-changed-files:
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:
extra-packages: |
any::gh
any::lintr
any::purrr
any::cyclocomp
epiverse-trace/etdev
needs: check

- name: Install package
run: R CMD INSTALL .

- name: Extract and lint files changed by this PR
run: |
files <- gh::gh("/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files")
changed_files <- purrr::map_chr(files, "filename")
all_files <- list.files(recursive = TRUE)
exclusions_list <- as.list(setdiff(all_files, changed_files))
lintr::lint_package(exclusions = exclusions_list)
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
90 changes: 90 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# 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/**'
merge_group:
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

permissions:
contents: write

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

- 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: Check website links
uses: untitaker/[email protected]
with:
args: docs/

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'merge_group' && 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
Loading
Loading