Skip to content

Commit

Permalink
add instructions when clipboard is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Sidi committed Oct 7, 2019
1 parent 705f46a commit 017f617
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 50 deletions.
3 changes: 3 additions & 0 deletions R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ print.details_console <- function(x,...){
#' @export
print.details_clipr <- function(x,...){

if(!clipr::clipr_available())
stop('clipboard is not installed on the system, consider setting output to "edit"')

clipr::write_clip(x,...)

}
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ More information can be found in the [articles](https://yonicd.github.io/details
Please note that the 'details' project is released with a
[Contributor Code of Conduct](https://github.com/yonicd/details/blob/master/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.

42 changes: 4 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ sessioninfo::session_info()%>%
version R version 3.6.1 (2019-07-05)
os macOS Mojave 10.14.5
system x86_64, darwin15.6.0
ui RStudio
ui X11
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
Expand All @@ -102,41 +102,24 @@ sessioninfo::session_info()%>%
Packages ──────────────────────────────────────────────────────────────
package * version date lib
assertthat 0.2.1 2019-03-21 [1]
backports 1.1.5 2019-10-02 [1]
cli 1.1.0 2019-03-19 [1]
clipr 0.7.0 2019-07-23 [1]
covr * 3.3.0 2019-08-06 [1]
covrpage 0.0.70 2019-07-22 [1]
crayon 1.3.4 2017-09-16 [1]
curl 4.2 2019-09-24 [1]
desc 1.2.0 2019-07-25 [1]
details * 0.1.0 2019-10-07 [1]
digest 0.6.21 2019-09-20 [1]
evaluate 0.14 2019-05-28 [1]
git2r 0.26.1 2019-06-29 [1]
highr 0.8 2019-03-20 [1]
htmltools 0.3.6.9004 2019-09-08 [1]
httr 1.4.1 2019-08-05 [1]
knitr * 1.25 2019-09-18 [1]
lazyeval 0.2.2 2019-03-15 [1]
magrittr * 1.5 2014-11-22 [1]
mime 0.7 2019-06-11 [1]
packrat 0.5.0 2018-11-14 [1]
pkgload 1.0.2 2018-10-29 [1]
knitr 1.25 2019-09-18 [1]
magrittr 1.5 2014-11-22 [1]
png 0.1-7 2013-12-03 [1]
R6 2.4.0 2019-02-14 [1]
Rcpp 1.0.2 2019-07-25 [1]
remotes 2.1.0 2019-06-24 [1]
rex 1.1.2 2017-10-19 [1]
rlang 0.4.0 2019-06-25 [1]
rmarkdown 1.14 2019-07-12 [1]
rprojroot 1.3-2 2018-01-03 [1]
rstudioapi 0.10 2019-03-19 [1]
sessioninfo 1.1.1 2018-11-05 [1]
stringi 1.4.3 2019-03-12 [1]
stringr 1.4.0 2019-02-10 [1]
testthat * 2.2.1 2019-07-25 [1]
whisker 0.4 2019-08-28 [1]
withr 2.1.2 2018-03-15 [1]
xfun 0.10 2019-10-01 [1]
xml2 1.2.2 2019-08-09 [1]
Expand All @@ -146,16 +129,9 @@ sessioninfo::session_info()%>%
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
local
CRAN (R 3.6.0)
CRAN (R 3.6.0)
Github (r-lib/desc@c860e7b)
local
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
Github (rstudio/htmltools@840d786)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
Expand All @@ -172,16 +148,6 @@ sessioninfo::session_info()%>%
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.1)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)
CRAN (R 3.6.0)

[1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library
```
Expand All @@ -203,7 +169,7 @@ details(plot(x=mtcars$mpg,y=mtcars$wt), summary = 'My plot')

<summary> <span title="Click to Expand"> My plot </span> </summary>

![](https://i.imgur.com/HiDPAAI.png)
![](https://i.imgur.com/eOZq0Iz.png)

</details>

Expand Down
24 changes: 12 additions & 12 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Tests and Coverage
================
07 October, 2019 09:25:11
07 October, 2019 18:01:35

- [Coverage](#coverage)
- [Unit Tests](#unit-tests)
Expand All @@ -15,8 +15,8 @@ Coverage summary is created using the

| Object | Coverage (%) |
| :---------------------------- | :----------: |
| details | 89.01 |
| [R/print.R](../R/print.R) | 16.67 |
| details | 82.65 |
| [R/print.R](../R/print.R) | 7.69 |
| [R/device.R](../R/device.R) | 88.24 |
| [R/read.R](../R/read.R) | 88.89 |
| [R/build.R](../R/build.R) | 100.00 |
Expand All @@ -34,10 +34,10 @@ package.

| file | n | time | error | failed | skipped | warning |
| :------------------------------------------ | -: | ----: | ----: | -----: | ------: | ------: |
| [test-basic.R](testthat/test-basic.R) | 3 | 0.176 | 0 | 0 | 0 | 0 |
| [test-collapse.R](testthat/test-collapse.R) | 3 | 0.001 | 0 | 0 | 0 | 0 |
| [test-device.R](testthat/test-device.R) | 3 | 1.840 | 0 | 0 | 0 | 0 |
| [test-utils.R](testthat/test-utils.R) | 5 | 0.004 | 0 | 0 | 0 | 0 |
| [test-basic.R](testthat/test-basic.R) | 3 | 0.018 | 0 | 0 | 0 | 0 |
| [test-collapse.R](testthat/test-collapse.R) | 3 | 0.000 | 0 | 0 | 0 | 0 |
| [test-device.R](testthat/test-device.R) | 3 | 0.858 | 0 | 0 | 0 | 0 |
| [test-utils.R](testthat/test-utils.R) | 5 | 0.005 | 0 | 0 | 0 | 0 |

<details closed>

Expand All @@ -46,20 +46,20 @@ package.

| file | context | test | status | n | time |
| :-------------------------------------------------- | :-------- | :------------------------------ | :----- | -: | ----: |
| [test-basic.R](testthat/test-basic.R#L6_L9) | basic | basic: empty | PASS | 1 | 0.161 |
| [test-basic.R](testthat/test-basic.R#L6_L9) | basic | basic: empty | PASS | 1 | 0.003 |
| [test-basic.R](testthat/test-basic.R#L13_L16) | basic | basic: object | PASS | 1 | 0.012 |
| [test-basic.R](testthat/test-basic.R#L20_L23) | basic | basic: file | PASS | 1 | 0.003 |
| [test-collapse.R](testthat/test-collapse.R#L6_L9) | fold | fold methods: close | PASS | 1 | 0.000 |
| [test-collapse.R](testthat/test-collapse.R#L13_L16) | fold | fold methods: open default | PASS | 1 | 0.000 |
| [test-collapse.R](testthat/test-collapse.R#L20_L23) | fold | fold methods: open with summary | PASS | 1 | 0.001 |
| [test-collapse.R](testthat/test-collapse.R#L20_L23) | fold | fold methods: open with summary | PASS | 1 | 0.000 |
| [test-device.R](testthat/test-device.R#L16) | device | using device: device flag | PASS | 1 | 0.001 |
| [test-device.R](testthat/test-device.R#L20) | device | using device: device png | PASS | 1 | 0.001 |
| [test-device.R](testthat/test-device.R#L24) | device | using device: device upload | PASS | 1 | 1.838 |
| [test-device.R](testthat/test-device.R#L20) | device | using device: device png | PASS | 1 | 0.000 |
| [test-device.R](testthat/test-device.R#L24) | device | using device: device upload | PASS | 1 | 0.857 |
| [test-utils.R](testthat/test-utils.R#L6_L9) | utilities | utilities: tooltip default | PASS | 1 | 0.001 |
| [test-utils.R](testthat/test-utils.R#L13_L16) | utilities | utilities: tooltip with text | PASS | 1 | 0.001 |
| [test-utils.R](testthat/test-utils.R#L21_L24) | utilities | utilities: summary default | PASS | 1 | 0.001 |
| [test-utils.R](testthat/test-utils.R#L28_L31) | utilities | utilities: state open | PASS | 1 | 0.001 |
| [test-utils.R](testthat/test-utils.R#L35_L38) | utilities | utilities: state closed | PASS | 1 | 0.000 |
| [test-utils.R](testthat/test-utils.R#L35_L38) | utilities | utilities: state closed | PASS | 1 | 0.001 |

</details>

Expand Down

0 comments on commit 017f617

Please sign in to comment.