Calculate cell cycle parameters from continuous labeling assays.
Use one virtual environment of your choice. Exemplary installation using venv
or pipenv
is described below.
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
Install requirements:
$ pipenv install --ignore-pipfile
Test run of fit code
$ python3 fit.py -i brdu/fit/test.csv -o 123
Install Django web framework
$ pip install django django-rest-framework
To use older python 3.4 change the version string in the Pipfile and initialize pipenv with
$ . envs && pipenv --python /usr/bin/python3.4 shell
If you are going to start the server for the first time or if the Django models have changed, you need to generate the database file first.
$ cd brdu
$ python manage.py makemigrations fit
$ python manage.py migrate --run-syncdb
Furthermore all static files need to be copied to STATIC_ROOT
.
$ python manage.py collectstatic
$ source venv/bin/activate
Load environment with
$ . envs && pipenv shell
Please make sure, that you have installed the dependencies and the database as well as collected the static files.
Run the server:
$ cd brdu
$ python manage.py runserver
The Cell Cycle Analyzer can be found under: http://127.0.0.1:8000/
Set DEBUG = False
in settings.py
to disable the display of detailed traceback information, which could pose a security risk.
ALLOWED_HOSTS
must be set in settings.py
according to your server. Otherwise this will result in all requests being returned as Bad Request (400).
Change the SECRET_KEY
in settings.py
to a unique, unpredictable value. Do not carry the key from development (for instance from this GitHub repository) over to the deployment server!
Django creates an unique key automatically when a new project is started.
$ django-admin startproject myproject
So you can also use this as a generator for your server key.
Expired sessions should be purged regularly (for example as a daily cron job) with:
$ python manage.py clearsessions