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

Pre-release cleanup #649

Merged
merged 28 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
71b9291
deprecate adjust-functions
sbfnk May 1, 2024
029a768
indicate check functions are stable
sbfnk May 1, 2024
de1f1ff
mark deprecated functions as internal
sbfnk May 1, 2024
0d161d1
make more functions internal
sbfnk May 2, 2024
8c685d3
move init_cumulative_fit to deprecated.R
sbfnk May 2, 2024
8e3e6e9
move fit functions to fit.R
sbfnk May 2, 2024
a51d0ee
update lifecycle badges
sbfnk May 2, 2024
8a9eb54
remove explicit references to 2.0.0
sbfnk May 2, 2024
db8f468
completely remove update_list
sbfnk May 2, 2024
d1f6bae
line spacing
sbfnk May 2, 2024
107a70e
update importFrom tags
sbfnk May 2, 2024
b5ed503
remove prior_weight
sbfnk May 1, 2024
dcc1b5f
hard deprecate old truncation options
sbfnk May 2, 2024
88c4bff
make more get_ functions internal
sbfnk May 2, 2024
e66a090
categorise internal functions in pkgdown
sbfnk May 2, 2024
3f8ae7c
order NEWS items
sbfnk May 2, 2024
b69cba4
add news item
sbfnk May 2, 2024
0b0732c
re-render documentation
sbfnk May 2, 2024
64d0c69
remove package qualifier
sbfnk May 2, 2024
805c85e
add PR number
sbfnk May 2, 2024
44ac479
make sure all examples run
sbfnk May 2, 2024
adb9cea
remove package qualifier on internal function
sbfnk May 2, 2024
af5ed72
Apply suggestions from code review
sbfnk May 2, 2024
dea32a0
Merge branch 'main' into deprecate
sbfnk May 2, 2024
0196934
clarify wording in _pkgdown.yml
sbfnk May 2, 2024
e5c4920
Merge branch 'main' into deprecate
jamesmbaazam May 2, 2024
9d6bfc3
simplify internal function listing in pkgdown
sbfnk May 3, 2024
4f3b309
Merge branch 'main' into deprecate
sbfnk May 3, 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
23 changes: 0 additions & 23 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export(LogNormal)
export(NonParametric)
export(Normal)
export(R_to_growth)
export(add_day_of_week)
export(adjust_infection_to_report)
export(apply_tolerance)
export(backcalc_opts)
Expand All @@ -29,20 +28,9 @@ export(calc_summary_measures)
export(calc_summary_stats)
export(clean_nowcasts)
export(collapse)
export(construct_output)
export(convert_to_logmean)
export(convert_to_logsd)
export(convolve_and_scale)
export(copy_results_to_latest)
export(create_backcalc_data)
export(create_clean_reported_cases)
export(create_gp_data)
export(create_initial_conditions)
export(create_obs_model)
export(create_rt_data)
export(create_shifted_cases)
export(create_stan_args)
export(create_stan_data)
export(delay_opts)
export(discretise)
export(discretize)
Expand All @@ -54,7 +42,6 @@ export(estimate_delay)
export(estimate_infections)
export(estimate_secondary)
export(estimate_truncation)
export(estimates_by_report_date)
export(expose_stan_fns)
export(extract_CrIs)
export(extract_inits)
Expand All @@ -73,8 +60,6 @@ export(get_parameters)
export(get_pmf)
export(get_raw_result)
export(get_regional_results)
export(get_regions)
export(get_regions_with_most_reports)
export(gp_opts)
export(growth_to_R)
export(lognorm_dist_def)
Expand All @@ -96,27 +81,19 @@ export(rstan_sampling_opts)
export(rstan_vb_opts)
export(rt_opts)
export(sample_approx_dist)
export(save_estimate_infections)
export(save_input)
export(secondary_opts)
export(set_dt_single_thread)
export(setup_default_logging)
export(setup_dt)
export(setup_future)
export(setup_logging)
export(setup_target_folder)
export(simulate_infections)
export(simulate_secondary)
export(stan_laplace_opts)
export(stan_opts)
export(stan_pathfinder_opts)
export(stan_sampling_opts)
export(stan_vb_opts)
export(summarise_key_measures)
export(summarise_results)
export(trunc_opts)
export(update_horizon)
export(update_list)
export(update_secondary_args)
import(Rcpp)
import(methods)
Expand Down
17 changes: 12 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
## Major changes

* Delay discretisation is now based on a two-day censoring window (with uniform probability in between), based on recommendations in [Park et al, medRxiv, 2024](https://doi.org/10.1101/2024.01.12.24301247). By @sbfnk in #518 and reviewed by @jamesmbaazam.
* The interface to generating delay distributions has been completely overhauled. Instead of calling `dist_spec()` users now specify distributions using functions that represent the available distributions, i.e. `LogNormal()`, `Gamma()` and `Fixed()`. See `?EpiNow2::Distributions`. Uncertainty is specified using calls of the same nature, to `Normal()`. More information on the underlying design can be found in `inst/dev/design_dist.md` By @sbfnk in #504 and reviewed by @seabbs.

## OTher breaking changes
## Deprecations

* The functions `get_dist`, `get_generation_time`, `get_incubation_period` have been deprecated and replaced with examples. By @sbfnk in #481 and reviewed by @seabbs.
* The functions `sample_approx_dist()`, `report_cases()`, and `adjust_infection_reports()` have been deprecated as the functionality they provide can now be achieved with `simulate_secondary()`. See #597 by @jamesmbaazam and reviewed by @sbfnk.
* The utility function `update_list()` has been deprecated in favour of `utils::modifyList()` because it comes with an installation of R. By @jamesmbaazam in #491 and reviewed by @seabbs.
* The `fixed` argument to `dist_spec` has been deprecated and replaced by a `fix_dist()` function. By @sbfnk in #503 and reviewed by @seabbs.
* The functions `get_dist()`, `get_generation_time()`, `get_incubation_period()` have been deprecated and replaced with examples. By @sbfnk in #481 and reviewed by @seabbs.
* The function `init_cumulative_fit()` has been deprecated. By @jamesmbaazam in #541 and reviewed by @sbfnk.
* The model-specific `weigh_delay_priors` argument has been deprecated in favour of delay-specific prior weighting using `weight_priors`. See `generation_time_opts()`, `delay_opts()`, and `trunc_opts()`. By @sbfnk in #630 and reviewed by @jamesmbaazam.
* All functions now use a `data` argument to pass data. The existing `reported_cases`, `reports`, and `obs` arguments are deprecated and will be removed in v2.0.0. By @jamesmbaazam in #638 and reviewed by @sbfnk.

## Other breaking changes

* Updated `estimate_infections()` so that rather than imputing missing data, it now skips these data points in the likelihood. This is a breaking change as it alters the behaviour of the model when dates are missing from a time series but are known to be zero. We recommend that users check their results when updating to this version but expect this to in most cases improve performance. By @seabbs in #528 and reviewed by @sbfnk.
* `simulate_infections` has been renamed to `forecast_infections` in line with `simulate_secondary` and `forecast_secondary`. The terminology is: a forecast is done from a fit to existing data, a simulation from first principles. By @sbfnk in #544 and reviewed by @seabbs.
* A new `simulate_infections` function has been added that can be used to simulate from the model from given initial conditions and parameters. By @sbfnk in #557 and reviewed by @jamesmbaazam.
Expand All @@ -23,9 +31,10 @@
* Removed references to the no longer existing `forecast_infections` function. By @sbfnk in #460 and reviewed by @seabbs.
* The contribution guide has been improved to include more detail on ways to contribute new features/enhancements, report bugs, and improve or suggest vignettes. By @jamesmbaazam in #464 and reviewed by @seabbs.
* Updated the code in `inst/CITATION` and added a GitHub Actions workflow to auto-generate `citation.cff` so that the two citation files are always in sync with `DESCRIPTION`. By @jamesmbazam in #467, with contributions from @Bisaloo, and reviewed by @seabbs and @sbfnk.
* Updated the documentation of the `reported_cases` argument in `estimate_infections()` and `confirm` column in the `obs` argument of `estimate_truncation()` to allow `numeric` types, not just `integer`. See #594, by @jamesmbaazam, and reviewed by @sbfnk.
* Updated the documentation of the `data` argument in `estimate_infections()` and `confirm` column in the `obs` argument of `estimate_truncation()` to allow `numeric` types, not just `integer`. See #594, by @jamesmbaazam, and reviewed by @sbfnk.
* Removed the reporting templates that were previously provided. See #604 by @jamesmbaazam, and reviewed by @sbfnk.
* Clarified how estimated or specified uncertainty around data truncation can be passed to `epinow()`, `regional_epinow()`, and `estimate_infections()` using the `truncation` argument. By @jamesmbaazam in #644 and reviewed by @sbnfk.
* Internal functions have been removed from the pkgdown index. By @sbfnk in #735.

## Package

Expand All @@ -43,9 +52,7 @@
* Replaced descriptions and plot labels to be more general and clearer. By @sbfnk in #621 and reviewed by @jamesmbaazam.
* Argument choices have been moved into default arguments. By @sbfnk in #622 and reviewed by @seabbs.
* `simulate_infections()` gained the argument `seeding_time` to change the seeding time. Additionally, the documentation was improved. By @sbfnk in #627 and reviewed by @jamesmbaazam.
* The model-specific `weigh_delay_priors` argument has been deprecated in favour of delay-specific prior weighting using `weight_priors`. See `generation_time_opts()`, `delay_opts()`, and `trunc_opts()`. By @sbfnk in #630 and reviewed by @jamesmbaazam.
* A `cmdstanr` backend has been added. By @sbfnk in #537 and #642 and reviewed by @seabbs.
* All functions now use a `data` argument to pass data. The existing `reported_cases`, `reports`, and `obs` arguments are deprecated and will be removed in v2.0.0. By @jamesmbaazam in #638 and reviewed by @sbfnk.

## Model changes

Expand Down
2 changes: 2 additions & 0 deletions R/EpiNow2-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@
# roxygen namespace tags. Modify with care!
## usethis namespace: start
#' @importFrom lifecycle deprecate_soft
#' @importFrom lifecycle deprecate_warn
#' @importFrom lifecycle deprecate_stop
## usethis namespace: end
NULL
Loading
Loading