Skip to content
forked from coyote-team/coyote

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

License

Notifications You must be signed in to change notification settings

llinneaa/coyote

Repository files navigation

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).

Developer Setup

bundle install

# Populate .env files
bin/conf_creator.sh .env # Copy this and the next one from other developers if working on an existing project
bin/conf_creator.sh .env.production
bin/conf_creator.sh .env.development
bin/conf_creator.sh .env.test

# Create the DBs for dev and test
bin/rake db:create db:migrate db:seed
RAILS_ENV=test bin/rake db:create db:migrate

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

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

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
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

Server Setup

Assuming you are logged into an Ubuntu 16.04 LTS as a root...

You will need to set the domain name to the new IP and then to prepare the following

  1. The production IP address, e.g. 173.255.234.50
  2. The new domain for coyote, e.g. coyote.warhol.org.
  3. The name of the hostinginstitution, e.g. The Warhol.
  4. The main website address, e.g. http://www.warhol.ora
  5. (Optional) A new Google Analytics UA identifier (for coyote UAs, click here).
  6. (Optional) The Rollbar access token from previous project in .env.production

Then you can run...

wget -qO- https://raw.githubusercontent.com/coyote-team/coyote/master/bin/install.sh | bash

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

Coyote Admin

Versus

Contributors

License

MPLv2

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 75.9%
  • Sass 9.4%
  • Slim 9.4%
  • JavaScript 3.5%
  • HTML 1.1%
  • Shell 0.5%
  • Dockerfile 0.2%