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

'NHDPlus_HR.MapServer' not found #546

Open
cristinamullin opened this issue Nov 14, 2024 · 5 comments
Open

'NHDPlus_HR.MapServer' not found #546

cristinamullin opened this issue Nov 14, 2024 · 5 comments
Labels

Comments

@cristinamullin
Copy link
Collaborator

cristinamullin commented Nov 14, 2024

Describe the bug

TADA_GetATTAINS runs fetchNHD within it. See line 511 in GeospatialFunctions.R

nhd_plus_hr_url <- "https://hydro.nationalmap.gov/arcgis/rest/services/NHDPlus_HR/MapServer"

This causes a breaking check error if the service is not available.

See check errors:

  --- re-buildingTADAModule2.Rmdusing rmarkdown
  
  Quitting from lines 299-300 [unnamed-chunk-8] (TADAModule2.Rmd)
  Error: processing vignette 'TADAModule2.Rmd' failed with diagnostics:
  Status code: 500
  Error: Error handling service request :Service configuration
      'NHDPlus_HR.MapServer' not found.
  --- failed re-buildingTADAModule2.Rmd

Expected behavior

Can we develop a solution that makes it possible for TADA_GetATTAINS to run even if this service is temporarily unavailable or if a user is offline? Or maybe if it fails initially it can be setup to retry at least once.

@cristinamullin
Copy link
Collaborator Author

@kathryn-willi do you have any ideas about how to best handle this scenario?

@hillarymarler
Copy link
Collaborator

hillarymarler commented Nov 14, 2024

For a short term fix, to address just the issue of the checks failing related to vignettes requiring the NHDPlus_HR.MapServer, switching the vignette to an article (which is still displayed on the pkgdown site, but not included in the package) because this adds it to .Rbuildignore may work.

I set up a few demos as articles over the summer to prevent some intermittent issues with ATTAINS webservices from causing checks to fail when I was working on unrelated updates.

@hillarymarler
Copy link
Collaborator

hillarymarler commented Nov 14, 2024

https://r-pkgs.org/vignettes.html#sec-vignettes-article
" An article will be less accessible than a vignette, for certain users, such as those with limited internet access, because it is not present in the local installation. But that might be an acceptable compromise, for example, for a package that wraps a web API."

@cristinamullin
Copy link
Collaborator Author

cristinamullin commented Nov 14, 2024

I like that idea. Let's do that for any vignettes (switch them to articles) that require any services (WQP, ATTAINS, NHD, etc.). If the vignette only requires example data and no service calls, then they can stay in the package.

@kathryn-willi
Copy link
Collaborator

That option makes sense to me, and seems totally justifiable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants