/Panoptes

It sees everything

Primary LanguageRubyApache License 2.0Apache-2.0

Panoptes Build Status

The new Zooniverse API for supporting user-created projects.

Documentation

The Panoptes public API is documented here, using apiary.io.

If you're interested in how Panoptes is implemented check out the wiki and the Data Model Description.

Requirements

Since Panoptes uses Docker to manage its environment, the requirements listed below are also found in docker-compose.yml. The means by which a new Panoptes instance is created with Docker is located in the Dockerfile. If you plan on using Docker to manage Panoptes, skip ahead to Installation.

Panoptes is primarily developed against stable MRI, currently 2.3. If you're running MRI Ruby you'll need to have the Postgresql client libraries installed as well as have Postgresql version 9.4 running.

  • Ubuntu/Debian: apt-get install libpq-dev
  • OS X (with homebrew): brew install postgresql

Optionally, you can also run the following:

Installation

We only support running Panoptes via Docker and Docker Compose. If you'd like to run it outside a container, see the above Requirements sections to get started.

It's possible to run Panoptes only having to install the fig_rake gem. Alternatives to various rake tasks are presented.

Setup Docker and Docker Compose

Usage

  1. Clone the repository git clone https://github.com/zooniverse/Panoptes.

  2. cd into the cloned folder. Run either bundle install or gem install fig_rake. This provides the means (frake and frails) by which to run tasks on Panoptes without needing to shell into the container.

  3. Copy the example configuration files.

  • Run: find config/*.yml.hudson -exec bash -c 'for x; do x=${x#./}; cp -i "$x" "${x/.hudson/}"; done' _ {} +
  1. Install Docker from the appropriate link above.

    • If you have an existing Panoptes Docker container, or if your Gemfile or Ruby version has changed, run docker-compose build to rebuild the containers.
    • Otherwise, create and run the application containers by running docker-compose up
  2. After step 5 finishes, open a new terminal and run frake db:setup to setup the database

  3. To seed the development database with an Admin user and a Doorkeeper client application for API access run frails runner db/fig_dev_seed_data/fig_dev_seed_data.rb

  4. Open up the application in your browser:

  • If on a Mac, run docker-machine ip default to get the IP-address where the server is running.
  • Visit either that address or just localhost on port 3000.

This will get you a working copy of the checked out code base. Keep your code up to date and rebuild the image if needed!

Contributing

Thanks a bunch for wanting to help Zooniverse. Here are few quick guidelines to start working on our project:

  1. Fork the Project on Github.
  2. Clone the code and follow one of the above guides to setup a dev environment.
  3. Create a new git branch and make your changes.
  4. Make sure the tests still pass by running bundle exec rspec.
  5. Add tests if you introduced new functionality.
  6. Commit your changes. Try to make your commit message informative, but we're not sticklers about it. Do try to to add Closes #issue or Fixes #issue somewhere in your message if it's addressing a specific open issue.
  7. Submit a Pull Request
  8. Wait for feedback or a merge!

Your Pull Request will run on travis-ci, and we'll probably wait for it to pass on MRI Ruby 2.3. For more information, see the wiki.

License

Copyright 2014-2016 by the Zooniverse

Distributed under the Apache Public License v2. See LICENSE