Public-Health-Scotland / phsmethods

An R package to standardise methods used in Public Health Scotland (https://public-health-scotland.github.io/phsmethods/)
https://public-health-scotland.github.io/phsmethods/
54 stars 13 forks source link

Use the `cli` package for all errors, warnings and messages #85

Closed Moohan closed 1 year ago

Moohan commented 1 year ago

I've replaced all errors, warnings and messages I could find with equivalent code using the cli package.

The functionality of the package is unaffected, the only changes are to the output messages which should broadly look a bit nicer and be more helpful. Some replacements also make the code easier to read and therefore maintain as I've been able to use cli's great pluralisation features.

codecov[bot] commented 1 year ago

Codecov Report

Merging #85 (ec2d20d) into dev (2291e0d) will not change coverage. The diff coverage is 100.00%.

:exclamation: Current head ec2d20d differs from pull request most recent head fd54fe3. Consider uploading reports for the commit fd54fe3 to get more accurate results

@@            Coverage Diff            @@
##               dev       #85   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines          342       379   +37     
=========================================
+ Hits           342       379   +37     
Impacted Files Coverage Δ
R/age_calculate.R 100.00% <100.00%> (ø)
R/chi_check.R 100.00% <100.00%> (ø)
R/chi_pad.R 100.00% <100.00%> (ø)
R/dob_from_chi.R 100.00% <100.00%> (ø)
R/extract_fin_year.R 100.00% <100.00%> (ø)
R/file_size.R 100.00% <100.00%> (ø)
R/format_postcode.R 100.00% <100.00%> (ø)
R/match_area.R 100.00% <100.00%> (ø)
R/qtr.R 100.00% <100.00%> (ø)
R/sex_from_chi.R 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.