This is the eLife Dashboard application and API.
This document covers the setup of the dashboard application and API. Click here for frontend documentation which includes instructions for a setup with no external dependencies.
The instructions below are for Mac OS and may need to be adapted for other platforms
- Create virtual environment, you will only need to do this once. In the project folder run:
virtualenv venv
- Activate the virtual environment
source venv/bin/activate
- Install dependencies (This will only succeed if postgres binaries are installed)
pip install -r requirements.txt
- run application
python runserver.py
The dashboard unit tests depend on database access. The settings used in the tests will be in settings_test.py
.
To check which files will be considered tests, take a look at the pytest.ini
configuration file.
cd /srv/elife-dashboard
./project_tests.sh
- Create a new Run/Debug Configuration
- Add a new Python test > Unittests configuration
- In the section
- Unittests:
- Test: Script
- Script: the path select the path .../tests/test_file_you want_to_test.py
- Test: Script
- Environment:
- Project: elife-dashboard
- Environment variables: CONFIG_FILE=test
- Python interpreter: (the virtualenv at your dashboard project)
- Working directory: [your path to]/elife-dashboard
- Add content roots to PYTHONPATH (checked)
- Add source roots to PYTHONPATH (checked)
Create environment
virtualenv venv
Activate environment
source venv/bin/activate
Deactivate environment
deactivate
MIT Licensed. See LICENSE