Skip to content

Commit

Permalink
Pre-release cleanup (#649)
Browse files Browse the repository at this point in the history
* deprecate adjust-functions

* indicate check functions are stable

* mark deprecated functions as internal

* make more functions internal

* move init_cumulative_fit to deprecated.R

* move fit functions to fit.R

* update lifecycle badges

* remove explicit references to 2.0.0

* completely remove update_list

* line spacing

* update importFrom tags

* remove prior_weight

* hard deprecate old truncation options

* make more get_ functions internal

* categorise internal functions in pkgdown

* order NEWS items

* add news item

* re-render documentation

* remove package qualifier

* add PR number

* make sure all examples run

* remove package qualifier on internal function

* Apply suggestions from code review

Co-authored-by: James Azam <[email protected]>

* clarify wording in _pkgdown.yml

Co-authored-by: James Azam <[email protected]>

* simplify internal function listing in pkgdown

Co-authored-by: James Azam <[email protected]>

---------

Co-authored-by: James Azam <[email protected]>
  • Loading branch information
sbfnk and jamesmbaazam authored May 3, 2024
1 parent c3218d2 commit 3b7431c
Show file tree
Hide file tree
Showing 97 changed files with 1,155 additions and 1,119 deletions.
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

0 comments on commit 3b7431c

Please sign in to comment.