Skip to content

Commit

Permalink
add travis,covr,covrpage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Sidi committed Sep 4, 2019
1 parent e0c7dd8 commit cfc28c2
Show file tree
Hide file tree
Showing 10 changed files with 219 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Expand Up @@ -5,3 +5,5 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.travis\.yml$
^codecov\.yml$
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -36,3 +36,4 @@ vignettes/*.pdf
rsconnect/

*.Rproj
inst/doc
22 changes: 22 additions & 0 deletions .travis.yml
@@ -0,0 +1,22 @@
dist: trusty
language: R
cache: packages
r_packages:
- pkgdown
r_github_packages:
- metrumresearchgroup/covrpage
after_success:
- Rscript -e 'covr::codecov()'
- Rscript -e 'devtools::install(); covrpage::covrpage_ci()'
- Rscript -e 'pkgdown::build_site()'
deploy:
provider: pages
skip-cleanup: true
github-token: "$GITHUB_PAT"
keep-history: true
local-dir: docs
on:
branch: master
env:
global:
secure: IBUCxiqGy71sUYUJDUqOrR8mMn3YZU2Mw8hgNWApGDKv8cQ/BSYiC+B8jUSDKCP2IpwPoFYAGD5D9AvTkpmvnPVzAdXGktbA7lWsRLyIz5UReZUgKSlG9IyXHiEkqU254Edk3laAxUxbNGcHtnr4qe4aFDQNaNr7W95LOwAuCwq6N4uKQH9enUhTBecismLWwuHmNZlHoxvghYVPuOFsIlHwd9FKC6KF26qnnfeVyqxVQnMXsmSX4jYTZdiZHsIVRkowQEMGd5NSBs7Cg5g7JNrExu7uUcCpFTBngPiFGYgFTmmJIgCheedj/N2ETft3ALKzozgcWG2LwWtrerTrkfZbyDCgckqRy3OpZPh2W2+SYusspX5qmG9ifDWqRXsfpVxcqhm4qOTbPN9zPnXgHlpTU2oprWTDlxCkRuf5XCCOjUamQNWLt2xjy6PlcC9tfaEj08OUg8838jFOFL4YtyB928GeT7lxSdNsY6urzYgErMJShiYchb5eEsz8W/11x2okEt+17xsh5bQo3hMYe5ZRu8+v53+TMQALjHDiln3BJNhOws7zuuOn9PN9zWetbldlwJiHJ1QJnQX8ES+oDxd7QRQzLK0Eg+6eri+myQ86F15cGvy8pyfRbpZhQfh1YqcZQyzB+jmGzL1kd04ngOMXcGqoy/v2+XYUdhICD3A=
19 changes: 10 additions & 9 deletions DESCRIPTION
@@ -1,21 +1,22 @@
Package: details
Title: Create details section for markdown and roxygen2
Version: 0.0.7
Authors@R:
person(given = "Jonathan",
family = "Sidi",
role = c("aut", "cre"),
email = "yonicd@gmail.com")
Description: Programatically build a details template to place in a markdown,
`Rmarkdown` and `roxygen2` documentation.
Authors@R: person(given = "Jonathan", family = "Sidi", role = c("aut", "cre"),
email = "yonicd@gmail.com")
Description: Programatically build a details template to place in a markdown,
`Rmarkdown` and `roxygen2` documentation.
Depends: R (>= 3.2.0)
Imports: utils, clipr
Suggests:
testthat,
knitr,
rmarkdown,
covr
License: MIT + file LICENSE
URL: https://github.com/yonicd/details
BugReports: https://github.com/yonicd/details/issues
Encoding: UTF-8
LazyData: false
RoxygenNote: 6.1.1
Roxygen: list(markdown = TRUE)
Suggests:
testthat
VignetteBuilder: knitr
7 changes: 7 additions & 0 deletions README.Rmd
Expand Up @@ -12,6 +12,13 @@ knitr::opts_chunk$set(
out.width = "100%"
)
```

<!-- badges: start -->
[![Travis build status](https://travis-ci.org/yonicd/details.svg?branch=master)](https://travis-ci.org/yonicd/details)
[![Codecov test coverage](https://codecov.io/gh/yonicd/details/branch/master/graph/badge.svg)](https://codecov.io/gh/yonicd/details?branch=master)
[![Covrpage Summary](https://img.shields.io/badge/covrpage-Last_Build_2019_09_03-brightgreen.svg)](http://tinyurl.com/yyodcwc7)
<!-- badges: end -->

# details

Simple function for creating a details block for markdown documents and Roxygen2 documentation.
Expand Down
10 changes: 10 additions & 0 deletions README.md
@@ -1,6 +1,16 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

<!-- badges: start -->

[![Travis build
status](https://travis-ci.org/yonicd/details.svg?branch=master)](https://travis-ci.org/yonicd/details)
[![Codecov test
coverage](https://codecov.io/gh/yonicd/details/branch/master/graph/badge.svg)](https://codecov.io/gh/yonicd/details?branch=master)
[![Covrpage
Summary](https://img.shields.io/badge/covrpage-Last_Build_2019_09_03-brightgreen.svg)](http://tinyurl.com/yyodcwc7)
<!-- badges: end -->

# details

Simple function for creating a details block for markdown documents and
Expand Down
12 changes: 12 additions & 0 deletions codecov.yml
@@ -0,0 +1,12 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: auto
threshold: 1%
69 changes: 69 additions & 0 deletions tests/README.md
@@ -0,0 +1,69 @@
Tests and Coverage
================
03 September, 2019 21:37:33

- [Coverage](#coverage)
- [Unit Tests](#unit-tests)

This output is created by
[covrpage](https://github.com/metrumresearchgroup/covrpage).

## Coverage

Coverage summary is created using the
[covr](https://github.com/r-lib/covr) package.

| Object | Coverage (%) |
| :------------------------------ | :----------: |
| details | 46.81 |
| [R/collapse.R](../R/collapse.R) | 0.00 |
| [R/print.R](../R/print.R) | 0.00 |
| [R/read.R](../R/read.R) | 28.57 |
| [R/build.R](../R/build.R) | 63.16 |
| [R/parts.R](../R/parts.R) | 66.67 |
| [R/details.R](../R/details.R) | 100.00 |

<br>

## Unit Tests

Unit Test summary is created using the
[testthat](https://github.com/r-lib/testthat)
package.

| file | n | time | error | failed | skipped | warning |
| :------------------------------------ | -: | ----: | ----: | -----: | ------: | ------: |
| [test-basic.R](testthat/test-basic.R) | 1 | 0.001 | 0 | 0 | 0 | 0 |

<details closed>

<summary> Show Detailed Test Results
</summary>

| file | context | test | status | n | time |
| :------------------------------------------ | :------ | :----------- | :----- | -: | ----: |
| [test-basic.R](testthat/test-basic.R#L6_L9) | basic | basic: empty | PASS | 1 | 0.001 |

</details>

<details>

<summary> Session Info </summary>

| Field | Value |
| :------- | :---------------------------------- |
| Version | R version 3.6.1 (2019-07-05) |
| Platform | x86\_64-apple-darwin15.6.0 (64-bit) |
| Running | macOS Mojave 10.14.5 |
| Language | en\_US |
| Timezone | America/New\_York |

| Package | Version |
| :------- | :------ |
| testthat | 2.1.1 |
| covr | 3.2.1 |
| covrpage | 0.0.70 |

</details>

<!--- Final Status : pass --->
2 changes: 2 additions & 0 deletions vignettes/.gitignore
@@ -0,0 +1,2 @@
*.html
*.R
84 changes: 84 additions & 0 deletions vignettes/tests_and_coverage.Rmd
@@ -0,0 +1,84 @@
---
title: "Tests and Coverage"
date: "`r format(Sys.time(), '%d %B, %Y %H:%M:%S')`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{covrpage: Tests and Coverage}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = FALSE
)
```

<!--- Placeholder for tests/README.md Do Not Edit--->
- [Coverage](#coverage)
- [Unit Tests](#unit-tests)

This output is created by
[covrpage](https://github.com/metrumresearchgroup/covrpage).

## Coverage

Coverage summary is created using the
[covr](https://github.com/r-lib/covr) package.

| Object | Coverage (%) |
| :------------------------------ | :----------: |
| details | 46.81 |
| [R/collapse.R](https://github.com/yonicd/details/tree/master/R/collapse.R) | 0.00 |
| [R/print.R](https://github.com/yonicd/details/tree/master/R/print.R) | 0.00 |
| [R/read.R](https://github.com/yonicd/details/tree/master/R/read.R) | 28.57 |
| [R/build.R](https://github.com/yonicd/details/tree/master/R/build.R) | 63.16 |
| [R/parts.R](https://github.com/yonicd/details/tree/master/R/parts.R) | 66.67 |
| [R/details.R](https://github.com/yonicd/details/tree/master/R/details.R) | 100.00 |

<br>

## Unit Tests

Unit Test summary is created using the
[testthat](https://github.com/r-lib/testthat)
package.

| file | n | time | error | failed | skipped | warning |
| :------------------------------------ | -: | ----: | ----: | -----: | ------: | ------: |
| [test-basic.R](https://github.com/yonicd/details/tree/master/tests/testthat/test-basic.R) | 1 | 0.001 | 0 | 0 | 0 | 0 |

<details closed>

<summary> Show Detailed Test Results
</summary>

| file | context | test | status | n | time |
| :------------------------------------------ | :------ | :----------- | :----- | -: | ----: |
| [test-basic.R](https://github.com/yonicd/details/tree/master/tests/testthat/test-basic.R#L6_L9) | basic | basic: empty | PASS | 1 | 0.001 |

</details>

<details>

<summary> Session Info </summary>

| Field | Value |
| :------- | :---------------------------------- |
| Version | R version 3.6.1 (2019-07-05) |
| Platform | x86\_64-apple-darwin15.6.0 (64-bit) |
| Running | macOS Mojave 10.14.5 |
| Language | en\_US |
| Timezone | America/New\_York |

| Package | Version |
| :------- | :------ |
| testthat | 2.1.1 |
| covr | 3.2.1 |
| covrpage | 0.0.70 |

</details>

<!--- Final Status : pass --->

0 comments on commit cfc28c2

Please sign in to comment.