-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reigning in examples / run-donttest #124
Comments
Thanks Andrew, excellent work. A good reminder to keep examples as simple as possible. |
Adding @smroecker and @jskovlin to the conversation: per short discussion with @brownag this morning:
|
donttest examples have been run regularly over the last year. We have even more longer-running examples than we did in the past, but that is OK -- they are stable and the logic to turn them off on test machines / in absence of suggested packages has been working.
Closing this issue for CRAN release #155, and created a new issue to address @dylanbeaudette's points #157 |
I finally got all soilDB examples wrapped in
\donttest{}
running successfully withR CMD CHECK --run-donttest
These are our big time consumers:
Summary: Many examples that rely on outside packages (aqp, ggplot2, sp, rgdal) needed to be using something heavier duty than
requireNamespace()
--requireNamespace
was only checking if the namespace could be loaded, not loading it. So many, many errors resulted from not using::
to access external methods. I used if-statement check onrequire()
for each example dependency. Some packages are not dependencies ofsoilDB
-- just suggests -- and using::
notation would be very maddening to look at in the case of e.g. ggplot2-reliant plots.Furthermore, many functions that hit the database rely on some external datasource (e.g. selected set, PedonPC database) and needed to fail gracefully in the event of no data or an error in the request.
In general, I think we could dramatically clean up examples to make them simpler and easier to maintain. The more complex ones are essentially tutorials unto themselves. I made this issue to tag the relevant commits and make a note that we need to run
R CMD CHECK
with--run-donttest
more frequently. There was a lot of out of date stuff in there.The text was updated successfully, but these errors were encountered: