Skip to content

Commit 609d0ce

Browse files
Merge pull request DOI-USGS#749 from DOI-USGS/develop
Develop to main
2 parents c8d0c97 + f4f9f93 commit 609d0ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2844
-1149
lines changed

.Rbuildignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,5 @@ vignettes/dataretrieval_discrete_changes_images/*
9494
^ci$
9595
^public$
9696
^docker$
97-
vignettes/WQX_3.Rmd
97+
vignettes/WQX_3.Rmd
98+
vignettes/samples_data.Rmd

.github/workflows/R-CMD-check.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
5-
branches: [main]
5+
branches: [main, develop]
66
pull_request:
7-
branches: [main]
7+
branches: [main, develop]
88

99
name: R-CMD-check
1010

@@ -32,15 +32,16 @@ jobs:
3232

3333
- uses: r-lib/actions/setup-pandoc@6012817847b5f064d0882d67a7b5e2ca6639afb2
3434

35-
- uses: r-lib/actions/setup-r@15cf1013badbaf6d25f100593ad5d7d75e65d64b
35+
- uses: r-lib/actions/setup-r@473c68190595b311a74f208fba61a8d8c0d4c247
3636
with:
3737
r-version: ${{ matrix.config.r }}
3838
http-user-agent: ${{ matrix.config.http-user-agent }}
3939
use-public-rspm: true
4040

4141
- uses: r-lib/actions/setup-r-dependencies@96b1dc658a45175f93ed5f33fda2b2cebbb12ee8
4242
with:
43-
extra-packages: any::rcmdcheck
43+
extra-packages: |
44+
any::rcmdcheck
4445
needs: check
4546

4647
- uses: r-lib/actions/check-r-package@3e56ca41aa267855f36891af7a495d24bfaa8373

.github/workflows/pkgdown.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ jobs:
4040

4141
- uses: r-lib/actions/setup-r-dependencies@473c68190595b311a74f208fba61a8d8c0d4c247
4242
with:
43-
extra-packages: any::pkgdown, local::.
43+
extra-packages: |
44+
any::pkgdown
45+
any::rcmdcheck
46+
any::DT
47+
any::data.table
48+
any::dplyr
49+
any::tidyr
50+
any::gridExtra
51+
local::.
4452
needs: website
4553

4654
- name: Build site

.gitlab-ci.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ build-image:
4242
rules:
4343
- changes:
4444
- docker/Dockerfile
45-
- .gitlab-ci.yml
4645
script:
4746
- echo ${CI_REGISTRY_PASSWORD} | docker login -u ${CI_REGISTRY_USER} --password-stdin $CI_REGISTRY
4847
- docker pull ${CI_REGISTRY_IMAGE}:latest || true
@@ -81,22 +80,33 @@ unittests:
8180
coverage_format: cobertura
8281
path: cobertura.xml
8382
coverage: '/Coverage: \d+.\d+\%/'
84-
83+
84+
longtest:
85+
stage: test
86+
dependencies:
87+
- build-image
88+
- buildcheck
89+
script:
90+
- Rscript -e 'testthat::test_local(path = "tests/manual")'
91+
rules:
92+
- if: $RUN_LONG_TESTS == "FALSE"
93+
when: always
94+
- when: never
95+
8596
pages:
8697
stage: end
8798
cache: []
88-
only:
89-
- main
9099
script:
91100
- Rscript -e 'pkgdown::build_site(override = list(destination = "public"))'
92-
- Rscript -e 'source("deploy_simple.R")'
93101
artifacts:
94102
paths:
95103
- $PAGES_OUTDIR
96104
expire_in: 1 week
97105

98106
Validate Inventory:
99107
stage: end
108+
only:
109+
- main
100110
image: ${INTERNAL_REGISTRY}software/software-management:latest
101111
script:
102112
- software-management review

DESCRIPTION

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: dataRetrieval
22
Type: Package
33
Title: Retrieval Functions for USGS and EPA Hydrology and Water Quality Data
4-
Version: 2.7.17.9000
4+
Version: 2.7.18
55
Authors@R: c(
66
person("Laura", "DeCicco", role = c("aut","cre"),
77
email = "[email protected]",
@@ -37,24 +37,19 @@ Copyright: This software is in the public domain because it contains materials
3737
that originally came from the United States Geological Survey, an agency of
3838
the United States Department of Interior.
3939
Depends:
40-
R (>= 3.5.0)
40+
R (>= 4.1.0)
4141
Imports:
42-
httr (>= 1.0.0),
4342
curl,
4443
lubridate (>= 1.5.0),
4544
stats,
4645
utils,
4746
xml2,
4847
readr (>= 1.4.0),
49-
jsonlite
48+
jsonlite,
49+
httr2
5050
Suggests:
5151
covr,
5252
dplyr,
53-
ggplot2,
54-
tidyr,
55-
data.table,
56-
DT,
57-
gridExtra,
5853
knitr,
5954
rmarkdown,
6055
sf,

NAMESPACE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
export(addWaterYear)
44
export(calcWaterYear)
55
export(checkWQPdates)
6+
export(check_param)
67
export(constructNWISURL)
78
export(constructUseURL)
89
export(constructWQPURL)
10+
export(construct_USGS_sample_request)
911
export(countyCd)
1012
export(countyCdLookup)
1113
export(create_NWIS_bib)
@@ -40,10 +42,12 @@ export(readNWISuv)
4042
export(readWQPdata)
4143
export(readWQPqw)
4244
export(readWQPsummary)
45+
export(read_USGS_samples)
4346
export(renameNWISColumns)
4447
export(setAccess)
4548
export(stateCd)
4649
export(stateCdLookup)
50+
export(summarize_USGS_samples)
4751
export(whatNWISdata)
4852
export(whatNWISsites)
4953
export(whatWQPdata)

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
dataRetrieval 2.7.18
22
===================
3+
* Switched from httr to httr2
34
* Added a way to include a custom user-agent suffix via an enviornmental variable "CUSTOM_DR_UA"
5+
* Added function for USGS discrete data samples_data service: read_USGS_samples
6+
* Restructured stateCdLookup and countyCdLookup to use web services that only
7+
list states and counties that have water quality data.
48

59
dataRetrieval 2.7.17
610
===================

R/checkWQPdates.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
checkWQPdates <- function(values) {
1717
dateNames <- c(
1818
"startDateLo", "startDateHi",
19-
"startDate", "endDate"
19+
"startDate", "endDate",
20+
"activityStartDateLower",
21+
"activityStartDateUpper"
2022
)
2123

2224
if (any(names(values) %in% dateNames)) {

0 commit comments

Comments
 (0)