Skip to content
Open
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
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# CI & codecov-related
^\.travis\.yml$
^\.lintr$
^\.github$
^benchmarks$

^logo_maker.R$
^_pkgdown\.yml$
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# GitHub Actions workflow for R CMD check
# Replaces deprecated Travis CI configuration

name: R-CMD-check

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
PKG_CFLAGS: "-O3 -Wall -pedantic"

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libudunits2-dev \
libproj-dev \
libgeos-dev \
libgdal-dev

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rcmdcheck
any::covr
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
error-on: 'warning'

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

- name: Test coverage
if: success() && runner.os == 'Linux' && matrix.config.r == 'release'
run: |
Rscript -e 'covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# `geohashTools` NEWS

## v0.3.4 (Development)

### INFRASTRUCTURE

1. Migrated from deprecated Travis CI to GitHub Actions for continuous integration. New workflow tests across multiple R versions (release, devel, oldrel-1) and operating systems (Ubuntu, macOS, Windows), providing more comprehensive coverage. Badge updated in README.

## v0.3.3

Drop references to deprecated rgdal.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ output: github_document


![logo](logo.png "geohashTools")
[![R-CMD-check](https://github.com/MichaelChirico/geohashTools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/MichaelChirico/geohashTools/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/MichaelChirico/geohashTools/branch/master/graph/badge.svg)](https://app.codecov.io/gh/MichaelChirico/geohashTools?branch=master)
[![Build Status](https://app.travis-ci.com/MichaelChirico/geohashTools.svg?branch=master)](https://app.travis-ci.com/MichaelChirico/geohashTools)
[![CRAN status](https://www.r-pkg.org/badges/version/geohashTools)](https://cran.r-project.org/package=geohashTools)

This package provides tools for working with [Gustavo](https://github.com/niemeyer) [Niemeyer](https://twitter.com/gniemeyer)'s [geohash](https://en.wikipedia.org/wiki/Geohash) system of nestable, compact global coordinates based on [Z-order curves](https://en.wikipedia.org/wiki/Z-order_curve). The system consists of carving the earth into equally-sized rectangles (when projected into latitude/longitude space) and nesting this process recursively.
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-gis-tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ test_that('gh_covering works', {
sp::proj4string(banjarmasin) = NA_character_
banjarmasin_cover = gh_covering(banjarmasin, minimal = TRUE)
sp::proj4string(banjarmasin_cover) = wgs
expect_equivalent(banjarmasin_cover, banjarmasin_tight)
expect_equal(banjarmasin_cover, banjarmasin_tight, ignore_attr = TRUE)

# works for SpatialPointsDataFrame when minimal=TRUE, #30
banjarmasinDF = sp::SpatialPointsDataFrame(
Expand Down
Loading