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

build ignore vignettes + prefix sf calls #946

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ ubuntu_17_installation.sh
^vignettes/tmap-getstarted.Rmd$
^tests/testthat/Rplots.pdf$
^\.covrignore$
^vignettes$
4 changes: 2 additions & 2 deletions R/check_fix.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
isLarge = (inherits(sfc, c("sfc_MULTIPOLYGON", "sfc_MULTILINESTRING", "sfc_GEOMETRYCOLLECTION")) && length(sfc) >= 5000)
if (isLarge && messages) message("Checking shape object \"", shp_name, " \". It is large, so it may take a while")

if (!all(st_is_valid(sfc))) {
if (!all(sf::st_is_valid(sfc))) {

Check warning on line 7 in R/check_fix.R

View check run for this annotation

Codecov / codecov/patch

R/check_fix.R#L7

Added line #L7 was not covered by tests
checkAgain = FALSE
tryCatch({
if (messages) message("The shape object \"", shp_name, "\" is invalid", ifelse(reproj, " (after reprojection). ", ". "), "Trying to fix it...")
Expand All @@ -13,7 +13,7 @@
if (messages) message("Unsuccesful attempt with sf::st_make_valid")
checkAgain = TRUE
})
if (checkAgain || !all(st_is_valid(sfc))) {
if (checkAgain || !all(sf::st_is_valid(sfc))) {

Check warning on line 16 in R/check_fix.R

View check run for this annotation

Codecov / codecov/patch

R/check_fix.R#L16

Added line #L16 was not covered by tests
suppressMessages(sf::sf_use_s2(!s2))
.TMAP$set_s2 = s2
tryCatch({
Expand Down
Loading