Skip to content

Commit

Permalink
update required cols and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cristinamullin committed Nov 7, 2024
1 parent 6ca123e commit cd9628f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion R/RequiredCols.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ extra.cols <- c(
"ActivityEndDate",
"ActivityEndTime.Time",
"ActivityEndTime.TimeZoneCode",
"ActivityEndDateTime", # generated by USGS DR
"ActivityEndDateTime", # originally generated by USGS DR, # no longer in default dataRetrieval profile? 11/7/24
"ActivityConductingOrganizationText",
"SampleAquifer",
"ActivityLocation.LatitudeMeasure",
Expand Down
17 changes: 4 additions & 13 deletions tests/testthat/test-DataDiscoveryRetrieval.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ test_that("TADA_DataRetrieval", {
"LabSamplePreparationUrl",
"LastUpdated",
"ProviderName",
# "timeZoneStart",
# "timeZoneEnd",
"ActivityStartDateTime",
"ActivityEndDateTime",
"MonitoringLocationTypeName",
"MonitoringLocationDescriptionText",
"HUCEightDigitCode",
Expand Down Expand Up @@ -220,10 +217,7 @@ test_that("TADA_DataRetrieval", {
"LabSamplePreparationUrl",
"LastUpdated",
"ProviderName",
# "timeZoneStart",
# "timeZoneEnd",
"ActivityStartDateTime",
"ActivityEndDateTime",
"MonitoringLocationTypeName",
"MonitoringLocationDescriptionText",
"HUCEightDigitCode",
Expand Down Expand Up @@ -263,11 +257,11 @@ test_that("TADA_DataRetrieval", {
})

test_that("TADA_DataRetrieval", {
randomstate <- TADA_RandomTestingData()
# you could just pick the important columns:
randomstate2 <- TADA_RandomTestingData(number_of_days = 3, choose_random_state = TRUE)

expect_true(all(
Filter(function(x) !any(grepl("TADA.", x)), c(require.cols, last.cols)
) %in% names(randomstate)))
Filter(function(x) !any(grepl("TADA.", x)), require.cols
) %in% names(randomstate2)))
})

test_that("TADA_DataRetrieval", {
Expand Down Expand Up @@ -366,10 +360,7 @@ test_that("TADA_DataRetrieval", {
"LabSamplePreparationUrl",
"LastUpdated",
"ProviderName",
#"timeZoneStart",
#"timeZoneEnd",
"ActivityStartDateTime",
"ActivityEndDateTime",
"MonitoringLocationTypeName",
"MonitoringLocationDescriptionText",
"HUCEightDigitCode",
Expand Down

0 comments on commit cd9628f

Please sign in to comment.