epiforecasts / EpiNow2

Estimate Realtime Case Counts and Time-varying Epidemiological Parameters
https://epiforecasts.io/EpiNow2/dev/
Other
116 stars 33 forks source link

Replace base R message/warning/stop with `{cli}` #762

Closed jamesmbaazam closed 3 months ago

jamesmbaazam commented 3 months ago

Description

This PR closes #546.

This PR replaces the use of base condition signalling with those provided by {cli} as it offers more powerful features such as the ability to display a warning every few hours.

As part of this PR, I've updated the .lintr config file to catch future uses of base messaging. This was really useful in the refactoring exercise as it caught all occurrences. There were some false positives in the regional_epinow.R, so I embraced them in #nolint undesirable_function_linter tags to counter the configs I've set up.

Initial submission checklist

After the initial Pull Request

jamesmbaazam commented 3 months ago

Sorry, I should have marked this as a draft. Have a few simple fixes then we can try the new changes and see if happy before merging, or we can merge this and apply fancier stuff in another run. {cli} is addictive and I'm trying not to go crazy.

seabbs commented 3 months ago

Have a few simple fixes then we can try the new changes and see if happy before merging

Ha I know I think this and do fancier stuff in a new PR