Coder Social home page Coder Social logo

uptake / cran-server Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 6.0 474 KB

Self-hosted R package repository

License: BSD 3-Clause "New" or "Revised" License

Python 75.58% JavaScript 7.84% CSS 3.63% HTML 5.55% Dockerfile 2.47% Shell 4.93%
r cran-r self-hosted python

cran-server's People

Contributors

adam-m-mcelhinney avatar bburns632 avatar jameslamb avatar ngparas avatar ntdef avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

cran-server's Issues

Add a /delete route

Consider adding a /delete route to the server. Currently the only way to remove packages is to manually edit the PACKAGES file and manually remove the artifact from s3/the file system.

Local FS Concurrency

The default configuration (local filesystem) used in the quickstart can have inconsistent behavior when installing packages from R.

Following the instructions in the quickstart, I uploaded httr version 1.3.1 to test installs. I can start an R session and run

> install.packages('httr', repos = c('http://localhost:8080'))

and it will either succeed or fail out after not finding the bin/macosx PACKAGES file seemingly randomly.

Add LICENSE

Need to add a LICENSE file to the root level.

Add support for binary packages

Right now this project only supports packages stored under /src/. To offer a full featured CRAN repo we need to support binary packages.

I don't have a Windows environment to test with but we should procure one.

Add a benefits section please.

It would go along way to add a benefits / why this is awesome section in the readme.

Some questions might be:

  • what value does this provide?
  • why not just use public cran?
  • In which situation is this cran setup better than the regular public cran push-pull?

A flashy example would add value too.

UI Instructions

Can you add a note in the README that makes it explicit that there's a UI bundled with this? Right now if I just read the README I'd think this just runs the CRAN service.

Can you add something like "navigate to <host>:8080 in your browser to see the UI..."

Remove Locking Logic from Server

Locking logic is currently implemented in server.py. We should consider pushing this logic into the storage instead of the server itself. For example, suppose we used something like sqlite or redis to handle the package metadata instead of writing to the PACKAGES file directly. We would prefer those handle locking over doing it ourselves, and it would allow multiple instances of the server container to run concurrently.

This issue addresses the TODO left in the code here:
https://github.com/UptakeOpenSource/cran-server/blob/master/cran-server/server.py#L102

CI Setup

This repo needs some kind of CI. I'm not sure the best way to test it, but we should at least set up a skeleton with Travis to test that the service can be run and basic functionality works.

Will make it easier to welcome new contributors to help out!

Add extension system for supporting other backends

The code is modular enough to support other backends, but to swap out a backend you would actually have to modify the codebase as-is. Ideally, you should be able to point to point to a Python class at startup and use that as the storage backend.

It's probably worthwhile to look into how Flask/Gunicorn does this when looking for the app object.

Better upload validation

server.py relies on the R CMD build tarball naming convention when receiving uploads and doesn't do much in the way of validation. We should at least check that uploads conform to this convention

Should have ECS instructions

I think it would be awesome to have a vignette describing how to use this on AWS's Elastic Container Service. Ideally this would cover:

  • How to connect the container to ECS
  • How to register a vanity URL to hit
  • How to post packages to and read packages from that service

Thoughts?

Monitoring

Consider recording metrics on package downloads

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.