Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix #518

Merged
merged 10 commits into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ jobs:
- {os: macOS-latest, r: 'devel'}
- {os: macOS-latest, r: '4.0'}
- {os: windows-latest, r: '4.0'}
- {os: ubuntu-16.04, r: '4.0', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '3.6', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -79,6 +80,11 @@ jobs:
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ name: pkgdown
jobs:
pkgdown:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
if: startsWith(github.event.comment.body, '/document')
name: document
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/pr-fetch@master
Expand All @@ -28,6 +30,8 @@ jobs:
if: startsWith(github.event.comment.body, '/style')
name: style
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/pr-fetch@master
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ name: test-coverage
jobs:
test-coverage:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

Expand All @@ -35,6 +37,10 @@ jobs:
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_github("jimhester/pkgdown@github-actions-deploy2")
shell: Rscript {0}
- name: Install package
run: |
remotes::install_cran("covr")
shell: Rscript {0}

Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dataRetrieval
Type: Package
Title: Retrieval Functions for USGS and EPA Hydrologic and Water Quality Data
Version: 2.7.5.9002
Version: 2.7.6.9000
Authors@R: c(
person("Laura", "DeCicco", role = c("aut","cre"),
email = "[email protected]",
Expand Down Expand Up @@ -48,4 +48,4 @@ BuildVignettes: true
VignetteBuilder: knitr
BugReports: https://github.com/USGS-R/dataRetrieval/issues
URL: https://pubs.usgs.gov/tm/04/a10/
RoxygenNote: 7.0.2
RoxygenNote: 7.1.0
11 changes: 11 additions & 0 deletions R/importWQP.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ importWQP <- function(obs_url, zip=TRUE, tz="UTC", csv=FALSE){
# ResultMeasureValue = readr::col_number(),
`WellDepthMeasure/MeasureValue` = readr::col_number(),
`WellHoleDepthMeasure/MeasureValue` = readr::col_number(),
DetectionQuantitationLimitTypeName = readr::col_character(),
LaboratoryName = readr::col_character(),
MethodDescriptionText = readr::col_character(),
`ResultAnalyticalMethod/MethodName` = readr::col_character(),
`ResultAnalyticalMethod/MethodIdentifier` = readr::col_character(),
`ResultAnalyticalMethod/MethodIdentifierContext` = readr::col_character(),
SampleTissueAnatomyName = readr::col_character(),
SubjectTaxonomicName = readr::col_character(),
ResultDepthAltitudeReferencePointText = readr::col_character(),
`ResultDepthHeightMeasure/MeasureUnitCode` = readr::col_character(),
`DetectionQuantitationLimitMeasure/MeasureUnitCode` = readr::col_character(),
`HUCEightDigitCode` = readr::col_character(),
`ActivityEndTime/TimeZoneCode` = readr::col_character()),
quote = ifelse(csv,'\"',""), delim = ifelse(csv,",","\t")))
Expand Down
12 changes: 6 additions & 6 deletions code.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "dataRetrieval",
"organization": "U.S. Geological Survey",
"description": "This R package is designed to obtain USGS or EPA water quality sample data, streamflow data, and metadata directly from web services",
"version": "2.7.5",
"version": "2.7.6",
"status": "Production",

"permissions": {
Expand All @@ -16,10 +16,10 @@
]
},

"homepageURL": "https://code.usgs.gov/WMA-Data-Science/dataRetrieval",
"downloadURL": "https://code.usgs.gov/WMA-Data-Science/dataRetrieval/-/archive/v2.7.5/dataRetrieval-v2.7.5.zip",
"disclaimerURL": "https://code.usgs.gov/WMA-Data-Science/dataRetrieval/blob/master/DISCLAIMER.md",
"repositoryURL": "https://code.usgs.gov/WMA-Data-Science/dataRetrieval.git",
"homepageURL": "https://code.usgs.gov/water/dataRetrieval",
"downloadURL": "https://code.usgs.gov/water/dataRetrieval/-/archive/v2.7.6/dataRetrieval-v2.7.6.zip",
"disclaimerURL": "https://code.usgs.gov/water/dataRetrieval/blob/master/DISCLAIMER.md",
"repositoryURL": "https://code.usgs.gov/water/dataRetrieval.git",
"vcs": "git",

"laborHours": 500,
Expand All @@ -41,7 +41,7 @@
},

"date": {
"metadataLastUpdated": "2019-06-05"
"metadataLastUpdated": "2020-03-10"
}
}
]
2 changes: 1 addition & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bibentry(bibtype = "Manual",
title = "dataRetrieval: R packages for discovering and retrieving water data available from U.S. federal hydrologic web services",
publisher = "U.S. Geological Survey",
address="Reston, VA",
version = "2.7.4",
version = "2.7.6",
institution = "U.S. Geological Survey",
year = 2018,
doi = "10.5066/P9X4L3GE",
Expand Down
7 changes: 4 additions & 3 deletions tests/testthat/tests_general.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ test_that("General NWIS retrievals working", {
dv <- importRDB1(urlEmpty, asDateTime = FALSE)
expect_true(nrow(dv) == 0)

dailyStat <- readNWISdata(site=c("03112500","03111520"),service="stat",statReportType="daily",
statType=c("p25","p50","p75","min","max"),parameterCd="00065",convertType=FALSE)
dailyStat <- readNWISdata(site=c("03112500","03111520","02319394"),service="stat",statReportType="daily",
statType=c("p25","p50","p75","min","max"),
parameterCd="00065",convertType=FALSE)
expect_true(length(dailyStat$min_va) > 1)
expect_is(dailyStat$p25_va,"character")

waterYearStat <- readNWISdata(site=c("03112500"),service="stat",statReportType="annual",
waterYearStat <- readNWISdata(site=c("01646500"),service="stat",statReportType="annual",
statYearType="water", missingData="on")
expect_is(waterYearStat$mean_va,"numeric")
expect_is(waterYearStat$parameter_cd,"character")
Expand Down