All Projects → sckott → cchecksapi

sckott / cchecksapi

Licence: MIT license
CRAN checks API

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to cchecksapi

kaminari-sinatra
Kaminari Sinatra adapter
Stars: ✭ 26 (-23.53%)
Mutual labels:  sinatra
rcppmsgpack
MsgPack Headers for R / msgpack.org[R]
Stars: ✭ 17 (-50%)
Mutual labels:  cran
priceR
Economics and Pricing in R
Stars: ✭ 32 (-5.88%)
Mutual labels:  cran
beginr
an R package for beginners
Stars: ✭ 15 (-55.88%)
Mutual labels:  cran
qwraps2
An updated version of qwraps with a focus on flexibility and general purpose. These functions are helpful for extracting and formatting results from R into .Rnw or .Rmd files. Additional functions for routine work such as extracting results from regression models or finding sensitivity and specificity.
Stars: ✭ 33 (-2.94%)
Mutual labels:  cran
vioplot
Development version of vioplot R package (CRAN maintainer)
Stars: ✭ 25 (-26.47%)
Mutual labels:  cran
react-sinatra
React on Sinatra Integration, Server Side Rendering
Stars: ✭ 43 (+26.47%)
Mutual labels:  sinatra
furniture
The furniture R package contains table1 for publication-ready simple and stratified descriptive statistics, tableC for publication-ready correlation matrixes, and other tables #rstats
Stars: ✭ 43 (+26.47%)
Mutual labels:  cran
edgarWebR
R package for interacting with the SEC's EDGAR filing search and retrieval system
Stars: ✭ 63 (+85.29%)
Mutual labels:  cran
sinator
Sinatra application generator
Stars: ✭ 19 (-44.12%)
Mutual labels:  sinatra
ruby-sinatra-starter-app
A starter project for Ruby On Sinatra web app projects to introduce programmers to Ruby programming.
Stars: ✭ 36 (+5.88%)
Mutual labels:  sinatra
em-shorty
Another URL shortener based on Event Machine and rack-fiber_pool
Stars: ✭ 56 (+64.71%)
Mutual labels:  sinatra
ansible-r
Ansible role to set up (the latest version of) R in Ubuntu systems
Stars: ✭ 41 (+20.59%)
Mutual labels:  cran
RcppXPtrUtils
XPtr Add-Ons for 'Rcpp'
Stars: ✭ 17 (-50%)
Mutual labels:  cran
cranlike
Manage files in a CRAN-like repository
Stars: ✭ 24 (-29.41%)
Mutual labels:  cran
sinatras-skeleton
Basic Sinatra Skeleton MVC CRUD App with Sprockets, Warden, ActiveRecord and PostgresQL
Stars: ✭ 13 (-61.76%)
Mutual labels:  sinatra
coordinator-bot
A tutorial that builds a simple bot for Facebook Messenger with Ruby and Sinatra
Stars: ✭ 16 (-52.94%)
Mutual labels:  sinatra
nflfastR
A Set of Functions to Efficiently Scrape NFL Play by Play Data
Stars: ✭ 268 (+688.24%)
Mutual labels:  cran
dataonderivatives
Easily source publicly available data on derivatives
Stars: ✭ 33 (-2.94%)
Mutual labels:  cran
data-packages
⛔ ARCHIVED ⛔
Stars: ✭ 23 (-32.35%)
Mutual labels:  cran

CRAN Check Results API

Base URL: https://cranchecks.info/

API Docs: https://docs.cranchecks.info/

Check out cchecks for an R package interface to this API

tech:

  • language: Ruby
  • rest framework: Sinatra
  • scraping http requests: faraday
  • databases: mongodb, mariadb
  • container: all wrapped up in docker (docker-compose)
  • uses Gábor's https://crandb.r-pkg.org API to get names of CRAN packages
  • for the history routes, we keep the last 30 days of checks for each package; each day we purge any checks data older than 30 days
  • A cron job:
    • scrapes pkg specific data every 3rd hour
    • scrapes maintainer level data every 4th hour
    • poplulates the history routes once a day

JSON API routes

  • /docs
  • /heartbeat
  • /pkgs
  • /pkgs/:pkg_name:
  • /pkgs/:pkg_name:/history
  • /history/:date:
  • /maintainers
  • /maintainers/:email:
  • /badges/:type/:package:
  • /badges/flavor/:flavor/:package:

JSON API examples

To replicate the examples below as is, you'll need curl (which you likely have), and jq (https://stedolan.github.io/jq/) which you may not have. You can also just copy/paste the URLs into your browser 😏

All pkgs from a maintainer that have any checks not passing

curl https://cranchecks.info/maintainers/csardi.gabor_at_gmail.com | jq '.data.table[] | select(.any) | .package'

Similar but across all packages

curl https://cranchecks.info/pkgs?limit=10 | jq '.data[] | select(.summary.any) | .package'

Packages that have error status checks

curl https://cranchecks.info/pkgs?limit=1000 | jq '.data[] | select(.summary.error > 0) | .package'

workflow for checking your own packages

Check if you have any packages have one or more of a current status across operating systems and R versions, e.g., errors

curl https://cranchecks.info/maintainers/csardi.gabor_at_gmail.com  | jq '.data.table[] | select(.error > 0)'
{
  "package": "rcmdcheck",
  "any": true,
  "ok": 9,
  "note": 0,
  "warn": 0,
  "error": 3
}
{
  "package": "secret",
  "any": true,
  "ok": 11,
  "note": 0,
  "warn": 0,
  "error": 1
}

Then grab the check details for a specific package

curl https://cranchecks.info/pkgs/secret  | jq .data.check_details
{
  "version": "1.0.0",
  "check": "examples",
  "result": "ERROR",
  "output": "Running examples in 'secret-Ex.R' ... cutoff",
  "flavors": [
    "r-devel-windows-ix86+x86_64"
  ],
  "additional_issues": []
}

Optionally see the check details for previous CRAN checks in the /history route (up to 30 days prior to the current date)

curl https://cranchecks.info/pkgs/secret/history | jq '.data.history[].check_details'
{
  "version": "1.0.0",
  "check": "examples",
  "result": "ERROR",
  "output": "Running examples in 'secret-Ex.R' ... cutoff",
  "flavors": [
    "r-devel-windows-ix86+x86_64"
  ],
  "additional_issues": []
}
{
  "version": "1.0.0",
  "check": "examples",
  "result": "ERROR",
  "output": "Running examples in 'secret-Ex.R' ... cutoff",
  "flavors": [
    "r-devel-windows-ix86+x86_64"
  ],
  "additional_issues": []
}
... cutoff

Badges

also check out badges from R-hub for CRAN versions, CRAN release dates, and CRAN downloads https://docs.r-hub.io/#badges

markdown egs to use in your README

linking to cran checks page (likely want to use cran.r-project.org url since cran check will complain about a different mirror's base url)

cran checks -> [![cran checks](https://cranchecks.info/badges/summary/reshape)](https://cran.r-project.org/web/checks/check_results_reshape.html)

Or maybe link to JSON response for this API

cran checks -> [![cran checks](https://cranchecks.info/badges/summary/reshape)](https://cranchecks.info/pkgs/reshape)

pkgs using the badges:

package status summaries

  • /badges/summary/:package all okay?, no notes, warnings, or errors
    • if any notes, warnings, or errors = Not OK (color:red)
    • if NO notes, warnings, or errors = OK (color:green)
  • /badges/worst/:package worst result:
    • if any errors = ERROR (color:red)
    • if any warnings, and no errors = WARN (color:yellow)
    • if any notes, and no errors or warnings = NOTE (color:blue)
    • if no errors, warnings, or notes = OK (color:green)

NOT SUPPORTED YET

  • /badges/noerrors/:package no errors? but could have warnings or notes
  • /badges/nowarns/:package no warns? no errors, no warnings, but could have notes
  • /badges/nonotes/:package no notes? no errors, no warnings, and no notes

per flavor

  • /badges/flavor/:flavor/:package flavor + package, where flavors are any one of:

    operating systems

      - linux
      - windows
      - osx
      - solaris
    

    R versions

      - devel
      - oldrel
      - patched
      - release
    

With meanings:

  • if any notes, warnings, or errors = Not OK (color:red)
  • if NO notes, warnings, or errors = OK (color:green)

Query parameters

  • ignore: if true, ignore any NOTE's and get a green OK badge. supported by /badges/summary and /badges/flavor

examples

both badges routes

package summary route

flavor route

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].