Name: otindex
Owner: OpenTreeOfLife
Description: opentree index using postgres and pyramid
Created: 2015-10-29 21:13:24.0
Updated: 2017-03-10 22:27:19.0
Pushed: 2017-05-09 20:34:04.0
Size: 234
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A pyramid + postgres implementation of a treestore index for Open Tree of Life. Provides API access to the JSON files in the OpenTree phylesystem data store.
These instructions assume you are doing development setup on your local machine. For deploying otindex on a server, we have ansible playbook.
First copy the configuration template:
`$ cp development-example.ini development.ini`
Then adjust the new file for your local settings:
connection_info
section, add the database username, database namesqlalchemy.url
to match the settings in
connection_info
Install otindex and set up the database tables
You probably want to be using a virtualenv.
p install -r requirements.txt
thon setup.py develop
itialize_otindex_db development.ini
where initialize_otindex_db
is in the bin
directory of your virtualenv.
This last step creates the database tables defined in models.py
. It clears
any existing tables.
Load data into the database
The otindex/scripts
directory contains scripts for loading data into the
database. See the
README
file in that directory for detailed setup information.
Running the application
In the top-level directory, run:
$ pserve development.ini --reload
You should now be able to access the methods on http://0.0.0.0:6543
.
Running tests
See TESTING.md in this repo.
The top-level dev_scripts
directory contains scripts for testing out new
features. Some implement peyotl functions, while others allow database testing
from the CLI without deploying pyramid. No promises that anything in that
directory works property.