subelsky / coyote

Image annotation site and API to enable the distributed annotation of museum images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coyote

Travis CI Code Climate Test Coverage

An open source image annotation app and API to enable the distributed annotation of museum images. Coyote is built on RubyOnRails with MySQL (via MariaDB).

Quick Server Setup

  1. Determine the values for .env.example and .env.production.example.
  2. Point a domain towards the server coyote, e.g. coyote.warhol.org.
  3. Run this one liner as the root user on a 16.04 Ubuntu server to install and start coyote:
wget -qO- https://raw.githubusercontent.com/coyote-team/coyote/master/bin/install.sh | bash

Developer Setup

# installs gems, walks you through setting .env variables, creates databases, and adds seed data
bin/setup

Secure credentials are kept untracked in .env and .env.[development, test, staging, production].

For more information on environment or setup, see bin/install.sh or the Vagrantfile.

Usage

# Run the server
bin/rails s

# Automatically run tests as you work
# You might need to install a shim for guard
guard

# Run the tests on their own
bin/rspec

# Run the console
bin/rails c

Test

Lint the model factories (more info):

bin/rake factory_girl:lint

Then, run the test suite:

# Once
bin/rspec

# Or dynamically via the guard daemon
bundle exec guard

# Leave that running while your server is running and
# then press enter or update a page and the test suite will run

Deploy

# This command will also copy your .env and .env.production to the server
bundle exec cap production deploy

Update website images

This uses each website's strategy (see below)

# Update images from past 2 minutes on local
bin/rake websites:update
# Update images from past 60 minutes on local
bin/rake websites:update[60]
# Update images from past 60 minutes on production
TASK="websites:update[60]" bundle exec cap production rake

Vagrant Setup

Some folks like to use an enclosed dev environment. Here's a virtual machine dev environment that can be run with the open source engine vagrant. This approach can reduce your dev setup time.

Install vagrant and run vagrant up Then, you can view the site like so:

vagrant up
ssh -N -L 3000:localhost:3000 vagrant@localhost -p 2222 
# Vagrant is the password
# In another terminal
open http://localhost:3000

API

API documentation is generated at /apipie and you can see MCA's version here.

Strategies

We can extend the functionality of Coyote to better integrate with your particular CMS with a strategy file. For an example, check out /lib/coyote/strategies/mca.rb

Components

Data model

Data model

For use on nomnoml

[<frame>Coyote data model|
  [User | id: int | first_name: string | last_name: string |  email: string | admin: bool ]
  [Image | id: int |url : string | canonical_id: string | priority: boolean | title: text | page_urls: text]
  [Tag | id: int | title: string]
  [Group | id: int | title: string]
  [Description | id: int | locale:str(en) | text: text | license:str(cc0-1.0)]
  [Website | id: int | url: string | title: string | strategy: string ]
  [Status | id: int | title: string | description: text]
  [Metum| id: int| title: string | instructions: text]

  [Assignment]->[Image]
  [Assignment]->[User]

  [Description]->[User]
  [Description]->[Metum]
  [Description]->[Status]

  [Image]->[Group]
  [Image]->[Website]
  [Image] +-> 0..* [Description]
  [Image] +-> 0..* [Tag]
]

Descriptions have an audit log that tracks changes across most columns.

Links

More info regarding accessibility:

Coyote Admin

Versus

Contributors

License

MPLv2

About

Image annotation site and API to enable the distributed annotation of museum images.

License:Other


Languages

Language:Ruby 53.2%Language:HTML 31.9%Language:CSS 10.0%Language:CoffeeScript 2.8%Language:Shell 1.7%Language:JavaScript 0.4%