From e6151a2b5dd55d95a1df329e617e681b4ea55d82 Mon Sep 17 00:00:00 2001 From: Gene Leynes Date: Thu, 9 Sep 2021 00:43:09 -0500 Subject: [PATCH 1/2] removing tests with missing URL --- tests/testthat/test-all.R | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/testthat/test-all.R b/tests/testthat/test-all.R index a7e0d34..cc54f9a 100644 --- a/tests/testthat/test-all.R +++ b/tests/testthat/test-all.R @@ -130,12 +130,16 @@ test_that("read Socrata CSV from New Backend (NBE) endpoint", { test_that("Warn instead of fail if X-SODA2-* headers are missing", { + ## Note: The examples with missing Soda2 headers are missing and need to be replaced + ## or the issue should be fixed with Socrata / Tyler. + ## See issue 196 + ## These data sets are identified in #118 as data sets with missing soda ## headers. The missing header should cause the data set to return character ## columns instead of columns cast into their appropriate classes. ## RSocrata should also warn the user when the header is missing. - url_csv_missing <- "https://data.healthcare.gov/resource/enx3-h2qp.csv?$limit=1000" - url_json_missing <- "https://data.healthcare.gov/resource/enx3-h2qp.json?$limit=1000" + # url_csv_missing <- "https://data.healthcare.gov/resource/enx3-h2qp.csv?$limit=1000" + # url_json_missing <- "https://data.healthcare.gov/resource/enx3-h2qp.json?$limit=1000" ## These URLs should have soda types in the header url_csv_complete <- "https://odn.data.socrata.com/resource/pvug-y23y.csv" url_json_complete <- "https://odn.data.socrata.com/resource/pvug-y23y.json" @@ -143,13 +147,13 @@ test_that("Warn instead of fail if X-SODA2-* headers are missing", { msg <- "https://github.com/Chicago/RSocrata/issues/118" ## Check that the soda2 headers are missing - expect_null(RSocrata:::getResponse(url_csv_missing)$headers[['x-soda2-types']], info=msg) - expect_null(RSocrata:::getResponse(url_json_missing)$headers[['x-soda2-types']], info=msg) - + # expect_null(RSocrata:::getResponse(url_csv_missing)$headers[['x-soda2-types']], info=msg) + # expect_null(RSocrata:::getResponse(url_json_missing)$headers[['x-soda2-types']], info=msg) + # ## Check for warning that the header is missing, which causes the column ## classes to be returned as character - expect_warning(dfCsv <- read.socrata(url_csv_missing), info=msg) - expect_warning(dfJson <- read.socrata(url_json_missing), info=msg) + # expect_warning(dfCsv <- read.socrata(url_csv_missing), info=msg) + # expect_warning(dfJson <- read.socrata(url_json_missing), info=msg) ## Check that the soda2 headers are present expect_false(is.null(RSocrata:::getResponse(url_csv_complete)$headers[['x-soda2-types']]), info=msg) From 4e3ffff757267523d63d9df3ff3ce86e73ef9faf Mon Sep 17 00:00:00 2001 From: Nick Lucius Date: Fri, 10 Sep 2021 20:15:55 -0500 Subject: [PATCH 2/2] Update version (fixes #196) --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f010473..091ec5a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,8 +10,8 @@ Description: Provides easier interaction with format and manages throttling by 'Socrata'. Users can upload data to 'Socrata' portals directly from R. -Version: 1.7.10-6 -Date: 2019-10-23 +Version: 1.7.11-1 +Date: 2021-09-10 Author: Hugh Devlin, Ph. D., Tom Schenk, Jr., Gene Leynes, Nick Lucius, John Malc, Mark Silverberg, and Peter Schmeideskamp Maintainer: "Tom Schenk Jr." Depends: