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

upcoming sf breaks ndhplusTools #334

Closed
edzer opened this issue Mar 6, 2023 · 8 comments
Closed

upcoming sf breaks ndhplusTools #334

edzer opened this issue Mar 6, 2023 · 8 comments

Comments

@edzer
Copy link

edzer commented Mar 6, 2023

with:

Package: nhdplusTools
Check: tests
New result: ERROR
    Running ‘testthat.R’ [71s/44s]
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library("testthat")
    > 
    > test_check("nhdplusTools")
    Loading required package: nhdplusTools
    Starting 2 test processes
    [ FAIL 1 | WARN 41 | SKIP 51 | PASS 296 ]
    
    ══ Skipped tests ═══════════════════════════════════════════════════════════════
    • On CRAN (51)
    
    ══ Failed tests ════════════════════════════════════════════════════════════════
    ── Failure ('test_index.R:195'): get location ──────────────────────────────────
    sf::st_coordinates(locations)[, 1:2] (`actual`) not equal to structure(...) (`expected`).
    
    `dimnames(actual)[[1]]` is NULL
    `dimnames(expected)[[1]]` is a character vector ('1', '2', '3')
    
    [ FAIL 1 | WARN 41 | SKIP 51 | PASS 296 ]
    Error: Test failures
    Execution halted

in NEWS.md:

  • the matrix returned by st_coordinates() has no row names, to reduce output size

The row.names were meaningless anyway, and for large datasets take up a large amount of memory.

@dblodgett-usgs
Copy link
Collaborator

Thanks for the heads up -- when will this be hitting CRAN?

@edzer
Copy link
Author

edzer commented Mar 9, 2023

It's in the queue, so that might be really soon.

@dblodgett-usgs
Copy link
Collaborator

hrmmm... I'm having a hard time installing from github. It appears that this is just a test that is over specified though.

@edzer
Copy link
Author

edzer commented Mar 9, 2023

I'll check.

@dblodgett-usgs
Copy link
Collaborator

@edzer
Copy link
Author

edzer commented Mar 9, 2023

Column names are still there, so the RHS of the test should be

structure(c(-76.8693957911233, -76.9176139910484, -76.8810037244386,
                           39.4932572053652, 39.4090934721626, 39.3632976055671),
                         .Dim = 3:2, .Dimnames = list(NULL, c("X", "Y")))

will check locally.

@dblodgett-usgs
Copy link
Collaborator

Yeah -- I just converted to numeric as my test is only really needing to checking that the numbers come back the same.

@dblodgett-usgs
Copy link
Collaborator

0.6.2 is on its way to CRAN. Thanks for the heads up @edzer

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

No branches or pull requests

2 participants