Skip to content

Commit

Permalink
fix Rbuildignore
Browse files Browse the repository at this point in the history
  • Loading branch information
wjschne committed Mar 21, 2024
1 parent 567a7be commit d77a47f
Show file tree
Hide file tree
Showing 12 changed files with 146 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
^pkgdown$
^\.github$
^data-raw$
*.pptx
^dev$
^codecov\.yml$
50 changes: 50 additions & 0 deletions .github/workflows/test-coverage.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]

name: test-coverage

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
needs: coverage

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

- 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
38 changes: 20 additions & 18 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
Package: arrowheadr
Type: Package
Package: arrowheadr
Title: Make Custom Arrowheads
Version: 0.1.0.9000
Authors@R:
person("W. Joel", "Schneider", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-8393-5316"))
Description: Create arrowheads for the ggarrow package.
License: CC0
Encoding: UTF-8
Imports:
bezier,
purrr
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Authors@R: c(
person(given = "W. Joel",
family = "Schneider",
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-8393-5316"))
)
URL: https://github.com/wjschne/arrowheadr,
https://wjschne.github.io/arrowheadr/
BugReports: https://github.com/wjschne/arrowheadr/issues
Depends:
R (>= 2.10)
Imports:
bezier,
graphics,
grDevices,
purrr,
stats
Suggests:
ggarrow,
testthat (>= 3.0.0)
Remotes:
https://github.com/teunbrand/ggarrow
Suggests:
ggarrow (>= 0.0.0.9000)
URL: https://github.com/wjschne/arrowheadr, https://wjschne.github.io/arrowheadr/
BugReports: https://github.com/wjschne/arrowheadr/issues
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Config/testthat/edition: 3
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

export(arrow_head_bezier)
export(arrow_head_catenary)
export(arrow_head_default)
export(arrow_head_deltoid)
export(arrow_head_ellipse)
export(arrow_head_function)
Expand Down
1 change: 1 addition & 0 deletions R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ plot_arrowhead <- function(x, displayline = TRUE, displaypoints = TRUE) {
#' @keywords internal
#'
#' @return a matrix
#' @export
arrow_head_default <- function(rotate = 0,
rescale = c(1, 1),
nudge = c(0, 0),
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ library(ragg)
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/arrowheadr)](https://CRAN.R-project.org/package=arrowheadr)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Codecov test coverage](https://codecov.io/gh/wjschne/arrowheadr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/wjschne/arrowheadr?branch=master)
<!-- badges: end -->

## Purpose
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
status](https://www.r-pkg.org/badges/version/arrowheadr)](https://CRAN.R-project.org/package=arrowheadr)
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Codecov test
coverage](https://codecov.io/gh/wjschne/arrowheadr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/wjschne/arrowheadr?branch=master)
<!-- badges: end -->

## Purpose
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
12 changes: 12 additions & 0 deletions dev/config_attachment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
path.n: NAMESPACE
path.d: DESCRIPTION
dir.r: R
dir.v: vignettes
dir.t: tests
extra.suggests: ggarrow
pkg_ignore: ~
document: yes
normalize: yes
inside_rmd: no
must.exist: yes
check_if_suggests_is_installed: yes
28 changes: 28 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Bezier
Codecov
Deltoid
Lifecycle
Reflecter
Rescale
Rescaling
Teun
Wittengenstein's
arrrowhead
bezier
catenary
dnorm
eiffel
ggarrow
ggplot
https
pantherxf
peakedness
rescaled
rescaling
resect
spirograph
superellipses
tikz
tikz's
wikipedia
windings
12 changes: 12 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is part of the standard setup for testthat.
# It is recommended that you do not modify it.
#
# Where should you do additional test configuration?
# Learn more about the roles of various files in:
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
# * https://testthat.r-lib.org/articles/special-files.html

library(testthat)
library(arrowheadr)

test_check("arrowheadr")
3 changes: 3 additions & 0 deletions tests/testthat/test-main.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test_that("multiplication works", {
expect_equal(2 * 2, 4)
})

0 comments on commit d77a47f

Please sign in to comment.