• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    Ruby
  • License
    Apache License 2.0
  • Created over 10 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Zooniverse API to support user defined volunteer research projects

Panoptes Build Status

The new Zooniverse API for supporting user-created projects.

Documentation

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

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. If you're running MRI Ruby you'll need to have the Postgresql client libraries installed as well as have Postgresql version 11 running.

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

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.

Setup Docker and Docker Compose

Usage

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

  2. Install Docker from the appropriate link above.

  3. cd into the cloned folder.

  4. Run docker-compose build to build the containers Panoptes API container. You will need to re-run this command on any changes to Dockerfile.dev

  5. Install the gem dependencies for the application

    • Run: docker-compose run --rm panoptes bundle install
  6. Setup the configuration files via a rake task

    • Run: docker-compose run --rm panoptes bundle exec rake configure:local
  7. Create and run the application containers with docker-compose up

  8. If the above step reports a missing database error, kill the docker-compose process or open a new terminal window in the current directory and then run docker-compose run --rm panoptes bundle exec rake db:setup to setup the database. This command will launch a new Docker container, run the rake DB setup task, and then clean up the container.

  9. To seed the development database with an Admin user and a Doorkeeper client application for API access run docker-compose run --rm panoptes bundle exec rails runner db/dev_seed_data/dev_seed_data.rb

  10. Open up the application in your browser at http://localhost:3000

Once all the above steps complete you will have a working copy of the checked out code base. Keep your code up to date and rebuild the image on any code or configuration changes.

Testing

There are multiple options for setting up a testing environment:

  1. Run it entirely from within docker-compose:

    1. Run docker-compose build to build the panoptes container.
    2. Install the gem dependencies for the application
      • Run: docker-compose run --rm panoptes bundle install
    3. Create config files if you don't already have them, run docker-compose run --rm -e RAILS_ENV=test panoptes bundle exec rake configure:local
    4. To create the testing database, run docker-compose run --rm -e RAILS_ENV=test panoptes bundle exec rake db:setup
    5. Run the full spec suite docker-compose run -T --rm -e RAILS_ENV=test panoptes bundle exec rspec noting that running all tests is slow.
      • Use rspec focus keyword in your specs or specify the spec you want to run, e.g. docker-compose run -T --rm -e RAILS_ENV=test panoptes rspec path/to/spec/file.rb
  2. Use docker to run a testing environment bash shell and run test commands .

    1. Run docker-compose run --service-ports --rm -e RAILS_ENV=test panoptes bash to start the containers
    2. Run bundle exec rspec to run the full test suite
  3. Use parts of docker-compose manually and wire them up manually to create a testing environment.

    1. Run docker-compose run -d --name postgres --service-ports postgres to start the postgres container
    2. Run docker-compose run -T --rm -e RAILS_ENV=test panoptes bundle exec rspec to run the full test suite
  4. Assuming you have the correct Ruby environment already setup:

    1. Run bundle install
    2. Start the docker Postgres container by running docker-compose run -d --name postgres --service-ports postgres or run your own
    3. Create config files if you don't already have them, run bundle exec rake configure:local
    4. Create doorkeeper keys, run bundle exec rake configure:doorkeeper_keys
    5. Modify your config/database.yml test env to point to the running Postgres server, e.g. host: localhost
    6. Setup the testing database if you haven't already, by running RAILS_ENV=test rake db:setup
    7. Finally, run rspec with RAILS_ENV=test rspec

Rails 5

Using the gem https://github.com/clio/ten_years_rails to help with the upgrade path https://www.youtube.com/watch?v=6aCfc0DkSFo

Using docker-compose for env setup

docker-compose -f docker-compose-rails-next.yml build

docker-compose -f docker-compose-rails-next.yml run --service-ports --rm panoptes bash

Install the gems via next

BUNDLE_GEMFILE=Gemfile.next bundle install

or

next bundle install

check for incompatible gems for target rails verion

BUNDLE_GEMFILE=Gemfile.next bundle exec bundle_report compatibility --rails-version=5.0.7

or

next bundle exec bundle_report compatibility --rails-version=5.0.7

check for outdated gems

BUNDLE_GEMFILE=Gemfile.next bundle exec bundle_report outdated

or

next bundle exec bundle_report outdated

Run the specs

It's recommeded to enable spring for testing env unset DISABLE_SPRING run all specs for rails 5 gemfile BUNDLE_GEMFILE=Gemfile.next bundle exec rspec

or

next bundle exec rspec

or fail fast BUNDLE_GEMFILE=Gemfile.next bundle exec rspec --fail-fast

or

next bundle exec rspec --fail-fast

or with gaurd (recommended to enable spring) BUNDLE_GEMFILE=Gemfile.next bundle exec guard --no-interactions

or

next bundle exec guard --no-interactions

Boot the rails app

Via Rails server

BUNDLE_GEMFILE=Gemfile.next rails s

or

next rails s

Via Puma

BUNDLE_GEMFILE=Gemfile.next bundle exec puma -C config/puma.rb

or

next bundle exec puma -C config/puma.rb

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 via github actions.

License

Copyright by the Zooniverse

Distributed under the Apache Public License v2. See LICENSE

More Repositories

1

front-end-monorepo

A rebuild of the front-end for zooniverse.org
JavaScript
104
star
2

scribeAPI

scribe API
CoffeeScript
79
star
3

Panoptes-Front-End

Front end for zooniverse/Panoptes
JavaScript
64
star
4

Data-digging

Scripts and such for data management, analysis, visualization, etc.
Python
52
star
5

Galaxy-Zoo

CoffeeScript
30
star
6

panoptes-python-client

Python
30
star
7

Zooniverse

JavaScript
27
star
8

help

Documentation for building Zooniverse projects.
Dockerfile
26
star
9

docker-status

A Docker app that checks the HTTP status of linked containers
Python
21
star
10

mobile

React native Zooniverse mobile app
JavaScript
20
star
11

panoptes-cli

A command-line interface for Panoptes
Python
18
star
12

Talk

DEPRECATED. See Talk-Api.
JavaScript
14
star
13

caesar

Backend automation and orchestration
Ruby
13
star
14

Serengeti

Snapshot Serengeti frontend
JavaScript
13
star
15

Brand

Zooniverse visual assets
Rich Text Format
12
star
16

WhaleFM

Whale FM archive, data
12
star
17

AnnoTate

Full text transcription app for the Tate Britain
JavaScript
12
star
18

docker-rds-dump

A Docker app to dump RDS databases to disk, using the latest RDS snapshot rather than the live DB instance.
Python
11
star
19

json-api-client

CoffeeScript
10
star
20

aggregation

Python
10
star
21

aggregation-for-caesar

Python
9
star
22

shakespeares_world

Full text transcription project for the Folger Shakespeare Library
JavaScript
8
star
23

panoptes-javascript-client

A Javascript client for accessing the Panoptes API
JavaScript
6
star
24

talk-api

Ruby
6
star
25

docker-yandex-tank

5
star
26

notes-from-nature-landing

Notes from Nature Landing
JavaScript
5
star
27

api-example

[DEPRECATED] An example app using the zooniverse Api
CoffeeScript
5
star
28

zoo-react-starterify

A minimal React JS application starter kit for Zooniverse projects
JavaScript
5
star
29

hamlet

Produces subject set and classification exports suitable for AutoML
Python
5
star
30

data.galaxyzoo.org

HTML
5
star
31

LightCurves

A light curve viewer
CoffeeScript
5
star
32

gelfcat

A command-line utility to send files to Graylog
Go
5
star
33

Scribe-React

Scribe 3.0 front-end using React.js
JavaScript
4
star
34

panoptes-subject-uploader

**Unmaintained** Subject Uploader for Zooniverse
CoffeeScript
4
star
35

Bat-Detective

JavaScript
4
star
36

scribes-of-the-cairo-geniza

Custom front end for a 2018 transcription project, annotating Cairo Geniza fragments. Uses custom Hebrew and Arabic keyboards.
JavaScript
4
star
37

Ubret

CoffeeScript
4
star
38

Radio-Galaxy-Zoo

CoffeeScript
4
star
39

floatingforests

CoffeeScript
4
star
40

lita

Chat bot active in Zooniverse's Slack channels
Ruby
4
star
41

amazon-ses-mailer

A simple email client using NextJS and Amazon SES
JavaScript
4
star
42

iiif-annotations

A proof-of-concept, annotating a IIIF manifest with Zooniverse classification data.
JavaScript
4
star
43

penguinwatch

Deprecated - moved to www.zooniverse.org/projects/penguintom79/penguin-watch
CoffeeScript
3
star
44

zoo-grommet

SCSS
3
star
45

theia

Building the next-generation Floating Forests pipeline
Python
3
star
46

zoo-event-stats

Event stream and stats for the Zooniverse
Ruby
3
star
47

Snapshot-Chicago

CoffeeScript
3
star
48

Galaxy-Zoo-Authors

Epic list of volunteer names for GZ
HTML
3
star
49

planktonportal

JavaScript
3
star
50

Cyclone-Center

CoffeeScript
3
star
51

alice

A front end tool allowing reviewing and editing of Zooniverse transcription data.
JavaScript
3
star
52

Leaves

CoffeeScript
3
star
53

chimpandsee

CoffeeScript
3
star
54

interventions-gateway

Interventions API gateway that allows authorized users to publish intervention events via Sugar
Ruby
3
star
55

subject-assistant

A Machine Learning-assisted web app that helps wildlife researchers process Zooniverse Subjects before they're viewed by human volunteers. Also includes a Proxy Server that allows the front end app to bypass CORS issues and maintain secrets.
JavaScript
3
star
56

drag-reorderable

JavaScript
3
star
57

Planet-Hunters-2

CoffeeScript
3
star
58

kSWAP

General implementation of SWAP for Zooniverse projects. This implementation extends SWAP (for binary tasks) to k-classes.
Python
2
star
59

geneRunnerProto

Prototype of gene runner
JavaScript
2
star
60

anti-slavery-manuscripts

Custom front end for a 2017 transcription project, annotating documents from the American abolitionist movement.
JavaScript
2
star
61

designator

Smart task assignment system
Elixir
2
star
62

nfn-faas

Functions as a Service for Notes from Nature
Python
2
star
63

Milky-Way-Project

CoffeeScript
2
star
64

Cellect

Ruby
2
star
65

zootools-sheets

HTML
2
star
66

notes-from-nature-field-book

Notes from Nature Field Book
JavaScript
2
star
67

panoptes-client.rb

Ruby client to interact with the Zooniverse API (Panoptes)
Ruby
2
star
68

zoo-event

Clojure
2
star
69

seafloorexplorer

The front end for Seafloor Explorer
JavaScript
2
star
70

zoo-classification-tally

Outreach event counter for Zooniverse projects
JavaScript
2
star
71

classroom-maps-api

Mapping API for the https://classroom.zooniverse.org service. Built using https://datasette.io/ to provide a JSON API over SQLite databases with custom project CSV data.
Python
2
star
72

zoo-reduxify

A minimal Redux application starter kit, based on Zooniverse React Starterify.
JavaScript
2
star
73

planet-four

Identify and measure features on the surface of Mars
CoffeeScript
2
star
74

pandora

Non static translations on the www.zooniverse.org domain
JavaScript
2
star
75

haw

A front-end-only app builder
CoffeeScript
2
star
76

experiment-server

Implementation of planout for zooniverse for A/B splits and logging.
Ruby
2
star
77

Docs

Public documentation for Zooniverse volunteers and community moderators
2
star
78

markdownz

Markdown viewer and editor for the zooniverse
JavaScript
2
star
79

bajor

Azure Batch Job Runner - BaJoR
Python
2
star
80

planetary-response-network

Create Zooniverse subjects via Planet Labs API using area of interest (AOI) queries.
JavaScript
2
star
81

hco-experiments

Python
2
star
82

planetary-response-network-front-end

JavaScript
2
star
83

sciencegossip

Biodiversity Heritage Library project for Constructing Scientific Communities
CoffeeScript
2
star
84

Moon-Zoo-Reduction

Code for processing the Moon Zoo data from raw DB to a final crater/feature catalogue
Python
2
star
85

tove

Transcription Object Viewer/Editor: Backend API for ALICE Text Editor tool
Ruby
2
star
86

serengeti-analysis-scripts

Various PyMongo and other scripts for analysing Serengeti DB
OpenEdge ABL
2
star
87

wildcam-gorongosa

CoffeeScript
2
star
88

The-Juggernaut

Ruby
2
star
89

Ember-App

A sample ember app
CSS
1
star
90

test-shape-closeness

Check how much two sets of shapes overlap
JavaScript
1
star
91

eras

Enhanced Running Average Stats Service
Ruby
1
star
92

imageprocessing

Nginx image processing server with OpenResty and Lua
Lua
1
star
93

Tate-Transcriptions

Python
1
star
94

tprn-data-processing

The Planetary Response Network data processing pipeline
Python
1
star
95

education-api

Backend for Zooniverse Classrooms
Ruby
1
star
96

docker-ruby

Minimal Docker Containers for different rubies
Ruby
1
star
97

image-proc

Image crop server for Zooniverse static
JavaScript
1
star
98

csv-geocoder

Geocodes IP addresses in a CSV file
Python
1
star
99

condorwatch

CoffeeScript
1
star
100

panoptes-net-client

A .NET client for accessing the Panoptes API
C#
1
star