rmhogervorst / badgecreatr Goto Github PK
View Code? Open in Web Editor NEWQuickly place relevant badges at the top of your readme, stop copy pasting, start on your project
Home Page: http://rmhogervorst.nl/badgecreatr
Quickly place relevant badges at the top of your readme, stop copy pasting, start on your project
Home Page: http://rmhogervorst.nl/badgecreatr
-[] scenario 1: starting a package with minimal badges. (base version as is) only keep the one time stamps
When I re-run badgecreatr::badgeplacer()
, my README.rmd file gets an extra set of dividers added to the top of the file. It would be really neat if badgecreatr could not add anything to the file if all the badges are already present.
name of searches is not descriptive of what it does.
From: ropensci/unconf17#41
pasting badges per group
CI status: x, y, z
Versions: CRAN, GitHub
Stats: Coverage, Downloads
recognize that codecov is active in travis
automagically create link to codecov
licencepaste<- function(imagelink, referlink){
paste0("[![Licence]","(",imagelink, ")]","(",referlink,")")
}
so that licence can be replaced as well
give overview of project and how to help with links to github project.
explain:
new badges should have:
#' @family badges
simple fix for if github username and stuff cannot be read from git2r.
makes it easier to implement.
something like:
badgecreate(status = "active", travis = TRUE, codecov = TRUE, licence = "search", githubaccount = "search", githubrepo = "search")
where it says search, the function will search for the information. options:
==> devtools::check(cleanup = FALSE)
Updating badgecreatr documentation
Loading badgecreatr
Writing NAMESPACE
Writing badgecreatr.Rd
Writing travisbadge.Rd
Writing projectstatusbadge.Rd
Setting env vars ---------------------------------------------------------------
CFLAGS : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building badgecreatr -----------------------------------------------------------
"C:/PROGRA1/R/R-321.4RE/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD build
"D:\RmhDocs\Documents\docs\actief\Projecten\badgecreatr" --no-resave-data
--no-manual
Setting env vars ---------------------------------------------------------------
R_CHECK_CRAN_INCOMING : FALSE
R_CHECK_FORCE_SUGGESTS: FALSE
Checking badgecreatr -----------------------------------------------------------
"C:/PROGRA1/R/R-321.4RE/bin/x64/R" --no-site-file --no-environ --no-save
--no-restore --quiet CMD check
"C:\Users\roel\AppData\Local\Temp\Rtmpi6Bbiv/badgecreatr_0.0.0.9000.tar.gz"
--as-cran --timings --no-manual
using log directory 'D:/RmhDocs/Documents/docs/actief/Projecten/badgecreatr.Rcheck'
using R version 3.2.4 Revised (2016-03-16 r70336)
using platform: x86_64-w64-mingw32 (64-bit)
using session charset: ISO8859-1
using options '--no-manual --as-cran'
checking for file 'badgecreatr/DESCRIPTION' ... OK
this is package 'badgecreatr' version '0.0.0.9000'
package encoding: UTF-8
checking package namespace information ... OK
checking package dependencies ... OK
checking if this is a source package ... OK
checking if there is a namespace ... OK
checking for executable files ... OK
checking for hidden files and directories ... OK
checking for portable file names ... OK
checking whether package 'badgecreatr' can be installed ... OK
checking installed package size ... OK
checking package directory ... OK
checking DESCRIPTION meta-information ... OK
checking top-level files ... OK
checking for left-over files ... OK
checking index information ... OK
checking package subdirectories ... OK
checking R files for non-ASCII characters ... WARNING
Found the following file with non-ASCII characters:
searches.R
Portable packages must use only ASCII characters in their R code,
except perhaps in comments.
Use \uxxxx escapes for other characters.
checking R files for syntax errors ... OK
checking whether the package can be loaded ... OK
checking whether the package can be loaded with stated dependencies ... OK
checking whether the package can be unloaded cleanly ... OK
checking whether the namespace can be loaded with stated dependencies ... OK
checking whether the namespace can be unloaded cleanly ... OK
checking loading without being on the library search path ... OK
checking dependencies in R code ... OK
checking S3 generic/method consistency ... OK
checking replacement functions ... OK
checking foreign function calls ... OK
checking R code for possible problems ... OK
checking Rd files ... OK
checking Rd metadata ... OK
checking Rd line widths ... OK
checking Rd cross-references ... OK
checking for missing documentation entries ... OK
checking for code/documentation mismatches ... OK
checking Rd \usage sections ... OK
checking Rd contents ... OK
checking for unstated dependencies in examples ... OK
checking examples ... OK
checking for unstated dependencies in 'tests' ... OK
checking tests ...
Running 'testthat.R' ERROR
Running the tests in 'tests/testthat.R' failed.
Last 13 lines of output:
12: callGeneric(repo = lookup_repository(), flags = flags)
13: eval(call, parent.frame())
14: eval(expr, envir, enclos)
15: branches(repo = lookup_repository(), flags = flags)
16: lookup_repository()
17: stop("The working directory is not in a git repository")
testthat results ================================================================
OK: 10 SKIPPED: 0 FAILED: 1
Error: testthat unit tests failed
Execution halted
DONE
Status: 1 ERROR, 1 WARNING
Warning message:
running command '"C:/PROGRA1/R/R-321.4RE/bin/x64/R" CMD BATCH --vanilla "testthat.R" "testthat.Rout"' had status 1
See
'D:/RmhDocs/Documents/docs/actief/Projecten/badgecreatr.Rcheck/00check.log'
for details.
checking tests ... ERROR
Running the tests in 'tests/testthat.R' failed.
Last 13 lines of output:
12: callGeneric(repo = lookup_repository(), flags = flags)
13: eval(call, parent.frame())
14: eval(expr, envir, enclos)
15: branches(repo = lookup_repository(), flags = flags)
16: lookup_repository()
17: stop("The working directory is not in a git repository")
testthat results ================================================================
OK: 10 SKIPPED: 0 FAILED: 1
Error: travisbadge function creates output
Error: testthat unit tests failed
Execution halted
checking R files for non-ASCII characters ... WARNING
Found the following file with non-ASCII characters:
searches.R
Portable packages must use only ASCII characters in their R code,
except perhaps in comments.
Use \uxxxx escapes for other characters.
R CMD check results
1 error | 1 warning | 0 notes
Warning message:
cleanup
is deprecated
https://img.shields.io/badge/licence-GPL--3-red.svg
https://www.gnu.org/licenses/gpl-3.0.en.html link to licence itself
https://img.shields.io/badge/licence-GPL--2-red.svg
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
https://img.shields.io/github/license/mashape/apistatus.svg
http://choosealicense.com/licenses/mit/
https://img.shields.io/badge/licence-apache--2.0-cc6699.svg
http://choosealicense.com/licenses/apache-2.0/
http://choosealicense.com/licenses/cc-by-sa-4.0/
https://img.shields.io/badge/licence-CC--by--sa--4.0-brightgreen.svg
http://choosealicense.com/licenses/cc-by-4.0/
https://img.shields.io/badge/licence-CC--by--4.0-brightgreen.svg
http://choosealicense.com/licenses/cc0-1.0/
https://img.shields.io/badge/licence-CC0-brightgreen.svg
Hello,
I just installed your package and tested it with:
badgecreatr::badgeplacer(status = "wip", githubaccount = "privefl", githubrepo = "mypack")
.
Yes, I was not inspired with the name, I should change it in the near future.
I got the following error:
Error in stringr::str_match(grep("R \\(", description, value = TRUE), : subscript out of bounds
.
Note that I already have a README.Rmd with some badges in it (got them from devtools
):
README.zip
Thanks for this package anyway.
Florian
Add a badge for R version, if it is bioconductor available?
Perhaps link to old current dev? Needs to depend on something else, current version?
Or based on travis report?
depends: package - version
https://img.shields.io/badge/Last_change-2016--05--04-666633.svg
use some r code for that
see:
Found the following (possibly) invalid URLs:
URL: http://cran.r-project.org/package=badgecreatr
From: README.md
Status: 404
Message: Not Found
findbadges()
Error in stringr::str_match(grep("R \\(", description, value = TRUE), :
subscript out of bounds
Same error message for badgecreatr()
.
> findbadges()
$projectstatus_readme
[1] TRUE
$licencebadge_readme
[1] FALSE
$travisbadge_readme
[1] TRUE
$codecoverage_readme
[1] FALSE
$rversion_readme
[1] TRUE
$cranbadge_readme
[1] TRUE
$packageversionbadge_readme
[1] TRUE
$last_change_readme
[1] TRUE
$licence
[1] "MIT +"
$packagename
[1] "oddsratio"
$travisfile
[1] TRUE
$codecov_in_travisfile
[1] FALSE
Warning message:
In readLines(".travis.yml") : incomplete final line found on '.travis.yml'
I definitely have a .travis.yml file in my wd.
Calling the functions from the directory root of my R package.
Path: "~/someName/PackageName"
When I run the badgeplacer(...) function, this error appears:
Error in search_git(location) :
trying to get slot "name" from an object (class "git_branch") that is not an S4 object
findbages
githubcredentials()
licbadgebuilder()
return_remotes()
can test seperately and combine with chunk dependent badges
add thank you md file and badge
cran downloads http://cranlogs.r-pkg.org/badges/{summary}/{package}
cran version including date http://www.r-pkg.org/badges/version-last-release/{package}
https://cranlogs.r-pkg.org/
Or check minimal requirements in DESCRIPTION.
according to CRAN
The ‘Package’, ‘Version’, ‘License’, ‘Description’, ‘Title’, ‘Author’, and ‘Maintainer’ fields are mandatory, all other fields are optional. Fields ‘Author’ and ‘Maintainer’ can be auto-generated from ‘Authors@R’, and may be omitted if the latter is provided: however if they are not ASCII we recommend that they are provided.
depends does not need to have a version for R.
Perhaps use current version of R and give warning
results in:
pandoc.exe: Could not fetch https://img.shields.io/badge/R%3E=-3.3.1-6666ff.svg
TlsExceptionHostPort (HandshakeFailed (Error_Protocol ("expecting server hello, got alert : [(AlertLevel_Fatal,HandshakeFailure)]",True,HandshakeFailure))) "img.shields.io" 443
Error: pandoc document conversion failed with error 67
perhaps paste the functions in the rmarkdown document. That way the correct badge is placed when things change. Small change because the separate badge functions already paste the correct markdown.
Ideally:
badgeplacer::place_badges()
markdown for things that do not change: travis, github, cran. codecov
r for volatile things: rversion, package version badge , last change, projectstatus
Detection of licence and code cov badges does not appear to be working when badgeplace()
is run over the badgecreatr README
possibly out of .Renviron
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.