diff --git a/README.Rmd b/README.Rmd index 61b1f24..15d173d 100644 --- a/README.Rmd +++ b/README.Rmd @@ -3,11 +3,20 @@ output: rmarkdown::github_document: df_print: kable --- +```{r pkg-knitr-opts, include=FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + fig.retina = 1, + message = FALSE, + warning = FALSE, + fig.path = "man/figures/README-" +) +options(width=120) +``` -[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/0.1.0/active.svg)](https://www.repostatus.org/#active) -[![Travis-CIBuild Status](https://travis-ci.org/hrbrmstr/simplemagic.svg?branch=master)](https://travis-ci.org/hrbrmstr/simplemagic) -[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/hrbrmstr/simplemagic?branch=master&svg=true)](https://ci.appveyor.com/project/hrbrmstr/simplemagic) -[![Coverage Status](https://img.shields.io/codecov/c/github/hrbrmstr/simplemagic/master.svg)](https://codecov.io/github/hrbrmstr/simplemagic?branch=master) +```{r badges, results='asis', echo=FALSE, cache=FALSE} +hrbrpkghelpr::stinking_badges() +``` # wand @@ -16,9 +25,7 @@ Lightweight File 'MIME' Type Detection Based On Contents or Extension ## Description 'MIME' types are shorthand descriptors for file contents and can be -determined from "magic" bytes in file headers, file contents or intuited from -file extensions. Tools are provided to perform curated "magic" tests as well -as mapping 'MIME' types from a database of over 1,500 extension mappings. +determined from "magic" bytes in file headers, file contents or intuited from file extensions. Tools are provided to perform curated "magic" tests as well as mapping 'MIME' types from a database of over 1,500 extension mappings. ## SOME IMPORTANT DETAILS @@ -38,13 +45,9 @@ The following functions are implemented: hrbrpkghelpr::install_block() ``` -```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE} -options(width=120) -``` - ## Usage -```{r message=FALSE, warning=FALSE, error=FALSE} +```{r vers, message=FALSE, warning=FALSE, error=FALSE} library(wand) library(tidyverse) @@ -52,7 +55,7 @@ library(tidyverse) packageVersion("wand") ``` -```{r} +```{r ex1} list.files(system.file("extdat", package="wand"), full.names=TRUE) %>% map_df(~{ tibble( @@ -63,13 +66,12 @@ list.files(system.file("extdat", package="wand"), full.names=TRUE) %>% unnest() ``` -## Package Code Metrics +## cloc Metrics -```{r} +```{r cloc, echo=FALSE} cloc::cloc_pkg_md() ``` ## Code of Conduct -Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms. - +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. \ No newline at end of file diff --git a/README.md b/README.md index d37ecdd..57ce14d 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,22 @@ -[![Project Status: Active - The project has reached a stable, usable +[![Project Status: Active – The project has reached a stable, usable state and is being actively -developed.](https://www.repostatus.org/badges/0.1.0/active.svg)](https://www.repostatus.org/#active) -[![Travis-CIBuild -Status](https://travis-ci.org/hrbrmstr/simplemagic.svg?branch=master)](https://travis-ci.org/hrbrmstr/simplemagic) -[![AppVeyor Build -Status](https://ci.appveyor.com/api/projects/status/github/hrbrmstr/simplemagic?branch=master&svg=true)](https://ci.appveyor.com/project/hrbrmstr/simplemagic) +developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) +[![Signed +by](https://img.shields.io/badge/Keybase-Verified-brightgreen.svg)](https://keybase.io/hrbrmstr) +![Signed commit +%](https://img.shields.io/badge/Signed_Commits-20.9%25-lightgrey.svg) +[![Linux build +Status](https://travis-ci.org/hrbrmstr/wand.svg?branch=master)](https://travis-ci.org/hrbrmstr/wand) [![Coverage -Status](https://img.shields.io/codecov/c/github/hrbrmstr/simplemagic/master.svg)](https://codecov.io/github/hrbrmstr/simplemagic?branch=master) +Status](https://codecov.io/gh/hrbrmstr/wand/branch/master/graph/badge.svg)](https://codecov.io/gh/hrbrmstr/wand) +[![cran +checks](https://cranchecks.info/badges/worst/wand)](https://cranchecks.info/pkgs/wand) +[![CRAN +status](https://www.r-pkg.org/badges/version/wand)](https://www.r-pkg.org/pkg/wand) +![Minimal R +Version](https://img.shields.io/badge/R%3E%3D-3.2.0-blue.svg) +![License](https://img.shields.io/badge/License-MIT-blue.svg) # wand @@ -44,17 +53,20 @@ The following functions are implemented: ``` r install.packages("wand", repos = "https://cinc.rud.is") # or -devtools::install_git("https://git.rud.is/hrbrmstr/wand.git") +remotes::install_git("https://git.rud.is/hrbrmstr/wand.git") # or -devtools::install_git("https://git.sr.ht/~hrbrmstr/wand") +remotes::install_git("https://git.sr.ht/~hrbrmstr/wand") # or -devtools::install_gitlab("hrbrmstr/wand") +remotes::install_gitlab("hrbrmstr/wand") # or -devtools::install_bitbucket("hrbrmstr/wand") +remotes::install_bitbucket("hrbrmstr/wand") # or -devtools::install_github("hrbrmstr/wand") +remotes::install_github("hrbrmstr/wand") ``` +NOTE: To use the ‘remotes’ install options you will need to have the +[{remotes} package](https://github.com/r-lib/remotes) installed. + ## Usage ``` r @@ -63,10 +75,9 @@ library(tidyverse) # current verison packageVersion("wand") +## [1] '0.5.0' ``` - ## [1] '0.5.0' - ``` r list.files(system.file("extdat", package="wand"), full.names=TRUE) %>% map_df(~{ @@ -163,20 +174,16 @@ list.files(system.file("extdat", package="wand"), full.names=TRUE) %>% -## Package Code Metrics - -``` r -cloc::cloc_pkg_md() -``` +## cloc Metrics -| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | -| :--- | -------: | ---: | --: | ---: | ----------: | --: | -------: | ---: | -| R | 7 | 0.78 | 949 | 0.91 | 52 | 0.7 | 62 | 0.62 | -| JSON | 1 | 0.11 | 80 | 0.08 | 0 | 0.0 | 0 | 0.00 | -| Rmd | 1 | 0.11 | 15 | 0.01 | 22 | 0.3 | 38 | 0.38 | +| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | +| :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: | +| R | 7 | 0.78 | 949 | 0.90 | 52 | 0.71 | 62 | 0.64 | +| JSON | 1 | 0.11 | 80 | 0.08 | 0 | 0.00 | 0 | 0.00 | +| Rmd | 1 | 0.11 | 23 | 0.02 | 21 | 0.29 | 35 | 0.36 | ## Code of Conduct -Please note that this project is released with a [Contributor Code of -Conduct](CONDUCT.md). By participating in this project you agree to -abide by its terms. +Please note that this project is released with a Contributor Code of +Conduct. By participating in this project you agree to abide by its +terms. diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..c6c1438 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,45 @@ +# DO NOT CHANGE the "init" and "install" sections below + +# Download script file from GitHub +init: + ps: | + $ErrorActionPreference = "Stop" + Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" + Import-Module '..\appveyor-tool.ps1' + +install: + ps: Bootstrap + +cache: + - C:\RLibrary + +# Adapt as necessary starting from here + +build_script: + - travis-tool.sh install_deps + +test_script: + - travis-tool.sh run_tests + +on_failure: + - 7z a failure.zip *.Rcheck\* + - appveyor PushArtifact failure.zip + +artifacts: + - path: '*.Rcheck\**\*.log' + name: Logs + + - path: '*.Rcheck\**\*.out' + name: Logs + + - path: '*.Rcheck\**\*.fail' + name: Logs + + - path: '*.Rcheck\**\*.Rout' + name: Logs + + - path: '\*_*.tar.gz' + name: Bits + + - path: '\*_*.zip' + name: Bits