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

Vulnerability to absence of retiring r-spatial packages #70

Closed
rsbivand opened this issue Apr 3, 2023 · 6 comments · Fixed by #71
Closed

Vulnerability to absence of retiring r-spatial packages #70

rsbivand opened this issue Apr 3, 2023 · 6 comments · Fixed by #71
Assignees
Labels
bug A bug or issue that should be resolved tech Technical issues and pull requests not directly related to usmap functionality

Comments

@rsbivand
Copy link

rsbivand commented Apr 3, 2023

00check.log
is a recent check log from running under _SP_EVOLUTION_STATUS_=2 without retiring r-spatial packages (suggested in this package) on the library path. The minimal correction is to check that the package namespaces can be loaded, and if not, do not run those parts of the examples. It would be safer in the longer term to replace retiring r-spatial packages with active r-spatial/rspatial packages (see https://r-spatial.org/r/2022/04/12/evolution.html, https://r-spatial.org/r/2022/12/14/evolution2.html).

@rsbivand rsbivand added the bug A bug or issue that should be resolved label Apr 3, 2023
@rsbivand
Copy link
Author

rsbivand commented May 1, 2023

Please also see https://r-spatial.org/r/2023/04/10/evolution3.html, fix best by June, latest October 2023.

@rsbivand
Copy link
Author

rsbivand commented May 27, 2023

Please fix urgently: test with maptools 1.1-7 at https://r-forge.r-project.org/R/?group_id=943 is being submitted, and your package refers to elide which has moved to sp (HEAD of edzer/sp@main). Current CRAN reverse dependency test:

Package: usmap
Check: dependencies in R code
New result: WARNING
  Missing or unexported object: ‘maptools::elide’

Package: usmap
Check: examples
New result: ERROR
  Running examples in ‘usmap-Ex.R’ failed
  The error most likely occurred in:
  
  > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
  > ### Name: usmap_transform
  > ### Title: Convert coordinate date frame to usmap projection
  > ### Aliases: usmap_transform usmap_transform.data.frame
  > 
  > ### ** Examples
  > 
  > data <- data.frame(
  +   lon = c(-74.01, -95.36, -118.24, -87.65, -134.42, -157.86),
  +   lat = c(40.71, 29.76, 34.05, 41.85, 58.30, 21.31),
  +   pop = c(8398748, 2325502, 3990456, 2705994, 32113, 347397)
  + )
  > 
  > # Transform data
  > transformed_data <- usmap_transform(data)
  Please note that 'maptools' will be retired during October 2023,
  plan transition at your earliest convenience (see
  https://r-spatial.org/r/2023/05/15/evolution4.html and earlier blogs
  for guidance);some functionality will be moved to 'sp'.
   Checking rgeos availability: FALSE
  Error: 'elide' is not an exported object from 'namespace:maptools'
  Execution halted

Package: usmap
Check: re-building of vignette outputs
New result: ERROR
  Error(s) in re-building vignettes:
    ...
  --- re-building ‘advanced-mapping.Rmd’ using rmarkdown
  
  Quitting from lines 83-95 [unnamed-chunk-6] (advanced-mapping.Rmd)
  Error: processing vignette ‘advanced-mapping.Rmd’ failed with diagnostics:
  ‘elide’ is not an exported object from ‘namespace:maptools’
  --- failed re-building ‘advanced-mapping.Rmd’
  
  --- re-building ‘introduction.Rmd’ using rmarkdown
  --- finished re-building ‘introduction.Rmd’
  
  --- re-building ‘mapping.Rmd’ using rmarkdown
  --- finished re-building ‘mapping.Rmd’
  
  SUMMARY: processing the following file failed:
    ‘advanced-mapping.Rmd’
  
  Error: Vignette re-building failed.
  Execution halted

Package: usmap
Check: tests
New result: ERROR
    Running ‘testthat.R’ [4s/4s]
  Running the tests in ‘tests/testthat.R’ failed.
  Complete output:
    > library(testthat)
    > library(usmap)
    > 
    > test_check("usmap")
    [ FAIL 3 | WARN 0 | SKIP 0 | PASS 160 ]
    
    ══ Failed tests ════════════════════════════════════════════════════════════════
    ── Error ('test-transform.R:16:3'): data frame with AK and HI points is transformed ──
    Error: 'elide' is not an exported object from 'namespace:maptools'
    Backtrace:
        ▆
     1. ├─testthat::expect_equal(usmap_transform(data), result, tolerance = 1e-05) at test-transform.R:16:2
     2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
     3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
     4. ├─usmap::usmap_transform(data)
     5. └─usmap:::usmap_transform.data.frame(data)
    ── Error ('test-transform.R:32:3'): data frame with AK points is transformed ───
    Error: 'elide' is not an exported object from 'namespace:maptools'
    Backtrace:
        ▆
     1. ├─testthat::expect_equal(usmap_transform(data), result, tolerance = 1e-05) at test-transform.R:32:2
     2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
     3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
     4. ├─usmap::usmap_transform(data)
     5. └─usmap:::usmap_transform.data.frame(data)
    ── Error ('test-transform.R:48:3'): data frame with HI points is transformed ───
    Error: 'elide' is not an exported object from 'namespace:maptools'
    Backtrace:
        ▆
     1. ├─testthat::expect_equal(usmap_transform(data), result, tolerance = 1e-05) at test-transform.R:48:2
     2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
     3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
     4. ├─usmap::usmap_transform(data)
     5. └─usmap:::usmap_transform.data.frame(data)
    
    [ FAIL 3 | WARN 0 | SKIP 0 | PASS 160 ]
    Error: Test failures
    Execution halted

@rsbivand
Copy link
Author

With CRAN maptools 1.1-7, https://cran.r-project.org/web/checks/check_results_usmap.html with ERRORS.

With CRAN maptools 1.1-7, sp 1.6-1 soon to be on CRAN, and this diff:
maptools-elide.diff.txt
check passes:
00check.log

Wait until spupdates on CRAN and submit with these diffs; check locally with sp from edzer/sp.

@rsbivand
Copy link
Author

rsbivand commented Jun 1, 2023

sp 1.6-1 is on CRAN, please update immediately.

@pdil
Copy link
Owner

pdil commented Jun 8, 2023

Thanks for the updates! I'm working on the changes now, I'll have the update released shortly (also received a warning from CRAN).

@pdil pdil self-assigned this Jun 8, 2023
@pdil pdil added the tech Technical issues and pull requests not directly related to usmap functionality label Jun 8, 2023
@pdil pdil closed this as completed in #71 Jun 9, 2023
@pdil pdil closed this as completed in 132175b Jun 9, 2023
@rsbivand
Copy link
Author

usmap_0.6.1.9999.tar.gz CMD check _SP_EVOLUTION_STATUS_=2 R_LIBS=/home/rsb/lib/r_libs:/home/rsb/lib/r_libs_retiring _R_CHECK_SUGGESTS_ONLY_=true _R_CHECK_FORCE_SUGGESTS_=FALSE looks clean:
00check.log
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug or issue that should be resolved tech Technical issues and pull requests not directly related to usmap functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants