PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
199 stars 231 forks source link

Add resave mode to check_with_errors.R #3227

Closed infotroph closed 9 months ago

infotroph commented 9 months ago

Description

Adds a new usage variant: To update the cached check results in [package_dir]/tests/Rcheck_reference.log, run the check script with env var RESAVE_CHECKS set, e.g.:

RESAVE_CHECKS=true Rscript scripts/check_with_errors.R base/db

After running, review the changes to Rcheck_reference.log and commit them if they look good.

Motivation and Context

Thanks to the whole team in general and @moki1202 in particular, lots of our cached check results are stale in the sense that they contain messages about errors/warnings we have since fixed. We've mostly been updating these by manually editing the saved files, but this is tedious and error-prone. This patch provides a one-shot method to ease the process.

As always, my hope is that we'll use this to remove fixed messages (so that we can eventually remove all Rcheck_reference.log files entirely) rather than to ignore newly added messages, but it will do either one as needed.

Review Time Estimate

Types of changes

Checklist:

moki1202 commented 8 months ago

@infotroph This is awesome, thankyou! I'll push the changes for my PRs.