A backend store for the Annotator
Clone or download
Pull request Compare This branch is 209 commits behind openannotation:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Annotator Store

This is a backend store for the Annotator.

Getting going

You'll need a recent version of Python (>=2.6) and ElasticSearch installed.

The quickest way to get going requires the pip and virtualenv tools (easy_install virtualenv will get them both). Run the following in the repository root:

pip -E pyenv install -e .
source pyenv/bin/activate
cp annotator.cfg.example annotator.cfg
python run.py

You should see something like:

* Running on
* Restarting with reloader...

If you wish to customize the configuration of the Annotator Store, make your changes to annotator.cfg or dive into run.py.

Store API

The Store API is designed to be compatible with the Annotator. The annotation store, a JSON-speaking REST API, will be mounted at /api by default. See the Annotator documentation for details.

Running tests

We use nosetests to run tests. You can just pip install nosetests mock and then:

$ nosetests
Ran 52 tests in 3.233s


Alternatively (and preferably), you should install Tox, and then run tox. This will run the tests against multiple versions of Python (if you have them installed).

Please open an issue if you find that the tests don't all pass on your machine, making sure to include the output of pip freeze.