metrumresearchgroup / bbr

R interface for model and project management
https://metrumresearchgroup.github.io/bbr/
Other
23 stars 2 forks source link

include help with installing bbi in error message if not found #636

Open andersone1 opened 8 months ago

andersone1 commented 8 months ago

Current behavior when a bbr function is run on a system without bbi installed:

Error in compare_bbi_version(.bbi_exe_path, .min_version, fail = FALSE) :
`/data/home/username/project.mrg/bi/qc-jan/bin/bbi` was not found on the system.

Can we append how to install bbi to this error message (and be more specific about where it is being looked for), making it something like:

Error in compare_bbi_version(.bbi_exe_path, .min_version, fail = FALSE) 
`/data/home/username/project.mrg/bi/qc-jan/bin/bbi` was not found at path {getOption('bbr.bbi_exe_path')}.
either run `bbr::use_bbi()` to install bbi or\n,
check what you entered in the `bbr.bbi_exe_path` option and make sure it is correct.
seth127 commented 8 months ago

I like this idea @andersone1 . @barrettk has also been messing around with some nicer formatting for error messages (#624 for example). Notably, this can call attention to things that the user should act on right away, as opposed to more verbose output that is more helpful for debugging.

seth127 commented 8 months ago

A few notes after reviewing this with @barrettk