Skip to content

Commit

Permalink
add covr
Browse files Browse the repository at this point in the history
  • Loading branch information
favstats committed May 12, 2019
1 parent b0c7eda commit dd6c574
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 14 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.travis\.yml$
^codecov\.yml$
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

language: R
cache: packages
after_success:
- Rscript -e 'covr::codecov()'
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Imports:
magrittr,
rlist
Suggests:
testthat (>= 2.1.0)
testthat (>= 2.1.0),
covr
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ output: github_document
knitr::opts_chunk$set(message = F, warning = F)
```

<!-- [![Travis build status](https://travis-ci.org/favstats/peRspective.svg?branch=master)](https://travis-ci.org/favstats/peRspective) -->

# peRspective <img src="images/perspective2.png" width="160px" align="right" />


Expand All @@ -19,6 +17,8 @@ git_repo <- "favstats/peRspective"
cat(
badge_travis(git_repo),
# badge_(git_repo),
"[![Codecov test coverage](https://codecov.io/gh/favstats/peRspective/branch/master/graph/badge.svg)](https://codecov.io/gh/favstats/peRspective?branch=master)",
badge_code_size(git_repo),
badge_last_commit(git_repo)
)
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

<!-- [![Travis build status](https://travis-ci.org/favstats/peRspective.svg?branch=master)](https://travis-ci.org/favstats/peRspective) -->

# peRspective <img src="images/perspective2.png" width="160px" align="right" />

[![](https://travis-ci.org/favstats/peRspective.svg?branch=master)](https://travis-ci.org/favstats/peRspective)
[![Codecov test
coverage](https://codecov.io/gh/favstats/peRspective/branch/master/graph/badge.svg)](https://codecov.io/gh/favstats/peRspective?branch=master)
[![](https://img.shields.io/github/languages/code-size/favstats/peRspective.svg)](https://github.com/favstats/peRspective)
[![](https://img.shields.io/github/last-commit/favstats/peRspective.svg)](https://github.com/favstats/peRspective/commits/master)

Expand Down Expand Up @@ -355,51 +355,51 @@ text_sample %>%

Or the (not as pretty) output in Markdown

## 11.11% [2019-05-12 02:39:56]: 1 out of 9 (11.11%)
## 11.11% [2019-05-12 03:49:53]: 1 out of 9 (11.11%)
## text_id: #efdcxct
## 0.96 TOXICITY
## 0.79 SEVERE_TOXICITY
##
## 22.22% [2019-05-12 02:39:57]: 2 out of 9 (22.22%)
## 22.22% [2019-05-12 03:49:54]: 2 out of 9 (22.22%)
## text_id: #ehfcsct
## 0.93 TOXICITY
## 0.44 SEVERE_TOXICITY
##
## 33.33% [2019-05-12 02:39:58]: 3 out of 9 (33.33%)
## 33.33% [2019-05-12 03:49:55]: 3 out of 9 (33.33%)
## text_id: #ekacxwt
## ERROR
## Error in .f(...): HTTP 400
## INVALID_ARGUMENT: Comment must be non-empty.
## NO SCORES
##
## 44.44% [2019-05-12 02:39:59]: 4 out of 9 (44.44%)
## 44.44% [2019-05-12 03:49:56]: 4 out of 9 (44.44%)
## text_id: #ewatxad
## 0.06 TOXICITY
## 0.02 SEVERE_TOXICITY
##
## 55.56% [2019-05-12 02:40:00]: 5 out of 9 (55.56%)
## 55.56% [2019-05-12 03:49:57]: 5 out of 9 (55.56%)
## text_id: #ekacswt
## 0.67 TOXICITY
## 0.31 SEVERE_TOXICITY
##
## 66.67% [2019-05-12 02:40:01]: 6 out of 9 (66.67%)
## 66.67% [2019-05-12 03:49:58]: 6 out of 9 (66.67%)
## text_id: #ewftxwd
## 0.07 TOXICITY
## 0.03 SEVERE_TOXICITY
##
## 77.78% [2019-05-12 02:40:02]: 7 out of 9 (77.78%)
## 77.78% [2019-05-12 03:50:00]: 7 out of 9 (77.78%)
## text_id: #eeadswt
## ERROR
## Error in .f(...): HTTP 400
## INVALID_ARGUMENT: Attribute SEVERE_TOXICITY does not support request languages: is
## NO SCORES
##
## 88.89% [2019-05-12 02:40:03]: 8 out of 9 (88.89%)
## 88.89% [2019-05-12 03:50:01]: 8 out of 9 (88.89%)
## text_id: #enfhxed
## 0.44 TOXICITY
## 0.22 SEVERE_TOXICITY
##
## 100.00% [2019-05-12 02:40:05]: 9 out of 9 (100.00%)
## 100.00% [2019-05-12 03:50:02]: 9 out of 9 (100.00%)
## text_id: #efdmjd
## ERROR
## Error in .f(...): HTTP 400
Expand Down
12 changes: 12 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: auto
threshold: 1%
Binary file added docs/images/.png
Binary file not shown.
Binary file added docs/images/perspective2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/prsp_stream output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dd6c574

Please sign in to comment.