Skip to content

Commit

Permalink
Merge pull request #41 from poissonconsulting/update-actions
Browse files Browse the repository at this point in the history
Update actions and links; increase R dependency version; remove runbisonpic and shinybisonpic from suggests
  • Loading branch information
nehill197 authored Nov 15, 2024
2 parents 27372dc + 18da1b7 commit f16a312
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 28 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -25,18 +27,14 @@ jobs:
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.PRIVATE_ACTIONS_PAT }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-tinytex@v2
- run: tlmgr --version


- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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:
branches: [main, master]
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/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
38 changes: 38 additions & 0 deletions .github/workflows/render-readme.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: render-readme

jobs:
render-readme:
if: "contains(github.event.head_commit.message, 'render rmd')"
runs-on: ubuntu-latest
timeout-minutes: 20
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: devtools

- name: Build package
run: |
devtools::install()
shell: Rscript {0}

- name: Render readme
run: |
rmarkdown::render("README.Rmd")
shell: Rscript {0}

- name: Commit README.md
run: |
git add README.md
git commit -m 'Re-build README.Rmd' || echo "Render README"
git push origin || echo "Render README"
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ on:
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.PRIVATE_ACTIONS_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

Expand All @@ -25,28 +25,37 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

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

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
11 changes: 5 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ Authors@R: c(
Description: This package facilitates the manipulation, exploration, and
analysis of wood bison camera trap data.
License: Apache License (>= 2)
URL: https://github.com/poissonconsulting/bisonpictools,
https://poissonconsulting.github.io/bisonpictools/
BugReports: https://github.com/poissonconsulting/bisonpictools/issues
Depends:
R (>= 3.5.0)
R (>= 4.1)
Imports:
BH,
chk,
Expand All @@ -41,8 +44,6 @@ Suggests:
RcppEigen,
readxl,
rmarkdown,
runbisonpic,
shinybisonpic,
testthat (>= 3.0.0),
withr
VignetteBuilder:
Expand All @@ -51,11 +52,9 @@ Remotes:
poissonconsulting/chktemplate,
poissonconsulting/embr,
poissonconsulting/newdata,
poissonconsulting/runbisonpic,
poissonconsulting/shinybisonpic,
poissonconsulting/smbr
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ library(bisonpictools)
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/poissonconsulting/bisonpictools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/bisonpictools/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/poissonconsulting/bisonpictools/graph/badge.svg?token=znqSXiltZo)](https://codecov.io/gh/poissonconsulting/bisonpictools)
[![Codecov test coverage](https://codecov.io/gh/poissonconsulting/bisonpictools/graph/badge.svg)](https://app.codecov.io/gh/poissonconsulting/bisonpictools)
<!-- badges: end -->

The goal of `bisonpictools` is to facilitate the visualization and analysis of camera trap data for wood bison herds.
The package includes functions to check the correct formatting of data, visualize the data, manipulate and analyse the data using a complex custom-built Bayesian model, and generate predictions of abundances, survival and fecundity rates, and population ratios.

## bisonpic Suite

`bisonpictools` is one of three packages in the **bisonpic** suite of tools:
`bisonpictools` is one of three packages in the [bisonpic suite](https://github.com/poissonconsulting/bisonpicsuite) of tools.

- [`bisonpictools`](https://github.com/poissonconsulting/bisonpictools)
- [`shinybisonpic`](https://github.com/poissonconsulting/shinybisonpic)
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/poissonconsulting/bisonpictools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/bisonpictools/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/poissonconsulting/bisonpictools/graph/badge.svg?token=znqSXiltZo)](https://codecov.io/gh/poissonconsulting/bisonpictools)
[![Codecov test
coverage](https://codecov.io/gh/poissonconsulting/bisonpictools/graph/badge.svg)](https://app.codecov.io/gh/poissonconsulting/bisonpictools)
<!-- badges: end -->

The goal of `bisonpictools` is to facilitate the visualization and
Expand All @@ -20,8 +21,8 @@ rates, and population ratios.

## bisonpic Suite

`bisonpictools` is one of three packages in the **bisonpic** suite of
tools:
`bisonpictools` is one of three packages in the [bisonpic
suite](https://github.com/poissonconsulting/bisonpicsuite) of tools.

- [`bisonpictools`](https://github.com/poissonconsulting/bisonpictools)
- [`shinybisonpic`](https://github.com/poissonconsulting/shinybisonpic)
Expand Down
3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
url: https://poissonconsulting.github.io/bisonpictools/
template:
bootstrap: 5
9 changes: 9 additions & 0 deletions man/bisonpictools-package.Rd

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

0 comments on commit f16a312

Please sign in to comment.