Skip to content

Commit

Permalink
Merge pull request #125 from dieghernan/across
Browse files Browse the repository at this point in the history
Fix test to adapt to upcoming version of `sf`
  • Loading branch information
dieghernan authored Dec 15, 2023
2 parents 5ee9fff + 2a446a5 commit 432eff5
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 7 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/check-sf-devel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# NOTE: This workflow is overkill for most R packages and
# check-standard.yaml is likely a better choice.
# usethis::use_github_action("check-standard") will install it.
on:
schedule:
- cron: '00 12 * * 2,5'
workflow_dispatch:

name: R-CMD-check-sf-devel

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

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

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}


env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: sf-devel
extra-packages: |
any::rcmdcheck
needs: check

- name: Install sf from runiverse
run: |
# Install sf from rspatial runiverse
install.packages('sf', repos = c('https://r-spatial.r-universe.dev', 'https://cloud.r-project.org'))
# Display version
cat(as.character(packageVersion("sf")))
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v2

13 changes: 10 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ message: 'To cite package "tidyterra" in publications use:'
type: software
license: MIT
title: 'tidyterra: ''tidyverse'' Methods and ''ggplot2'' Helpers for ''terra'' Objects'
version: 0.5.0
version: 0.5.0.9000
doi: 10.21105/joss.05751
abstract: Extension of the 'tidyverse' for 'SpatRaster' and 'SpatVector' objects of
the 'terra' package. It includes also new 'geom_' functions that provide a convenient
Expand Down Expand Up @@ -87,6 +87,9 @@ references:
url: https://r-datatable.com
repository: https://CRAN.R-project.org/package=data.table
authors:
- family-names: Barrett
given-names: Tyson
email: [email protected]
- family-names: Dowle
given-names: Matt
email: [email protected]
Expand Down Expand Up @@ -192,7 +195,11 @@ references:
authors:
- family-names: Wickham
given-names: Hadley
email: [email protected]
email: [email protected]
- family-names: Pedersen
given-names: Thomas Lin
email: [email protected]
orcid: https://orcid.org/0000-0002-5147-4711
- family-names: Seidel
given-names: Dana
year: '2023'
Expand All @@ -201,7 +208,7 @@ references:
abstract: 'sf: Simple Features for R'
notes: Imports
url: https://r-spatial.github.io/sf/
repository: https://CRAN.R-project.org/package=sf
repository: https://r-spatial.r-universe.dev
authors:
- family-names: Pebesma
given-names: Edzer
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tidyterra
Title: 'tidyverse' Methods and 'ggplot2' Helpers for 'terra' Objects
Version: 0.5.0
Version: 0.5.0.9000
Authors@R: c(
person("Diego", "Hernangómez", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-8457-4658")),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# tidyterra (development version)

- Adjust tests for `as_sf()` (#124).


# tidyterra 0.5.0

**tidyterra** has been accepted on JOSS. Please use the result of
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ objects with [{ggplot2}](https://ggplot2.tidyverse.org/).

## Overview

You can have a look to the documentation of the dev version in
<https://dieghernan.github.io/tidyterra/dev/>

{tidyverse} methods implemented on {tidyterra} works differently
depending on the type of Spat\* object:

Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/dieghernan/tidyterra",
"issueTracker": "https://github.com/dieghernan/tidyterra/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.5.0",
"version": "0.5.0.9000",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -308,7 +308,7 @@
"SystemRequirements": null
},
"keywords": ["r", "terra", "ggplot-extension", "r-spatial", "rspatial", "r-package", "rstats", "rstats-package", "cran", "cran-r"],
"fileSize": "3442.505KB",
"fileSize": "3442.524KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
2 changes: 1 addition & 1 deletion inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
"url": "https://cran.r-project.org"
},
"runtimePlatform": "R version 4.3.2 (2023-10-31 ucrt)",
"version": "0.5.0"
"version": "0.5.0.9000"
}
1 change: 1 addition & 0 deletions tests/testthat/test-as_sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ test_that("Coercion to rowwise sf works", {


test_that("Coercion to rowwise sf works with names creating groups", {
skip("See issue #124")
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
v <- terra::vect(f)
v$gr <- c("C", "A", "A", "B", "A", "B", "B", "C", "A")
Expand Down
13 changes: 13 additions & 0 deletions vignettes/articles/faqs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -485,3 +485,16 @@ autoplot(r) +
text_cex = .8
)
```


## Session info

<details>
<summary>Details</summary>
```{r session, echo=FALSE}
if (!require("sessioninfo")) {
install.packages("sessioninfo")
}
sessioninfo::session_info()
```
</details>
13 changes: 13 additions & 0 deletions vignettes/articles/palettes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,16 @@ for (i in allpals) {
print(ss)
}
```


## Session info

<details>
<summary>Details</summary>
```{r session, echo=FALSE}
if (!require("sessioninfo")) {
install.packages("sessioninfo")
}
sessioninfo::session_info()
```
</details>

0 comments on commit 432eff5

Please sign in to comment.