Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cristinamullin
Copy link
Collaborator

kathryn-willi and others added 30 commits August 29, 2024 06:24
GetATTAINS changes, error handling updates
arcgislayers is not available on CRAN so this causes check errors. Hopefully it will become available on CRAN again in the future
test-GeospatilFcuntions.R failing
lines 112-120

# fetchNHD ----
testthat::test_that(
  desc = "fetchNHD handles valid input data",
  code = {
    valid_data <- sf::st_sf(geometry = sf::st_sfc(sf::st_point(c(0, 0))), crs = 4326)
    result <- fetchNHD(.data = valid_data)
    expect_false(is.null(result))
  }
)
- update example data
- update WQX ref tables
- update Rmd to ref develop branch only
- try adding arcgislayers to imports
@cristinamullin
Copy link
Collaborator Author

@kathryn-willi

There is still an issue with using the arcgislayers package as a dependency for the TADA_GetATTAINS function since it is not available on CRAN anymore. I tried to add arcgislayers (and its dependencies arcgis and arcpbf) under "Remotes:" in the description file, but that did not work. e.g., Remotes: github::R-ArcGIS/arcgislayers

It looks like we have two options: 1) we can include the code from arcgislayers directly in TADA instead of importing that package, or 2) we wait for them to get that package back on CRAN (not sure how long that might be, but it only just fell off CRAN last month). https://stackoverflow.com/questions/59549652/how-can-a-package-on-cran-import-a-package-not-on-cran

@kathryn-willi
Copy link
Contributor

kathryn-willi commented Sep 20, 2024

@kathryn-willi

There is still an issue with using the arcgislayers package as a dependency for the TADA_GetATTAINS function since it is not available on CRAN anymore. I tried to add arcgislayers (and its dependencies arcgis and arcpbf) under "Remotes:" in the description file, but that did not work. e.g., Remotes: github::R-ArcGIS/arcgislayers

* https://cran.r-project.org/web/packages/arcgis/index.html

* https://cran.r-project.org/web/packages/arcgislayers/index.html#:~:text=Package%20'arcgislayers'%20was%20removed%20from,from%20the%20check%20results%20archive.

* https://cran.r-project.org/web/packages/arcpbf/index.html

It looks like we have two options: 1) we can include the code from arcgislayers directly in TADA instead of importing that package, or 2) we wait for them to get that package back on CRAN (not sure how long that might be, but it only just fell off CRAN last month). https://stackoverflow.com/questions/59549652/how-can-a-package-on-cran-import-a-package-not-on-cran

@cristinamullin yes it's so unfortunate that they dropped it off CRAN (I think it may have been like the day or two before my initial pull request 😭). I do have confidence that it will be brought back online, but no idea how long that might take...

Another option would be for me to use a different downloading approach and remove the arcgislayers package functions for the time being (with the hope of putting it back in place once it's back on CRAN - arcgislayers is by far the fastest way to download geospatial data out there). This would likely take me about a day to complete?

In the meantime, I am currently exploring how easy it would be for us to add in (and compartmentalize) the current {arcgis} suite of functions and add to EPATADA. Please stay tuned!

@cristinamullin
Copy link
Collaborator Author

@kathryn-willi
There is still an issue with using the arcgislayers package as a dependency for the TADA_GetATTAINS function since it is not available on CRAN anymore. I tried to add arcgislayers (and its dependencies arcgis and arcpbf) under "Remotes:" in the description file, but that did not work. e.g., Remotes: github::R-ArcGIS/arcgislayers

* https://cran.r-project.org/web/packages/arcgis/index.html

* https://cran.r-project.org/web/packages/arcgislayers/index.html#:~:text=Package%20'arcgislayers'%20was%20removed%20from,from%20the%20check%20results%20archive.

* https://cran.r-project.org/web/packages/arcpbf/index.html

It looks like we have two options: 1) we can include the code from arcgislayers directly in TADA instead of importing that package, or 2) we wait for them to get that package back on CRAN (not sure how long that might be, but it only just fell off CRAN last month). https://stackoverflow.com/questions/59549652/how-can-a-package-on-cran-import-a-package-not-on-cran

@cristinamullin yes it's so unfortunate that they dropped it off CRAN (I think it may have been like the day or two before my initial pull request 😭). I do have confidence that it will be brought back online, but no idea how long that might take...

Another option would be for me to use a different downloading approach and remove the arcgislayers package functions for the time being (with the hope of putting it back in place once it's back on CRAN - arcgislayers is by far the fastest way to download geospatial data out there). This would likely take me about a day to complete?

In the meantime, I am currently exploring how easy it would be for us to add in (and compartmentalize) the current {arcgis} suite of functions and add to EPATADA. Please stay tuned!

Ugh, yes very unfortunate timing! We are interested in submitting TADA to CRAN soon... and it could be that this is available on CRAN again by the time we are ready for our submission... so I hate to create additional work but it could also take them a long time. I like the options you mentioned 1) if we can use a different package or 2) add in (and compartmentalize) the current {arcgis} suite of functions and add to EPATADA. Thanks for looking into it!

Copy link
Contributor

@kathryn-willi kathryn-willi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cristinamullin - I wasn't able to get the required code in {arcgislayers} to run properly when added to EPATADA directly. 😞 So instead I have written new "placeholder" functions that do not use anything from {arcgislayers}, and are subsequently a bit slower...

I also just commented out the original functions that used {arcgislayers} so that it will be easier for us to put it back in place when the package is put back on CRAN.

Please let me know how best to incorporate these changes: currently they are just code suggestions. (I was having difficulty fetching the ROSSyndicate-review branch, but I'm also not super branch savvy. I will touch base with my team Monday and hopefully have something a bit more robust if needed.)

I'm so sorry for all the mess associated with this PR!

Co-authored-by: Katie/Ryn Willi (she/her) <[email protected]>
@cristinamullin
Copy link
Collaborator Author

Thanks @kathryn-willi for the code suggestions. I like your solution! I committed them to this branch but it looks like there is an outstanding bracket issue. I can help troubleshoot next week if you don't get to it before me.

@kathryn-willi
Copy link
Contributor

kathryn-willi commented Oct 7, 2024

Thanks @kathryn-willi for the code suggestions. I like your solution! I committed them to this branch but it looks like there is an outstanding bracket issue. I can help troubleshoot next week if you don't get to it before me.

Hey @cristinamullin - I think the issue is that the suggested code I added should have fully replaced the fetchATTAINS code but the old contents somehow did not get deleted. I believe that deleting lines 883-1284 should resolve the issue!

@cristinamullin cristinamullin merged commit 832c16b into develop Oct 9, 2024
@cristinamullin cristinamullin deleted the ROSSyndicate-review branch October 9, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants