Skip to content

Commit

Permalink
Add lifecycle, coverage & crosses
Browse files Browse the repository at this point in the history
  • Loading branch information
cgoo4 committed May 22, 2024
1 parent 7714af4 commit d825eaa
Show file tree
Hide file tree
Showing 30 changed files with 433 additions and 28 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^docs$
^pkgdown$
^\.github$
^codecov\.yml$
61 changes: 61 additions & 0 deletions .github/workflows/test-coverage.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/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]

name: test-coverage

permissions: read-all

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

steps:
- uses: actions/checkout@v4

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

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

- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
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
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ Depends:
Imports:
grid,
grImport2,
lifecycle,
rlang
Suggests:
dplyr,
ggfx,
ggimage,
ggtext,
gt,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export(geom_casting)
import(ggplot2)
import(grImport2)
import(grid)
importFrom(lifecycle,deprecated)
importFrom(rlang,abort)
importFrom(rlang,is_empty)
4 changes: 3 additions & 1 deletion R/geom_casting.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#' Arbitrary hand-crafted fillable shapes for ggplot2
#'
#' @description In contrast to, for example, [geom_point()] which enables a
#' @description
#' `r lifecycle::badge('experimental')`
#' In contrast to, for example, [geom_point()] which enables a
#' scatterplot of *standard shapes* like circles and triangles,
#' `geom_casting()` offers alternative sets of *arbitrary shapes* such as
#' polygons and "baby geoms", e.g. a tiny violin or box.
Expand Down
1 change: 1 addition & 0 deletions R/ggfoundry-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' @import ggplot2
#' @import grid
#' @import grImport2
#' @importFrom lifecycle deprecated
#' @importFrom rlang abort is_empty
## usethis namespace: end
NULL
3 changes: 2 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ knitr::opts_chunk$set(
# ggfoundry

<!-- badges: start -->

# ggfoundry <a href="https://cgoo4.github.io/ggfoundry/"><img src="man/figures/logo.PNG" align="right" height="138" alt="ggfoundry website" /></a>
[![Codecov test coverage](https://codecov.io/gh/cgoo4/ggfoundry/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cgoo4/ggfoundry?branch=main)
<!-- badges: end -->

The goal of ggfoundry is to offer arbitrary hand-crafted fillable shapes for ggplot2.
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# ggfoundry

<!-- badges: start -->

# ggfoundry <a href="https://cgoo4.github.io/ggfoundry/"><img src="man/figures/logo.PNG" align="right" height="138" alt="ggfoundry website" /></a>

[![Codecov test
coverage](https://codecov.io/gh/cgoo4/ggfoundry/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cgoo4/ggfoundry?branch=main)
<!-- badges: end -->

The goal of ggfoundry is to offer arbitrary hand-crafted fillable shapes
Expand Down
14 changes: 14 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true
16 changes: 16 additions & 0 deletions inst/extdata/cross-cross1_col-cairo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions inst/extdata/cross-cross1_fill-cairo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d825eaa

Please sign in to comment.