Skip to content

Commit

Permalink
Merge branch 'master' into add-monthly-brackets-106
Browse files Browse the repository at this point in the history
  • Loading branch information
njtierney authored Jan 15, 2025
2 parents 50ef110 + 1c90a1c commit b12e3ab
Show file tree
Hide file tree
Showing 274 changed files with 13,169 additions and 2,866 deletions.
12 changes: 7 additions & 5 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
^.*\.Rproj$
^CODE_OF_CONDUCT\.md$
^LICENSE\.md$
^README\.Rmd$
^README_cache$
^data-raw$
^.*\.Rproj$
^\.Rproj\.user$
^codecov\.yml$
^\.github$
^\.pre-commit-config\.yaml$
^_pkgdown\.yml$
^codecov\.yml$
^data-raw$
^docs$
^pkgdown$
^CODE_OF_CONDUCT\.md$
^LICENSE\.md$
^touchstone$
^paper$
8 changes: 3 additions & 5 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand All @@ -29,7 +29,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

Expand All @@ -41,9 +41,7 @@ jobs:

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

- uses: r-lib/actions/check-r-package@v2
Expand Down
37 changes: 25 additions & 12 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# 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:
push:
branches: [main, master]
tags: ['*']
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: pkgdown
extra-packages: any::pkgdown, local::.
needs: website

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- 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:
clean: false
branch: gh-pages
folder: docs
32 changes: 26 additions & 6 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# 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:
push:
Expand All @@ -15,16 +15,36 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: covr::codecov()
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@
inst/doc
.DS_Store
docs
README_cache
README_cache
.Rprofile
.vscode/launch.json
.pre-commit-config.yaml
tests/README.md
paper/*.html
paper/*.pdf
paper/paper_cache/
paper/paper_files/
chitra/
40 changes: 27 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: conmat
Title: Builds contact matrices using GAMs and population data
Version: 0.0.0.9004
Version: 0.0.2.9000
Authors@R: c(
person(given = "Nicholas",
family = "Tierney",
Expand All @@ -17,6 +17,11 @@ Authors@R: c(
role = c("aut"),
email = "[email protected]",
comment = c(ORCID = "https://orcid.org/0000-0002-6982-5989")),
person(given = "Michael",
family = "Lydeamore",
role = "aut",
email = "[email protected]",
comment = c(ORCID = "https://orcid.org/0000-0001-6515-827X")),
person("Commonwealth of Australia", "AEC", role = c("cph")),
person("Australian Bureau of Statistics", "ABS", role = c("cph"))
)
Expand All @@ -25,35 +30,44 @@ Description: Builds contact matrices using GAMs and population data. This packag
Electoral Commission and Australian Bureau of Statistics) 2020.
License: MIT + file LICENSE
Depends:
R (>= 2.10)
R (>= 4.1.0)
Suggests:
covr,
knitr,
vdiffr,
testthat (>= 3.0.0),
rmarkdown,
future
future,
spelling,
deSolve
VignetteBuilder:
knitr
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-GB
Language: en-US
LazyData: true
LazyDataCompression: xz
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.1
RoxygenNote: 7.3.2
Imports:
mgcv,
dplyr,
dplyr (>= 1.0.9),
tidyr (>= 1.2.0),
cli,
stats,
tidyr,
socialmixr,
socialmixr (>= 0.2.0),
ggplot2,
tibble,
tibble (>= 3.1.8),
patchwork,
magrittr,
stringr,
rlang,
glue,
rlang (>= 1.0.4),
glue (>= 1.6.2),
readr,
furrr,
purrr
purrr (>= 1.0.1),
tidyselect,
vctrs,
scales,
english,
waldo,
stringr
100 changes: 91 additions & 9 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,42 +1,124 @@
# Generated by roxygen2: do not edit by hand

S3method(age_breaks,array)
S3method(age_breaks,conmat_age_matrix)
S3method(age_breaks,conmat_setting_prediction_matrix)
S3method(age_breaks,default)
S3method(age_breaks,matrix)
S3method(age_breaks,ngm_setting_matrix)
S3method(age_breaks,numeric)
S3method(age_breaks,predicted_contacts)
S3method(age_breaks,setting_contact_model)
S3method(age_breaks,setting_data)
S3method(age_breaks,setting_vaccination_matrix)
S3method(age_breaks,transmission_probability_matrix)
S3method(age_label,conmat_population)
S3method(age_label,default)
S3method(as_conmat_population,"NULL")
S3method(as_conmat_population,data.frame)
S3method(as_conmat_population,default)
S3method(as_conmat_population,grouped_df)
S3method(as_conmat_population,list)
S3method(as_setting_prediction_matrix,conmat_setting_prediction_matrix)
S3method(as_setting_prediction_matrix,default)
S3method(as_setting_prediction_matrix,list)
S3method(autoplot,conmat_age_matrix)
S3method(autoplot,conmat_setting_prediction_matrix)
S3method(autoplot,ngm_setting_matrix)
S3method(autoplot,setting_vaccination_matrix)
S3method(autoplot,transmission_probability_matrix)
S3method(generate_ngm,conmat_population)
S3method(generate_ngm,conmat_setting_prediction_matrix)
S3method(get_age_population_function,conmat_population)
S3method(get_age_population_function,data.frame)
S3method(population_label,conmat_population)
S3method(population_label,default)
S3method(predictions_to_matrix,predicted_contacts)
S3method(print,conmat_age_matrix)
S3method(print,conmat_population)
S3method(print,conmat_setting_prediction_matrix)
S3method(print,ngm_setting_matrix)
S3method(print,setting_contact_model)
S3method(print,setting_data)
S3method(print,setting_vaccination_matrix)
S3method(print,transmission_probability_matrix)
export("%>%")
export(abbreviate_states)
export(abs_abbreviate_states)
export(abs_age_education_lga)
export(abs_age_education_state)
export(abs_age_lga)
export(abs_age_state)
export(abs_age_work_lga)
export(abs_age_work_state)
export(abs_unabbreviate_states)
export(add_age_partial_sum)
export(add_intergenerational)
export(add_modelling_features)
export(add_offset)
export(add_population_age_to)
export(add_school_work_participation)
export(add_symmetrical_features)
export(age)
export(age_breaks)
export(age_label)
export(age_population)
export(aggregate_predicted_contacts)
export(apply_vaccination)
export(check_lga_name)
export(as_conmat_population)
export(as_setting_prediction_matrix)
export(autoplot)
export(clean_term_names)
export(conmat_population)
export(create_age_grid)
export(estimate_setting_contacts)
export(extract_term_names)
export(extrapolate_polymod)
export(fit_setting_contacts)
export(fit_single_contact_model)
export(generate_ngm)
export(generate_ngm_oz)
export(get_abs_household_size_distribution)
export(get_abs_household_size_population)
export(get_abs_per_capita_household_size)
export(get_abs_per_capita_household_size_lga)
export(get_abs_per_capita_household_size_state)
export(get_age_population_function)
export(get_data_abs_age_education)
export(get_data_abs_age_work)
export(get_household_size_distribution)
export(get_per_capita_household_size)
export(get_polymod_contact_data)
export(get_polymod_per_capita_household_size)
export(get_polymod_population)
export(get_polymod_setting_data)
export(get_setting_transmission_matrices)
export(gg_age_partial_pred_long)
export(gg_age_partial_sum)
export(gg_age_terms_settings)
export(matrix_to_predictions)
export(new_age_matrix)
export(new_ngm_setting_matrix)
export(new_setting_data)
export(per_capita_household_size)
export(plot_matrix)
export(plot_setting_matrices)
export(pivot_longer_age_preds)
export(polymod)
export(population)
export(population_label)
export(predict_contacts)
export(predict_contacts_1y)
export(predict_individual_terms)
export(predict_setting_contacts)
export(predictions_to_matrix)
export(unabbreviate_states)
export(prepare_population_for_modelling)
export(raw_eigenvalue)
export(scaling)
export(setting_prediction_matrix)
export(transmission_probability_matrix)
import(rlang)
importFrom(ggplot2,aes)
importFrom(ggplot2,autoplot)
importFrom(ggplot2,coord_fixed)
importFrom(ggplot2,facet_grid)
importFrom(ggplot2,facet_wrap)
importFrom(ggplot2,geom_tile)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,scale_fill_viridis_c)
importFrom(ggplot2,theme_minimal)
importFrom(magrittr,"%>%")
importFrom(stats,predict)
Loading

0 comments on commit b12e3ab

Please sign in to comment.