Giter Site home page Giter Site logo

sckott / cchecksapi Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 1.0 179 KB

CRAN checks API (DEFUNCT)

Home Page: https://github.com/r-hub/cchecksbadges

License: MIT License

Ruby 96.55% Dockerfile 1.57% Shell 1.88%
cran cran-checks docker r rstats sinatra

cchecksapi's Introduction

cchecksapi's People

Contributors

maelle avatar sckott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

yonicd

cchecksapi's Issues

check_url is not being collected for some pkgs

curl https://cranchecks.info/pkgs/urltools | jq '.data.checks[].check_url'
"https://www.R-project.org/nosvn/R.check/r-release-osx-x86_64/urltools-00check.html"
"https://www.R-project.org/nosvn/R.check/r-oldrel-osx-x86_64/urltools-00check.html"
null
null
null
null
null
null
null
null
null
null

routes for notifications

brainstorming.

/notifications would be landing page and user interface page for managing notifications

probably all below would be auth protected

  • GET /notifications/rules
  • POST /notifications/rules w/ body for a new rule
  • GET/DELETE/PUT /notifications/rules/{rule id}

  • POST /notifications/rules
[
  {"package": "foobar", "status": "error", "time": 3, "platforms": 2},
  {"package": "helloworld", "status": "warn", "platforms": "osx"},
  {"package": "bloop", "regex": "install failure"}
]

run rake tasks (updates) in a different container?

right now rake tasks are run inside the api container. guessing this is causing problems - possibly run rake tasks in a linked container thats somehow cleaned up memory/cpu wise after tasks are done

history: collect all history ?

In addition to new history routes, maybe push all history data to disk and provide a dump? so when history data is 30 days old purge from mongo and compress onto disk - so a file for each date, like

  • cran-checks-2018-10-01.json
  • cran-checks-2018-10-02.json
  • cran-checks-2018-10-03.json
  • and so on

then a route for requesting these files

/pkghistory/:date: - e.g., /pkghistory/2018-10-01

email frequency?

probably only send the same email about the same rule once per week? or once every 3 days or so?

Consider Redis caching for some routes

in particular for

    "/pkgs (GET)",
    "/pkgs/:pkg_name:/history (GET)",
    "/pkghistory (GET)",
    "/maintainers (GET)",
    "/maintainers/:email: (GET)",

as these can have large payloads, and could be cached to minimize response time

Ideally: check if the cache should be deleted if there's been a recent cron job run resulting in new data for whatever the query is.

Notifications

Want to allow people to opt in to notifications of various kinds to find out when theres notes/warnings/errors on their pkgs on cran checks.

Options:

  • email
  • twitter?
  • slack?
  • any others?

Probably should set up super minimal website for it. Pick which type of notification, which pkgs, on what type (warn/note/error).

`/history` route

looking into it. work on history branch.

URLs won't be useful as they'll just point to the latest checks, so need to scrape the checks text for each URL

Scraping maintainers frozen at 3 April 2019?

Hello,

I've noticed something a bit odd, it seems that maintainer scraping has been frozen at 2019-04-03.

$ curl https://cranchecks.info/maintainers/maelle.salmon_at_yahoo.se | jq '.data.date_updated'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1779  100  1779    0     0   2691      0 --:--:-- --:--:-- --:--:--  2691
"2019-04-03T12:01:43.725Z"

$ curl https://cranchecks.info/maintainers/zkamvar_at_gmail.com | jq '.data.date_updated'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1242  100  1242    0     0   1040      0  0:00:01  0:00:01 --:--:--  1040
"2019-04-03T12:01:43.744Z"

$ curl https://cranchecks.info/maintainers/hadley_at_rstudio.com | jq '.data.date_updated'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9913  100  9913    0     0  13981      0 --:--:-- --:--:-- --:--:-- 13981
"2019-04-03T12:01:43.806Z"

$ curl https://cranchecks.info/maintainers/edd_at_debian.org | jq '.data.date_updated'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14573  100 14573    0     0  14301      0  0:00:01  0:00:01 --:--:-- 14301
"2019-04-03T12:01:43.793Z"

Is there something I'm doing wrong on my side?

emails should have html and plain text versions

see emails from r-hub as well as from travis-ci for how that's done. travis e.g.,

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
# vs. 
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

in sendgrid-ruby gem, it looks like we can do something like

x = Content.new(type: 'text/html', value: '<html>some string</html>')
x = SendGrid::Content.new(type: 'text/plain', value: "another string")

how best to include output if error/warn

Would be nice to give users of the API some of the actual output if there are check failures/warnings. However, not sure how to include e.g, this

screen shot 2017-10-13 at 9 30 24 am

in JSON ๐Ÿค”

memory limit

the api container seems to take up a lot of memory, perhaps set limit to lower than what it is. it's at 1.95 GB memory right now, maybe lower to 1.2 or so

move all history data into sql DB?

Maybe it will help with memory issues - and can easily fit the data into tabular structure:

pkg summary checks check_details date_updated
webmockr summary_json checks_json check_details_json 2018-11-16 21:04:00 UTC

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.