inlabru-org / inlabru

inlabru
https://inlabru-org.github.io/inlabru/
78 stars 21 forks source link

Unconditonal use of `ggpolypath` in examples #133

Closed rubak closed 2 years ago

rubak commented 2 years ago

inlabru only Suggests the package ggpolypath but R CMD check fails without this package installed since it is called unconditionally in the examples of gg.

finnlindgren commented 2 years ago

Thanks! The examples are meant to check for that but we missed adding the check when ggpolypath was made a requirement for gg.SpatialPolygons (since ggplot::geom_polygon` fails to produce the correct plot for some polygons with holes).

finnlindgren commented 2 years ago

I believe this is now fixed by f97cde34a860092a10398c5ac3e26328ed162568 but since I'm having trouble setting up an automated test for it at the moment, please check an let me know if I missed one of the needed checks.

finnlindgren commented 2 years ago

There's now an automated test that runs the package checks without any Suggests packages installed. It's not quite the same as an exhaustive check with all permutations of installed/not installed, but should catch obvious cases in the future. I found a few more similar non-protected cases, and I believe the issue has been fixed, since 07a577fac542c365f18dab1122c6302abc2f3e4d