Server backend of the FastGrow web application. FastGrow is a fast fragment growing approach using a shape-based algorithm. A detailed explanation of the method can be found in the accompanying paper:
Patrick Penner, Virginie Martiny, Louis Bellmann, Florian Flachsenberg, Marcus Gastreich, Christophe Meyer and Matthias Rarey (submitted) FastGrow: On-the-Fly Growing and its Application to DYRK1A
A running instance of the web application can be found at https://grow.zbh.uni-hamburg.de/
Core FastGrow functionality will be available in BioSolveIT’s SeeSAR modeling package.
Get python dependencies with conda.
conda create --name fastgrow -c anaconda -c conda-forge python=3.9 django celery psycopg2 redis redis-py vine pylint pylint-django coverage selenium
conda activate fastgrowAt this point either set the environment variables $USER, $PASSWORD and
$DATABASE to the ones configured in the fast\_grow\_server/settings.py or replace them with appropriate values
below.
fast_grow_server requires a postgres database and a separate database user. You can create a user with appropriate permissions with this:
psql -d postgres -c "CREATE ROLE $USER WITH ENCRYPTED PASSWORD '$PASSWORD'; ALTER ROLE $USER WITH LOGIN CREATEDB;"To create the fast_grow_server database execute the following:
psql -d postgres -c "CREATE DATABASE $DATABASE;"Perform the fast_grow_server migrations with:
python manage.py migrateEnsure the bin directory exists and contains the following binaries:
- bin/Clipper
- bin/DatabaseBuilder
- bin/FastGrow
- bin/Preprocessor
The default configured backend and result system for celery is redis. Redis must be installed and available at the url
configured in the
fast\_grow\_server/settings.py.
To run the tests execute:
python manage.py testCelery workers can be run with:
celery -A fast_grow_server worker --loglevel=INFO -O fair...or in a more debug and IDE friendly way:
python /path/to/env/fastgrow/bin/celery -A fast_grow_server worker --loglevel=INFO -O fairTo start the server run:
python manage.py runserver...which should start the server at http://localhost:8000/
Contributions to the project must comply to the following quality criteria to keep the code maintainable for all developers:
| Criteria | Threshold |
|---|---|
| pylint | >9.0 |
| coverage (overall) | >90% |
| coverage (single file) | >80% |
Run pylint for static code quality check with
find fast_grow* -type f -name "*.py" | xargs pylint --load-plugins pylint_django --django-settings-module=fast_grow_server.settingsRun test coverage
coverage run --source=fast_grow manage.py test
coverage report