Giter VIP home page Giter VIP logo

cathsm-server's Introduction

CATH-SM Server

Build Status codecov

This repository contains scripts and libraries for running the backend Django server required for the CATH-SM (CATH/SWISS-MODEL) protein sequence modelling pipeline.

Overview

This code provides a Django server that manages a protein structural modelling pipeline via asynchronous web jobs to CATH and SWISS-MODEL APIs.

Local computation is carried out by a Celery worker (with Redis used as the cache/message broker).

A public deployment can be found here:

https://api01.cathdb.info

Local Install

Overview:

  • Install dependencies
  • Setup Python environment
  • Start up Celery worker
  • Start up Django server

Install Dependencies

Redis is used as a cache/message broker:

# Ubuntu
sudo apt-get install redis

# CentOS / RedHat
sudo yum install redis

Run the service in the background.

sudo systemctl enable redis
sudo systemctl start redis

Note: PostgreSQL is used as the deployment database (which will also need to be installed and configured), however the development database uses the built-in SQLite.

Setup Python environment

Install virtual environment

python3 -m venv venv
. venv/bin/activate
pip install -e .

Run tests

python3 -m pytest

Update the local database

cd cathsm-server && source venv/bin/activate
python3 manage.py makemigrations
python3 manage.py migrate

Start Celery worker (to process jobs)

cd cathsm-server && source venv/bin/activate
CATHAPI_DEBUG=1 celery -A cathapi worker

Start server

cd cathsm-server && source venv/bin/activate
CATHAPI_DEBUG=1 python3 manage.py runserver

An instance of cathsm-server should now be available at:

http://127.0.0.1:8000/

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.