Closed Robinlovelace closed 4 years ago
Those dependencies are in there to allow the package to install. We need to add sf system dependencies before installing any package that uses sf. I'm a fan of simplicity and there may be ways to further simplify the .yaml code but I think this is currently close to the simplest we can get it.
Quick question for @etiennebr, building on your experience pioneering the use of GH Actions in sf, is there a simpler way of getting sf dependencies installed? Here's the currently (passing) setup I'm suggesting for this package: https://github.com/luukvdmeer/sfnetworks/blob/ea43e21ae6fe54f46a700568d5255b47ab7f207c/.github/workflows/R-CMD-check.yaml
Depending on the dependencies you need, you could use the precompiled binaries. It seems to work for, e.g., geotidy
(works for windows, mac and linux).
If this fails, then I think using sf
actions is the way to go for now. I'd like to explore an actions repo to install dependencies, such as:
- uses: r-spatial/actions/setup-gdal@master # doesn't exist yet :(
Note that I'm working on the sf
actions, so it already evolved from what you just merged (@ateucher improved the mac dependencies). For that reason, having a central repo for packages to pull actions would be the best solution (as you suggested initially). But for now, you'll have to keep an eye on the sf
actions if the binaries don't work for you.
Great, many thanks @etiennebr, that is really useful to know. For now the fact that it passes is the main thing. If it starts failing, or if I see activity in https://github.com/r-spatial/sf/issues/1309 , we can always revisit. Hugely appreciative of the work you're doing on automated tests and continuous integration for key geographic R packages.
I am definitely not an expert on GH actions, but was wondering: is it needed for the sfnetworks repo to include system dependency checks of sf's system dependencies? I mean,
sf
is an dependency ofsfnetworks
, so indirectlysfnetworks
of course hasgdal
and friends as system dependencies, but these are not direct dependencies of the package. I am just wondering if we are not overly complicating ourselves if we explicitly include indirect dependencies in the checks (which would also raise the question if we then should not also do the same for the system dependencies oftidygraph
/igraph
).But as said, this remark comes from a complete non-expert in GH actions! ;)