Skip to content

Commit

Permalink
Test coverage config
Browse files Browse the repository at this point in the history
  • Loading branch information
Knicey committed Aug 14, 2024
1 parent 0a13ca3 commit 5b0bc13
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^pkgdown$
^data-raw$
^\.github$
^codecov\.yml$
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main, master]

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

permissions: read-all

Expand Down
5 changes: 5 additions & 0 deletions R/geom_segment_glyph.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ GeomSegmentGlyph <- ggproto(
)
)


#' @export
rescale01x <- function(x, xlim=NULL) {
if (is.null(xlim)) {
rng <- range(x, na.rm = TRUE)
Expand All @@ -87,13 +89,15 @@ rescale01x <- function(x, xlim=NULL) {
return(x)
}

#' @export
rescale11x <- function(x, xlim=NULL) {
x = 2 * (rescale01x(x) - 0.5)
return(x)
}

#I need a special case for y because I have y and yend that need to be scaled
#the same way
#' @export
rescale01y <- function(y, yend, ylim=NULL) {
if (is.null(ylim)) {
rngy <- range(y, na.rm = TRUE)
Expand All @@ -110,6 +114,7 @@ rescale01y <- function(y, yend, ylim=NULL) {
return(list(y, yend))
}

#' @export
rescale11y <- function(y, yend, xlim=NULL) {
newy = 2 * (rescale01y(y, yend)[[1]] - 0.5)
newyend = 2 * (rescale01y(y, yend)[[2]] - 0.5)
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ knitr::opts_chunk$set(

<!-- badges: start -->
[![R-CMD-check](https://github.com/Knicey/stglyphs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Knicey/stglyphs/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/Knicey/stglyphs/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Knicey/stglyphs?branch=master)
<!-- badges: end -->

The goal of stglpyhs is to introduce new ways of visualizing spatio-temporal data and in particular analyzing across multivariate seasonal data. The existing cubble package implements glyph maps in the form of line graphs. This project seeks to expand this functionality to segment plots to visualize multivariable data better and analyze seasonal trends.
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

0 comments on commit 5b0bc13

Please sign in to comment.