Merge spreadsheets for the imaging studies
- Download the code from github
git clone git@github.com:LCBRU/image_study_merge.git- Install the requirements
Go to the image_study_merge directory and type the command:
sudo apt install sqlite3
sudo apt-get install libldap2-dev
sudo apt-get install libsasl2-dev
pip install -r requirements.txt- Create the database using
Staying in the image_study_merge directory and type the command:
./manage.py version_control
./manage.py upgrade- Run the application
Staying in the image_study_merge directory and type the command:
./app.py- Start Celery Worker
This application uses Celery to run background tasks.
To start Celery run the following command from the image_study_merge
directory:
celery -A celery_worker.celery worker -l 'INFO'
To test the application, run the following command from the project folder:
pytestTo create a migration run the command
./manage.py script "{Description of change}"You will then need to change the newly-created script created in the
migrations directory to make the necessary upgrade and downgrade
changes.
To initialise the database run the commands:
manage.py version_control
manage.py upgradeTo upgrade the database to the current version, run the command:
manage.py upgrade