ropensci / FedData

Functions to Automate Downloading Geospatial Data Available from Several Federated Data Sources
https://docs.ropensci.org/FedData
Other
97 stars 22 forks source link

Changes in soilDB::SDA_query() and FedData test suite #32

Closed dylanbeaudette closed 6 years ago

dylanbeaudette commented 6 years ago

Hi Kyle,

I received the following news after submitting a major update of the soilDB package to CRAN:

Check: tests
New result: ERROR
     Running ‘testthat.R’ [6s/31s]
   Running the tests in ‘tests/testthat.R’ failed.
   Complete output:
     > library(testthat)
     > library(FedData)
     Loading required package: sp
     >
     > test_check("FedData")

     Attaching package: 'curl'

     The following object is masked from 'package:httr':

         handle_reset

     Loading required package: aqp
     This is aqp 1.15
     1. Failure: The SoilDB data queries work (@test.SSURGO.R#21) 
-------------------
     soilDB::SDA_query(q) did not throw an error.

     Attaching package: 'raster'

     The following objects are masked from 'package:aqp':

         metadata, metadata<-

     testthat results 
================================================================
     OK: 24 SKIPPED: 0 FAILED: 1
     1. Failure: The SoilDB data queries work (@test.SSURGO.R#21)

     Error: testthat unit tests failed
     Execution halted

Please note that SDA_query() now attempts to be a little smarter about errors, reporting SQL syntax errors, and returning multi-table results. See the manual page for the function in the development version. Some of these changes are documented in related issues.

Thanks! Dylan

bocinsky commented 6 years ago

The soilDB::SDA_query does not throw an error anymore when requesting data from a non-existent soil survey area; it now returns a NULL object. Changed the test to expect a NULL. Running checks on Winbuilder and resubmitting to CRAN. Thanks @dylanbeaudette!

dylanbeaudette commented 6 years ago

Thanks Kyle!