http://share-research.readthedocs.io/en/latest/index.html
It is useful to set up a virtual environment to ensure python3 is your designated version of python and make the python requirements specific to this project.
mkvirtualenv share -p `which python3.5`
workon share
Once in the share
virtual environment, install the necessary requirements.
pip install -r requirements.txt
docker-compose
assumes Docker is installed and running. Finally, ./up.sh
ensures everything has been installed properly.
docker-compose up -d rabbitmq postgres
./up.sh
---------------- or ----------------
pg
createuser share
psql
CREATE DATABASE share;
python manage.py makemigrations
python manage.py maketriggermigrations
python manage.py makeprovidermigrations
python manage.py migrate
python manage.py createsuperuser
Run the API server
python manage.py runserver
Run Celery
python manage.py celery worker -l DEBUG
This is particularly applicable to running ember-share, an interface for SHARE.
Harvest data from providers, for example
./manage.py harvest com.nature --async
./manage.py harvest io.osf --async
Pass data to elasticsearch with runbot
. Rerunning this command will get the most recently harvested data. This can take a minute or two to finish.
./manage.py runbot elasticsearch
cd docs/
pip install -r requirements.txt
make watch