{"id":14069247,"url":"https://github.com/sckott/cchecksapi","last_synced_at":"2025-07-30T05:31:52.453Z","repository":{"id":48473263,"uuid":"103764810","full_name":"sckott/cchecksapi","owner":"sckott","description":"CRAN checks API (DEFUNCT)","archived":true,"fork":false,"pushed_at":"2023-01-12T19:53:49.000Z","size":179,"stargazers_count":33,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-01T08:37:36.689Z","etag":null,"topics":["cran","cran-checks","docker","r","rstats","sinatra"],"latest_commit_sha":null,"homepage":"https://github.com/r-hub/cchecksbadges","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sckott.png","metadata":{"files":{"readme":"README-old.md","changelog":"history.rb","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-16T15:59:09.000Z","updated_at":"2024-02-12T15:38:05.000Z","dependencies_parsed_at":"2023-02-09T13:16:00.297Z","dependency_job_id":null,"html_url":"https://github.com/sckott/cchecksapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fcchecksapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fcchecksapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fcchecksapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fcchecksapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sckott","download_url":"https://codeload.github.com/sckott/cchecksapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228092190,"owners_count":17868150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cran","cran-checks","docker","r","rstats","sinatra"],"created_at":"2024-08-13T07:06:45.411Z","updated_at":"2024-12-04T10:31:07.937Z","avatar_url":"https://github.com/sckott.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"CRAN Check Results API\n======================\n\nBase URL: \u003chttps://cranchecks.info/\u003e\n\nAPI Docs: \u003chttps://docs.cranchecks.info/\u003e\n\nCheck out [cchecks][] for an R package interface to this API\n\ntech:\n\n* language: Ruby\n* rest framework: Sinatra\n* scraping http requests: faraday\n* databases: mongodb, mariadb\n* container: all wrapped up in docker (docker-compose)\n* uses Gábor's \u003chttps://crandb.r-pkg.org\u003e API to get names of CRAN packages\n* 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\n* A cron job:\n    * scrapes pkg specific data __every 3rd hour__ \n    * scrapes maintainer level data __every 4th hour__\n    * poplulates the history routes once a day\n\n## JSON API routes\n\n- `/docs`\n- `/heartbeat`\n- `/pkgs`\n- `/pkgs/:pkg_name:`\n- `/pkgs/:pkg_name:/history`\n- `/history/:date:`\n- `/maintainers`\n- `/maintainers/:email:`\n- `/badges/:type/:package:`\n- `/badges/flavor/:flavor/:package:`\n\n## JSON API examples\n\nTo replicate the examples below as is, you'll need curl (which you likely have), and jq (\u003chttps://stedolan.github.io/jq/\u003e) which you may not have. You can also just copy/paste the URLs into your browser 😏\n\nAll pkgs from a maintainer that have any checks not passing\n\n```sh\ncurl https://cranchecks.info/maintainers/csardi.gabor_at_gmail.com | jq '.data.table[] | select(.any) | .package'\n```\n\nSimilar but across all packages\n\n```sh\ncurl https://cranchecks.info/pkgs?limit=10 | jq '.data[] | select(.summary.any) | .package'\n```\n\nPackages that have error status checks\n\n```sh\ncurl https://cranchecks.info/pkgs?limit=1000 | jq '.data[] | select(.summary.error \u003e 0) | .package'\n```\n\n### workflow for checking your own packages\n\nCheck if you have any packages have one or more of a current status across operating systems and R versions, e.g., errors\n\n```sh\ncurl https://cranchecks.info/maintainers/csardi.gabor_at_gmail.com  | jq '.data.table[] | select(.error \u003e 0)'\n```\n\n```sh\n{\n  \"package\": \"rcmdcheck\",\n  \"any\": true,\n  \"ok\": 9,\n  \"note\": 0,\n  \"warn\": 0,\n  \"error\": 3\n}\n{\n  \"package\": \"secret\",\n  \"any\": true,\n  \"ok\": 11,\n  \"note\": 0,\n  \"warn\": 0,\n  \"error\": 1\n}\n```\n\nThen grab the check details for a specific package\n\n```sh\ncurl https://cranchecks.info/pkgs/secret  | jq .data.check_details\n```\n\n```sh\n{\n  \"version\": \"1.0.0\",\n  \"check\": \"examples\",\n  \"result\": \"ERROR\",\n  \"output\": \"Running examples in 'secret-Ex.R' ... cutoff\",\n  \"flavors\": [\n    \"r-devel-windows-ix86+x86_64\"\n  ],\n  \"additional_issues\": []\n}\n```\n\nOptionally see the check details for previous CRAN checks in the `/history` route (up to 30 days prior to the current date)\n\n```sh\ncurl https://cranchecks.info/pkgs/secret/history | jq '.data.history[].check_details'\n```\n\n```sh\n{\n  \"version\": \"1.0.0\",\n  \"check\": \"examples\",\n  \"result\": \"ERROR\",\n  \"output\": \"Running examples in 'secret-Ex.R' ... cutoff\",\n  \"flavors\": [\n    \"r-devel-windows-ix86+x86_64\"\n  ],\n  \"additional_issues\": []\n}\n{\n  \"version\": \"1.0.0\",\n  \"check\": \"examples\",\n  \"result\": \"ERROR\",\n  \"output\": \"Running examples in 'secret-Ex.R' ... cutoff\",\n  \"flavors\": [\n    \"r-devel-windows-ix86+x86_64\"\n  ],\n  \"additional_issues\": []\n}\n... cutoff\n```\n\n\n## Badges\n\n\u003e also check out badges from R-hub for CRAN versions, CRAN release dates, and CRAN downloads \u003chttps://docs.r-hub.io/#badges\u003e\n\nmarkdown egs to use in your README\n\nlinking 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)\n\n[![cran checks](https://cranchecks.info/badges/summary/reshape)](https://cran.r-project.org/web/checks/check_results_reshape.html) -\u003e `[![cran checks](https://cranchecks.info/badges/summary/reshape)](https://cran.r-project.org/web/checks/check_results_reshape.html)`\n\nOr maybe link to JSON response for this API\n\n[![cran checks](https://cranchecks.info/badges/summary/reshape)](https://cranchecks.info/pkgs/reshape) -\u003e `[![cran checks](https://cranchecks.info/badges/summary/reshape)](https://cranchecks.info/pkgs/reshape)`\n\npkgs using the badges:\n\n- [rgbif](https://github.com/ropensci/rgbif#rgbif)\n- [wellknown](https://github.com/ropensci/wellknown#wellknown)\n- [taxize](https://github.com/ropensci/taxize#taxize)\n\n### package status summaries\n\n- `/badges/summary/:package` all okay?, no notes, warnings, or errors\n    - if any notes, warnings, or errors = `Not OK` (color:red)\n    - if NO notes, warnings, or errors = `OK` (color:green)\n- `/badges/worst/:package` worst result:\n    - if any errors = `ERROR` (color:red)\n    - if any warnings, and no errors = `WARN` (color:yellow)\n    - if any notes, and no errors or warnings = `NOTE` (color:blue)\n    - if no errors, warnings, or notes = `OK` (color:green)\n\n__NOT SUPPORTED YET__\n\n- `/badges/noerrors/:package` no errors? but could have warnings or notes \n- `/badges/nowarns/:package` no warns? no errors, no warnings, but could have notes\n- `/badges/nonotes/:package` no notes? no errors, no warnings, and no notes\n\n### per flavor\n\n- `/badges/flavor/:flavor/:package` flavor + package, where flavors are any one of:\n\n    operating systems \n\n        - linux\n        - windows\n        - osx\n        - solaris\n\n    R versions\n\n        - devel\n        - oldrel\n        - patched\n        - release\n\nWith meanings:\n\n- if any notes, warnings, or errors = `Not OK` (color:red)\n- if NO notes, warnings, or errors = `OK` (color:green)\n\n### Query parameters\n\n- `ignore`: if `true`, ignore any `NOTE`'s and get a green `OK` badge. supported by `/badges/summary` and `/badges/flavor`\n\n### examples\n\nboth badges routes\n\n![](svgs/unknown.svg)\n\npackage summary route\n\n![](svgs/ok.svg)\n![](svgs/notok.svg)\n\nflavor route\n\n![](svgs/note.svg)\n![](svgs/warn.svg)\n![](svgs/error.svg)\n\n\n[cchecks]: https://github.com/ropensci/cchecks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsckott%2Fcchecksapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsckott%2Fcchecksapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsckott%2Fcchecksapi/lists"}