Giter Site home page Giter Site logo

fast_grow_server's Introduction

FastGrow Server

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.

Setup

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 fastgrow

At 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 migrate

Ensure 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 test

Celery 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 fair

To start the server run:

python manage.py runserver

...which should start the server at http://localhost:8000/

Code Quality

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.settings

Run test coverage

coverage run --source=fast_grow manage.py test
coverage report

fast_grow_server's People

Contributors

patpenner avatar patrickpenner avatar

Watchers

 avatar

Forkers

rareylab

fast_grow_server's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.