ropensci / slopes

Package to calculate slopes of roads, rivers and trajectories
https://docs.ropensci.org/slopes/
GNU General Public License v3.0
70 stars 6 forks source link

Tests #18

Closed Robinlovelace closed 3 years ago

Robinlovelace commented 3 years ago

The aim of testing code is to determine that it is 'fit for use'.

The key thing that should be tested in this package, I think, are whether the slopes returned are 'correct'. Key to that assessment is having a 'ground truth' of data with correct slopes. I think the test dataset with slopes from ArcMap provides a good starting point, but wonder if there is a more definitive way to testing that the slopes are right?

May be worth looking at old papers on slope calculation.

From the perspective of rOpenSci, there are clear recommendations:

Robinlovelace commented 3 years ago

Exciting update, after the commit above, we're now on 5%, 70 more percentage points to go!

image

layik commented 3 years ago

👍

mpadge commented 3 years ago

Hiya folk, I saw the thread on rOpenSci submission. In case it helps, I've got an example of using secrets on github actions here - you should pretty much be able to copy that general approach to get a private MAPBOX token into your test environment.

Robinlovelace commented 3 years ago

Finally taking a looking at this.

Robinlovelace commented 3 years ago

Heads-up @mpadge I think the commits above fixed the issue. Issue now is that sf does not work on Mac, e.g. as shown here: https://github.com/ITSLeeds/slopes/runs/2143877715?check_suite_focus=true

Any ideas how to fix that? Seems that any package with an sf dependency will fail on actions...

Robinlovelace commented 3 years ago

E.g.: failing tests on osmdata https://github.com/ropensci/osmdata/runs/2139987665

mpadge commented 3 years ago

Yeah, sf is current broken on lots of systems. @edzer and @rsbivand have sent quite a few tweets about it, all related to the epic spatstat restructure. All are working with CRAN to fix everything asap.

Robinlovelace commented 3 years ago

And all may be fixed when Mac binaries are rebuilt hopefully.

mpadge commented 3 years ago

Timetable for full alignment in on main spatstat page. Most packages currently failing (including nearly all of mine) have a grace period until end of March to either auto-align with new system, or to submit updates. March 25th is key date when all on CRAN should be fixed; before then i wouldn't worry too much.