Skip to content

Commit

Permalink
Merge pull request #112 from ateucher/fix-erase-bug
Browse files Browse the repository at this point in the history
Upgrade mapshaper to 0.4.163 - Fix erase bug #110 + other improvements
  • Loading branch information
ateucher committed May 20, 2021
2 parents 0bd0b69 + e1b9e14 commit 7815318
Show file tree
Hide file tree
Showing 37 changed files with 456 additions and 472 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
^CRAN-RELEASE$
^\.github$
^codecov\.yml$
^doc$
^Meta$
46 changes: 28 additions & 18 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ jobs:
fail-fast: false
matrix:
config:
- { os: windows-latest, r: '3.6', args: "--no-manual"}
- { os: macOS-latest, r: '3.6', args: "--no-manual", sf_args: "--with-proj-lib=/usr/local/lib/"}
- { os: macOS-latest, r: '3.6', args: "--no-manual", no_node: true, sf_args: "--with-proj-lib=/usr/local/lib/"}
- { os: macOS-latest, r: 'devel', sf_args: "--with-proj-lib=/usr/local/lib/"}
- { os: ubuntu-16.04, r: '3.5', v8: "libnode-dev", args: "--no-manual"}
- { os: ubuntu-16.04, r: '3.6', v8: "libv8-dev", args: "--no-manual"}
- { os: ubuntu-16.04, r: '3.6', v8: "libnode-dev"}

- { os: windows-latest, r: 'release', args: "--no-manual"}
- { os: macOS-latest, r: 'release', args: "--no-manual"}
- { os: macOS-latest, r: 'release', args: "--no-manual", no_node: true}
- { os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", v8: "libnode-dev", args: "--no-manual"}
- { os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", v8: "libnode-dev"}
- { os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", v8: "libv8-dev"}
- { os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", v8: "libnode-dev", args: "--no-manual"}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
CRAN: ${{ matrix.config.cran }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
cache-version: v2

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
if: matrix.config.no_node == false
Expand All @@ -33,7 +36,7 @@ jobs:
if: matrix.config.no_node == false
run: npm install -g mapshaper

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}

Expand All @@ -42,11 +45,18 @@ jobs:
- uses: r-lib/actions/setup-tinytex@master
if: contains(matrix.config.args, 'no-manual') == false

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-v8-${{ matrix.config.v8 }}-${{ matrix.config.dev_sf }}-${{ hashFiles('DESCRIPTION') }}
key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-

- name: install macOS system dependencies
if: runner.os == 'macOS'
Expand All @@ -73,10 +83,9 @@ jobs:
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo add-apt-repository -y ppa:cran/jq
sudo add-apt-repository -y ppa:cran/v8
sudo -s eval "$sysreqs"
# install spatial dependencies
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt install \
libudunits2-dev \
Expand All @@ -87,14 +96,15 @@ jobs:
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE, configure.args = c('sf' = '${{ matrix.config.sf_args }}'))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran('rcmdcheck')
shell: Rscript {0}


- name: Check
env:
TMPDIR: ${{ runner.temp }}
run: |
rcmdcheck::rcmdcheck(args = '${{ matrix.config.args }}', error_on = 'warning', check_dir = 'check')
rcmdcheck::rcmdcheck(args = "${{ matrix.config.args }}", error_on = 'warning', check_dir = 'check')
shell: Rscript {0}


Expand All @@ -106,7 +116,7 @@ jobs:
path: check

- name: Test coverage
if: matrix.config.os == 'macOS-latest' && matrix.config.r == '3.6'
if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'release'
continue-on-error: true
run: |
Rscript -e 'remotes::install_github("r-lib/covr@gh-actions")'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ inst/doc
!/scratch/fedora-test/*.R
!/scratch/fedora-test/Dockerfile
!/scratch/fedora-test/README*
/doc/
/Meta/
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ VignetteBuilder:
Encoding: UTF-8
LazyData: TRUE
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

* Fixed a bug where functions would fail when there was a space in user's `tmpdir()`
path and `sys = TRUE` (#107)
* Updated bundled mapshaper library to v 0.4.163, which fixed a bug in `ms_erase` (#110, #104, #112)
* When `sys = TRUE`, now uses `mapshaper-xl` in the system call, allowing
larger memory use. Default 8GB can be specified in new argument `sysgb` (#94, #112)
* Internally switched to using `system2()` over `system()` for flexibility

# rmapshaper 0.4.4

Expand Down
Loading

0 comments on commit 7815318

Please sign in to comment.