Skip to content

Commit

Permalink
flush
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed Dec 1, 2023
1 parent d56de06 commit e50d133
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 36 deletions.
60 changes: 31 additions & 29 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: master
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Cache R packages
uses: actions/cache@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
extra-packages: any::pkgdown, local::.
needs: website

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown")
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
6 changes: 4 additions & 2 deletions R/proj_crs_text.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ proj_crs_text <- function(source, format = 0L) {
stopifnot(format %in% c(0L, 1L, 2L))
stopifnot(is.character(source))
stopifnot(length(source) == 1L)
.Call("C_proj_crs_text",
tst <- try(.Call("C_proj_crs_text",
crs_ = source,
format = as.integer(format),
PACKAGE = "PROJ")
PACKAGE = "PROJ"), silent = TRUE)
if (inherits(tst, "try-error")) return(NA_character_)
tst
}
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,5 @@ Geocentric transformations aren't used in R much, but some examples are found in
---

Please note that the PROJ project is released with a
[Contributor Code of Conduct](https://github.com/hypertidy/PROJ/blob/master/CODE_OF_CONDUCT.md).
[Contributor Code of Conduct](https://github.com/hypertidy/PROJ/blob/main/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ lat <- c(NA, 0, -42)

proj_trans(cbind(lon, lat), src, source = dst)
#> $x_
#> [1] NA NA 147.0018
#> [1] NaN NaN 147.0018
#>
#> $y_
#> [1] NA NA -42.00038
#> [1] NaN NaN -42.00038
```

A more realistic example with coastline map data.
Expand Down Expand Up @@ -174,5 +174,5 @@ found in the [quadmesh](https://CRAN.R-project.org/package=quadmesh) and

Please note that the PROJ project is released with a [Contributor Code
of
Conduct](https://github.com/hypertidy/PROJ/blob/master/CODE_OF_CONDUCT.md).
Conduct](https://github.com/hypertidy/PROJ/blob/main/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.
4 changes: 3 additions & 1 deletion vignettes/PROJ.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ from version 6 and above. There's no other package in R that allows generic tran
PROJ library, and this package provides that along with these goals:

* no other dependencies (PROJ library is it, and R)
* allow geocentric transformations
* allow geocentric transformations, and 3D and 4D transformations generally.
* provide no interpretation or restrictions on source or target projection specification
* do not require special formats, we use numeric vectors in matrix or data frame form

Expand Down Expand Up @@ -72,3 +72,5 @@ Note that various forms of projection string are supported, we can use PROJ.4 st

The goal is for the [reproj package](https://CRAN.r-project.org/package=reproj) to wrap this package. In time
that will be the easiest way to run coordinate transformations with PROJ for versions 4, 5, 6, 7 or above.


0 comments on commit e50d133

Please sign in to comment.