Database and web service for managing multiple biological classifications.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
apps
devstatic
doc
settings
taxonomy
template
.gitignore
.travis.yml
AUTHORS
LICENSE
Makefile
README.md
manage.py
requirements.txt

README.md

PlutoF Taxonomy Module

Build Status

Database and web service for managing multiple biological classifications.

Requirements

Setup

Clone

Clone the repository

git clone git@github.com:TU-NHM/plutof-taxonomy-module.git
cd plutof-taxonomy-module

Virtualenv

Create a virtualenv and activate it

virtualenv env
source env/bin/activate

Additional configuration (OS X)

Add paths to PostgreSQL installation and ElasticSearch folder into ~/.bash_profile. For example (your paths may differ):

PATH="$PATH:/Applications/Postgres.app/Contents/Versions/9.3/bin"
PATH="~/Documents/plutof/elasticsearch-1.1.0/bin:$PATH"
export PATH

Restart the terminal application for these changes to take effect. Activate the virtual environment as before.

Database

Create a new PostgreSQL database taxonomy with username taxonomy and password taxonomy

Install script

Run the install script

make install

Add application superuser

psql -U taxonomy
INSERT INTO auth_user (password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined) VALUES (md5('pass'), NOW(), true, 'admin', '', '', '', true, true, NOW());
\q

Load aouth2 client (for data import)

python manage.py loaddata apps/taxonomy/fixtures/oauth2_client.json

Import test tree

make test-tree

Tests

Run tests

make test

Server

Start Elasticsearch.

elasticsearch

Run the development server

make server

Creating search indexes (Haystack)

  1. For creating an index use ./manage.py rebuild_index

  2. For updating existing index use ./manage.py update_index