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

Dev fix review items #203

Merged
merged 229 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
28d32d4
Simplify and fix concatenar_vals_token()
Bisaloo Jul 16, 2024
ce1b0f7
Replace use of superseded _at() dplyr functions
Bisaloo Jul 22, 2024
0e6a5c2
Remove duplicate ggplot theme specification
Bisaloo Jul 22, 2024
bc13e03
Simplify nested paste0() calls
Bisaloo Jul 22, 2024
11a8a0f
Make arg defaults explicit
Bisaloo Jul 22, 2024
901dfc0
Use c() instead of append()
Bisaloo Jul 22, 2024
691cb4d
Make code responsive to events_adicionales length
Bisaloo Jul 22, 2024
8703b4f
Make sure input checking happens early enough
Bisaloo Jul 22, 2024
d331b62
Add comment to explicit the necessary of 'tam' arg
Bisaloo Jul 22, 2024
a028071
Use geom_col() rather than geom_bar()
Bisaloo Jul 22, 2024
596fd91
Rely on data.frame recycling of scalar where appropriate
Bisaloo Jul 22, 2024
95418ae
Avoid reusing var name for two different object types
Bisaloo Jul 22, 2024
ab2201c
Read RDS files rather than RDA files
Bisaloo Jul 22, 2024
5d423d4
Remove unnecessary parse(eval()) calls
Bisaloo Jul 22, 2024
6d3dd4c
Remove input checking in internal functions
Bisaloo Jul 22, 2024
34894f1
Simplify obtener_fila_mas_casos()
Bisaloo Jul 22, 2024
9c2242e
Remove always TRUE condition
Bisaloo Jul 22, 2024
0ad6c54
Use orientation = "y" instead of coord_flip()
Bisaloo Jul 22, 2024
a5d321a
Remove unneeded special handling of edge cases
Bisaloo Jul 22, 2024
b9d3d93
Remove unnecessary initializations
Bisaloo Jul 22, 2024
e1b3a86
Simplify special casing of Malaria
Bisaloo Jul 22, 2024
b14914b
Remove non-existing argument in toString()
Bisaloo Jul 22, 2024
72ba167
Ensure connection is always closed
Bisaloo Jul 23, 2024
86b927b
Exit early on edge case
Bisaloo Jul 23, 2024
c55e306
Avoid growing vectors in loops
Bisaloo Jul 23, 2024
892f834
Copy infrastructure files from packagetemplate
Bisaloo Jul 23, 2024
4b325bb
Automatic readme update
actions-user Jul 23, 2024
6a2eee8
Copy infrastructure files from packagetemplate
Bisaloo Jul 23, 2024
4d6218d
Fix some typos
Bisaloo Jul 23, 2024
0201c37
Run styler::style_pkg()
Bisaloo Jul 24, 2024
484c1d0
Fix remaining lints
Bisaloo Jul 24, 2024
cf0451a
Fix typo in arg name
Bisaloo Jul 24, 2024
c6ebb57
Fix tidy eval in mutate LHS
Bisaloo Jul 24, 2024
3f0c856
Add missing file.path() call
Bisaloo Jul 24, 2024
20ab4a6
Fix age unit conversion
Bisaloo Jul 24, 2024
328e4b2
chore: updated cre role
GeraldineGomez Jul 26, 2024
8d231bb
chore: updated Bogota D.C. to Bogota DC
GeraldineGomez Jul 26, 2024
8f5e88d
chore: increase timeout request
GeraldineGomez Jul 26, 2024
d4d8344
fix: renamed parameter departmento to departamento
GeraldineGomez Jul 26, 2024
8742db7
chore: added words in the WORDLIST
GeraldineGomez Jul 26, 2024
f6a776c
fix: typos, accents and punctuation in the function documentations
GeraldineGomez Jul 26, 2024
9bce7c8
fix(agrupar_rango_edad): added na.rm = TRUE in max
GeraldineGomez Jul 26, 2024
0877214
chore(agrupar_sex_semanaepi): added a comma in the description field
GeraldineGomez Jul 26, 2024
6535eed
fix(agrupar_edad_sex): added na.rm = TRUE in max
GeraldineGomez Jul 26, 2024
5b92ea6
fix(agrupar_edad): added na.rm = TRUE in max
GeraldineGomez Jul 26, 2024
b3cafed
chore: improved the description of the return value
GeraldineGomez Jul 26, 2024
be9b2da
chore(agrupar_tipo_caso): improved the description of cols_tipo param…
GeraldineGomez Jul 26, 2024
0358ed0
chore(agrupar_per_etn): improved the description of cols_etn parameter
GeraldineGomez Jul 26, 2024
e94a581
chore: improved the description of poblacion parameter
GeraldineGomez Jul 26, 2024
259906f
chore: improved the description of year parameter
GeraldineGomez Jul 26, 2024
50b7788
chore(calcular_incidencia): added commas in the description of data_i…
GeraldineGomez Jul 26, 2024
6a8ee02
chore(calcular_incidencia): clarify the description of sex parameter
GeraldineGomez Jul 26, 2024
3323171
feat: replaced return value with a list containing the incidence and …
GeraldineGomez Jul 26, 2024
e28bfc5
feat: obtaining incidence result
GeraldineGomez Jul 26, 2024
ff5a5a4
fix: incidence column name in data_geo_incidencia
GeraldineGomez Jul 26, 2024
36b560c
fix: sexo reference in group_by
GeraldineGomez Jul 26, 2024
409ab36
fix(calcular_incidencia): added un in the function description
GeraldineGomez Jul 26, 2024
af9ce4b
chore: improved the description of the return value
GeraldineGomez Jul 26, 2024
632012b
chore: removed the use of the remove_val_nin function
GeraldineGomez Jul 26, 2024
4d187b9
fix: example in limpiar_val_atipic
GeraldineGomez Jul 26, 2024
ba7db48
fix: added is.na validation in nombre_evento validation
GeraldineGomez Jul 26, 2024
37855f6
fix: removed data cleaning for dates since its condition does not app…
GeraldineGomez Jul 26, 2024
33a8753
chore: specify the location of the API Datos Abiertos
GeraldineGomez Jul 26, 2024
81ad9d8
chore: updated examples using calcular_incidencia
GeraldineGomez Jul 26, 2024
8b45eb7
chore: updated examples using import_data_event
GeraldineGomez Jul 26, 2024
be73a99
chore(plot_map): increase font size of texts
GeraldineGomez Jul 26, 2024
b4ae123
chore(plot_map): added units to guides_colourbar
GeraldineGomez Jul 26, 2024
f645907
fix(plot_sex_semanaepi): added na.rm validation
GeraldineGomez Jul 26, 2024
a5661f4
fix: moved x-axis label to y-axis label
GeraldineGomez Jul 26, 2024
b4ffb57
fix: removed extra + symbol
GeraldineGomez Jul 26, 2024
7482956
fix: added scale_discrete to the y-axis
GeraldineGomez Jul 26, 2024
d0f83ac
fix: remove redundant legend.position
GeraldineGomez Jul 26, 2024
7afcfd2
fix: added accent to the word numérico
GeraldineGomez Jul 26, 2024
bee396d
chore(tema_sivirep): increase font size
GeraldineGomez Jul 26, 2024
3b5cb9a
chore(tema_sivirep): added element_blank
GeraldineGomez Jul 26, 2024
7b79c61
chore(skeleton): added consentimiento parameter in import_data_event
GeraldineGomez Jul 26, 2024
de0fc7f
chore(skeleton): reduced to 5 five year the distribution of cases
GeraldineGomez Jul 26, 2024
0fb155b
fix: added is.na validation in obtener_year
GeraldineGomez Jul 26, 2024
1316b86
fix: update test results with function changes
GeraldineGomez Jul 26, 2024
91e5600
chore(automated_report): added reference and explanation for SIVIGILA
GeraldineGomez Jul 26, 2024
9057c10
chore(automated_report): improved the text for package import
GeraldineGomez Jul 26, 2024
17ad35c
chore(custom_analysis): added consentimiento parameter
GeraldineGomez Jul 26, 2024
4752888
feat: added ruta_dir and consentimiento parameters
GeraldineGomez Jul 26, 2024
e51c9ed
feat: store data event in R_user_dir or ruta_dir based on consentimie…
GeraldineGomez Jul 26, 2024
e3e80c1
fix: remove files when cache is FALSE
GeraldineGomez Jul 26, 2024
221ea73
fix: fix: close connection of bin content
GeraldineGomez Jul 26, 2024
4b182aa
feat: added description of ruta_dir parameter
GeraldineGomez Jul 26, 2024
8578d62
feat: added description of consentimiento parameter
GeraldineGomez Jul 26, 2024
67afb2a
feat: added @inheritParams import_data_event
GeraldineGomez Jul 26, 2024
11005ea
chore: updated documentation
GeraldineGomez Jul 26, 2024
4e36514
feat(skeleton): added text of incidence population
GeraldineGomez Jul 26, 2024
a9e479f
chore: added tools dependency
GeraldineGomez Jul 26, 2024
679ea78
fix: removed extra comma
GeraldineGomez Jul 26, 2024
21e555e
fix: remove whitespace
GeraldineGomez Jul 26, 2024
a10f728
fix: added default values in consentimiento and ruta_dir paramters
GeraldineGomez Jul 26, 2024
3b613ea
chore: refactor ruta_dir logic into function obtener_ruta_dir
GeraldineGomez Jul 26, 2024
f18135c
fix: removed quotes from incidencia name
GeraldineGomez Jul 26, 2024
cc49d94
chore: added words to WORDLIST
GeraldineGomez Jul 26, 2024
b7dfa65
fix: specify es_ES as the language
GeraldineGomez Jul 26, 2024
6d00f49
fix: replace r user dir with extdata
GeraldineGomez Jul 26, 2024
ff01b0f
chore: proof install es dictionary
GeraldineGomez Jul 26, 2024
26c848d
chore: proof install hunspell in any OS
GeraldineGomez Jul 26, 2024
9e39ddd
chore: proof install hunspell on any OS
GeraldineGomez Jul 26, 2024
2d6ca58
chore: proof install hunspell pm macOS
GeraldineGomez Jul 26, 2024
6d79307
fix: recreate import module documentation
GeraldineGomez Jul 26, 2024
3b3b30b
chore: proof for MacOs
GeraldineGomez Jul 26, 2024
f4081a8
fix: typos and accents of cleaning and import module
GeraldineGomez Jul 26, 2024
f093488
fix: typos, accents and punctuation on validation and checking module
GeraldineGomez Jul 26, 2024
0180d56
fix: typos, accents and punctuation on import, plotting, theme and sc…
GeraldineGomez Jul 26, 2024
fe76f4f
fix: typos, accents and punctuation on utils module
GeraldineGomez Jul 26, 2024
fd2c320
chore: improve sivirep vignette
GeraldineGomez Jul 26, 2024
32c59cf
chore: tmp package description
GeraldineGomez Jul 26, 2024
c163b6d
fix: validations and messages typos
GeraldineGomez Jul 26, 2024
8c40914
fix: updated error message in the test for obtener_tip_ocurren_geo
GeraldineGomez Jul 29, 2024
26c905c
test: added test for geo notification
GeraldineGomez Jul 29, 2024
17859ba
test: added test for geo residence
GeraldineGomez Jul 29, 2024
31d7c65
test: added test for concatenar_vals_token
GeraldineGomez Jul 29, 2024
bb58e0f
test: added default result test for obtener_cond_inciden_event
GeraldineGomez Jul 29, 2024
823ce3d
fix: parse to integer the coefficient
GeraldineGomez Jul 29, 2024
c806d18
fix: expected coefficient to 10000
GeraldineGomez Jul 29, 2024
3e268cb
fix: replaces as.integer with L
GeraldineGomez Jul 29, 2024
efea8fb
chore(DESCRIPTION): add tools dependency
GeraldineGomez Jul 30, 2024
c1a9861
chore(DESCRIPTION): upgrade R version to 4.0.0
GeraldineGomez Jul 30, 2024
08ebe12
fix: clean data processing for datasets with multiple years
GeraldineGomez Jul 30, 2024
7201c61
fix: logic to group data by municipality without specifying a department
GeraldineGomez Jul 30, 2024
1532056
fix: removed parameter consentimiento
GeraldineGomez Jul 30, 2024
973431f
fix(obtener_tip_ocurren_geo): apply toupper for param_busqueda
GeraldineGomez Jul 30, 2024
c64240a
fix: replaced "10000" with 10000L
GeraldineGomez Jul 30, 2024
44f95e0
fix(obtener_config_map): generate map using MPIO_CCDGO for all case
GeraldineGomez Jul 30, 2024
d069cfa
fix(plot_map): set geo cols to reference the cols with municipality data
GeraldineGomez Jul 30, 2024
0a403bc
feat: display all epiweeks and adjust scale position and x-axis labels
GeraldineGomez Jul 30, 2024
bc0f01d
chore(plot_years): removed consentimiento parameter
GeraldineGomez Jul 30, 2024
b226ae0
fix(plot_tipo_caso_years): typo in return value
GeraldineGomez Jul 30, 2024
6b22d8a
feat(obtener_estetica_escala): add option to wrap text in labels
GeraldineGomez Jul 30, 2024
3263f1c
fix(obtener_ruta_dir): add mensaje_error parameter and remove redunda…
GeraldineGomez Jul 30, 2024
9c711b7
fix(import_pob_proyecciones): replace extdata folder with ruta_dir logic
GeraldineGomez Jul 30, 2024
a177a16
fix(import_pob_proyecciones): add caching logic
GeraldineGomez Jul 30, 2024
829ffb2
chore(import_pob_proyecciones): add inheritParams import_pob_incidencia
GeraldineGomez Jul 30, 2024
636df96
fix(import_pob_riesgo): replace extdata folder with ruta_dir logic
GeraldineGomez Jul 30, 2024
92a8375
fix(import_pob_riesgo): add caching logic
GeraldineGomez Jul 30, 2024
1672c7c
chore(import_pob_riesgo): add inheritParams import_pob_incidencia
GeraldineGomez Jul 30, 2024
5a479ff
feat(calcular_incidencia): added cache parameter
GeraldineGomez Jul 30, 2024
4685936
feat(obtener_pob_incidencia): add ruta_dir and cache parameter
GeraldineGomez Jul 30, 2024
325880d
chore: update documentation for import functions
GeraldineGomez Jul 30, 2024
d0605fb
test: remove consentimiento parameter
GeraldineGomez Jul 30, 2024
a70394d
chore(vignette): remove consentimiento parameter
GeraldineGomez Jul 30, 2024
bb37667
chore(skeleton): remove consentimiento parameter
GeraldineGomez Jul 30, 2024
44404c7
chore(skeleton): added cache for import_data_event
GeraldineGomez Jul 30, 2024
477b9d2
fix(skeleton): caption of plot_tipo_caso_years
GeraldineGomez Jul 30, 2024
0bcef98
fix(skeleton): remove word reporte from semanaepi and init date
GeraldineGomez Jul 30, 2024
f0b77a3
feat(skeleton): add map by cases and rename section to Distribucion e…
GeraldineGomez Jul 30, 2024
7c4c68c
fix(skeleton): Colombia map case to generate by municipality
GeraldineGomez Jul 30, 2024
f555eed
test: adjust logic to generate the map of Colombia by mpio
GeraldineGomez Jul 30, 2024
04c8b97
fix: year to 5
GeraldineGomez Jul 30, 2024
926b53c
fix(obtener_pob_incidencia): added year parameter
GeraldineGomez Jul 30, 2024
8805289
fix(obtener_eventos_relacionados): logic and messages for unavailable…
GeraldineGomez Jul 31, 2024
086731d
fix(plot_map): format condition of cols_geo_ocurrencia
GeraldineGomez Jul 31, 2024
6692a28
fix(import_data_event): add warning when event or year is not avaliab…
GeraldineGomez Jul 31, 2024
8479783
fix(import_data_event): logic of malaria exception
GeraldineGomez Jul 31, 2024
3e72351
fix: remove white space
GeraldineGomez Jul 31, 2024
00efaac
fix(skeleton): add etiqueta_geo in caption of plot_top_area_geo
GeraldineGomez Jul 31, 2024
ab91908
fix(skeleton): append data_event_years with data_event
GeraldineGomez Jul 31, 2024
3ffdc28
fix(skeleton): event mapping for obtener_tip_ocurren_geo
GeraldineGomez Jul 31, 2024
7c22cc0
chore(skeleton): add year in incidence conclusion
GeraldineGomez Jul 31, 2024
35ebcca
fix(plot_tipo_caso): added wrap_text to x-axis labels
GeraldineGomez Jul 31, 2024
52e7746
fix(skeleton): removed import with source
GeraldineGomez Jul 31, 2024
5514bc0
fix(skeleton): lintr characters
GeraldineGomez Jul 31, 2024
56c35a0
chore: updated entire documentation
GeraldineGomez Jul 31, 2024
09bbc14
chore: lintr proof of conditional
GeraldineGomez Jul 31, 2024
6194c1f
chore: proof macOs spelling es-ES
GeraldineGomez Jul 31, 2024
e5e40cc
chore: proof of es_ES installation on MacOs and Windows
GeraldineGomez Jul 31, 2024
6d7518e
chore: update sivirep-package
GeraldineGomez Jul 31, 2024
6dc9e74
chore: proof Windows es_ES installation
GeraldineGomez Jul 31, 2024
1cf3e88
chore: added portable to hunspell on Windows
GeraldineGomez Jul 31, 2024
61ae74f
chore: adjust commands for Windows installation of hunspell
GeraldineGomez Jul 31, 2024
1fc3556
chore: proof Windows mv command
GeraldineGomez Aug 1, 2024
523200c
feat: added subtitle option in them_sivirep
GeraldineGomez Aug 1, 2024
7e33a13
fix(plot_fecha_inisintomas): legend labels with correct nombre_events
GeraldineGomez Aug 1, 2024
cac8ed0
feat: add subtitle with occurrence geo in plot_dpto and plot_mpio
GeraldineGomez Aug 1, 2024
9f5d749
chore(skeleton): complete área geográfica with de ocurrencia
GeraldineGomez Aug 1, 2024
e8fbe71
fix(skeleton): the number of years displayed in the captions
GeraldineGomez Aug 1, 2024
9333a7f
fix: import with stringr
GeraldineGomez Aug 1, 2024
6c3eab9
fix: refactor condition to pass lintr validation
GeraldineGomez Aug 1, 2024
ee582a8
fix: remove ajustar_texto
GeraldineGomez Aug 1, 2024
847d5fa
fix(import_shape_map): add extra validation to Shapefile
GeraldineGomez Aug 1, 2024
61b3e20
chore: add epidemiological to WORDLIST
GeraldineGomez Aug 2, 2024
687e67d
chore(plot_years): update example with Chagas
GeraldineGomez Aug 2, 2024
2b4e1bd
chore(import_data_event): update example with Chagas
GeraldineGomez Aug 2, 2024
be27f5f
feat(import_shape_map): add ruta_dir parameter and logic related
GeraldineGomez Aug 2, 2024
a5602f2
feat(import_shape_map): add cache parameter and logic related
GeraldineGomez Aug 2, 2024
4822cfc
feat(plot_map): add ruta_dir and cache params for obtaining the Shape…
GeraldineGomez Aug 2, 2024
dd6171d
fix(obtener_ruta_dir): remove temporalmente from the stop message
GeraldineGomez Aug 2, 2024
6faf6a0
chore: remove tmp Shapefiles
GeraldineGomez Aug 2, 2024
29e4f4d
test(obtener_info_depts): add Bogota case
GeraldineGomez Aug 2, 2024
12af287
fix(import_shape_map): remove unlink command
GeraldineGomez Aug 2, 2024
3f41b02
fix(import_data_event): replace break with next
GeraldineGomez Aug 2, 2024
3f8d760
chore: refactor ajustar_texto logic and str_wrap
GeraldineGomez Aug 2, 2024
3b7505d
fix(plot_fecha_inisintomas): replace str_wrap with new logic of obten…
GeraldineGomez Aug 2, 2024
a5f3ded
fix(skeleton): height and width of sex plot
GeraldineGomez Aug 2, 2024
887df01
fix: remove whispace
GeraldineGomez Aug 2, 2024
8850d41
chore: add start and final year in additional_diseases key
GeraldineGomez Aug 13, 2024
9c7440e
chore: added consecutive_12 in cols remover key
GeraldineGomez Aug 13, 2024
3a729ff
fix: code event to 105 in occurrence_geo_diseases key
GeraldineGomez Aug 13, 2024
601c336
chore(skeleton): replace Dengue with Chagas as default event
GeraldineGomez Aug 13, 2024
243ca8e
chore: remove tmp spelling validation
GeraldineGomez Aug 14, 2024
66ae470
fix: replace paste with toString
GeraldineGomez Aug 14, 2024
9bef434
chore: restore next command
GeraldineGomez Aug 14, 2024
dce0e20
fix: importar to import and added the filter function in checking module
GeraldineGomez Aug 14, 2024
318b3db
chore: added spelling mkdir command
GeraldineGomez Aug 14, 2024
f463377
chore: added windows folder for dicitiontaries
GeraldineGomez Aug 14, 2024
cd6b7a6
chore: restore spelling file
GeraldineGomez Aug 14, 2024
f557702
fix: validate Malaria Asociada parenthesis pattern
gsgomezm Sep 18, 2024
a968a2f
fix: age range and validation
gsgomezm Sep 18, 2024
60a93f2
chore: parametrization of code_eve reference
gsgomezm Sep 18, 2024
690caee
chore(incidence): add cache parameter in functions to improve the per…
gsgomezm Sep 18, 2024
f40c1ac
fix(agrupar_edad_sex): age validation
gsgomezm Sep 18, 2024
cbbe783
fix(import_data_event): add fec_def validation
GeraldineGomez Sep 18, 2024
2ad86ef
fix(plotting): automatization of plot scale based on column reference
GeraldineGomez Sep 18, 2024
dd1dd81
chore: standardization of cod_eve reference
GeraldineGomez Sep 18, 2024
4186c0b
fix(limpiar_data_sivigila): age validations
GeraldineGomez Sep 18, 2024
d5d21b8
chore: update README file
GeraldineGomez Sep 18, 2024
aa7db16
chore(skeleton): add cache parameter reference in incidence function
GeraldineGomez Sep 18, 2024
b4b77ae
chore(skeleton): standardization of nombre_evento and cod_eve column
GeraldineGomez Sep 18, 2024
d67803e
chore: update documentation
GeraldineGomez Sep 18, 2024
ade3e5b
fix(estandarizar_geo_cods): add validation of geo columns
GeraldineGomez Sep 18, 2024
7ab39d1
chore(convert_edad): add others uni_med to convert the age
GeraldineGomez Sep 18, 2024
aa55d24
chore: remove spelling validation
GeraldineGomez Sep 18, 2024
8ed0bfd
chore: remove spelling
GeraldineGomez Sep 18, 2024
e8cf594
fix: lintr space and lines
GeraldineGomez Sep 18, 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
55 changes: 47 additions & 8 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,49 @@
# 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:
branches: [main, master]
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 }}
Expand All @@ -29,13 +65,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- name: Remove Microsoft repository configuration
if: runner.os == 'ubuntu-latest'
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update

- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

Expand All @@ -51,5 +81,14 @@ jobs:
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
)

}
3 changes: 2 additions & 1 deletion .github/workflows/lint-changed-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -34,6 +34,7 @@ jobs:
any::gh
any::lintr
any::purrr
any::cyclocomp
epiverse-trace/etdev
needs: check

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ 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 }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -72,7 +73,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'merge_group' && github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@4.1.4
uses: JamesIves/github-pages-deploy-action@v4.6.1
with:
# We clean on releases because we want to remove old vignettes,
# figures, etc. that have been deleted from the `main` branch.
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/render_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Reproduce locally by running:
# ```r
# pak::pak(c("any::rmarkdown", "any::usethis", "."))
# writeLines(
# knitr::knit_expand(
# "README.Rmd",
# packagename = read.dcf("DESCRIPTION", "Package"),
# gh_repo = usethis:::github_remote_list()$repo_spec
# ),
# "README_expanded.Rmd"
# )
# rmarkdown::render(
# "README_expanded.Rmd",
# output_file = "README.md",
# output_dir = "."
# )
# unlink("README_expanded.Rmd")
# ```
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:
branches:
# This may seem like a no-op but it prevents triggering on tags
# We use '**' rather '*' to accomodate names like 'dev/branch-1'
- '**'
paths:
- 'README.Rmd'
- '.github/workflows/render_readme.yml'

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

permissions:
contents: write

# 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@v4

- 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 pull --rebase origin ${{ github.ref.name }}
git push origin || echo "No changes to push"
Loading