The new Zooniverse API for supporting user-created projects.
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.
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.
apt-get install libpq-devbrew install postgresqlOptionally, you can also run the following:
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.
Docker
Clone the repository git clone https://github.com/zooniverse/Panoptes.
cd into the cloned folder.
Copy the example configuration files.
find config/*.yml.hudson -exec bash -c 'for x; do x=${x#./}; cp -i "$x" "${x/.hudson/}"; done' _ {} +Install Docker from the appropriate link above.
docker-compose build to rebuild the containers.docker-compose upAfter step 5 finishes, open a new terminal and run docker-compose run --rm --entrypoint=rake panoptes db:setup to setup the database. This will launch a new Docker container, run the rake DB setup task, and then clean up the container.
To seed the development database with an Admin user and a Doorkeeper client application for API access run docker-compose run --rm --entrypoint=rails panoptes runner db/fig_dev_seed_data/fig_dev_seed_data.rb
Open up the application in your browser:
It should be running on http://localhost:3000
If it's not and you're on a Mac, run docker ps, and find the IP address where the panoptes_panoptes image is running. E.g.: 0.0.0.0:3000->3000/tcp means running on localhost at port 3000.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1f98164914be panoptes_panoptes "/bin/sh -c /rails_ap" 16 minutes ago Up 16 minutes 80/tcp, 0.0.0.0:3000->3000/tcp panoptes_panoptes_1 ```
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!
There are multiple options for setting up a testing environment:
Run it entirely from within docker-compose:
docker-compose run --rm -e RAILS_ENV=test --entrypoint=rake panoptes db:setup.docker-compose run -T --rm -e RAILS_ENV=test --entrypoint=rspec panoptes. Note: this will be slow. Use rspec focus set or specify the spec you want to run, e.g. ``docker-compose run -T --rm -e RAILS_ENV=test --entrypoint="rspec path/to/spec/file.rb" panoptes`Use parts of docker-compose manually and wire them up manually to create a testing environment.
docker-compose run -d --name postgres --service-ports postgres
docker-compose run -T --rm -e RAILS_ENV=test --entrypoint="bundle exec rspec" panoptes
Assuming you have a Ruby environment already setup:
bundle installdocker-compose run -d --name postgres --service-ports postgresconfig/database.yml test env to point to the running Postgres container, e.g. host: localhostRAILS_ENV=test rake db:setupRAILS_ENV=test rspecThanks a bunch for wanting to help Zooniverse. Here are few quick guidelines to start working on our project:
bundle exec rspec.Closes #issue or Fixes #issue somewhere in your message if it's addressing a specific open issue.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.
Copyright 2014-2016 by the Zooniverse
Distributed under the Apache Public License v2. See LICENSE
Content type
Image
Digest
sha256:7c24e7719…
Size
348.4 MB
Last updated
over 8 years ago
docker pull astopy/panoptes