Skip to content

Lindsay-Goulet/Programmation-Web

 
 

Repository files navigation

MIT licensed Version 1.0.1 Reproducibility

Genomicus

Contributors :

This repository contains :

  • The Genomicus source code
  • The Documentation
  • Step by step guides to run Genomicus on a local work environnement or as a Docker container
  • Visual representation of the database and how to generate it

Supervisors :

  • Bryan Brancotte
  • Olivier Lespinet

Steps to run Genomicus on a 'local' work environnement

Install the necessary python modules

  • We first have to start by installing the necessary python modules. Simply run the command :
pip install -r requirements.txt

To Fill Database with the .fa data

  • We have chosen to load the application with some prototype data, to create the database and fill it with the prototype data, run the command :
./create_DB.sh

To fill the database we have decided to use (json) fixtures which we create by parsing the .fa files, with a dedicated python script. This is not an optimal solution, but since this project consists of only a 'small' application and that we do not have a large amount of data, we felt that running these commands to create and destroy the database was a suitable option.

To run the application

  • To run the Genomicus application simply run the following command
./run.sh
  • To access the application, go to the following address : http://127.0.0.1:8000/

  • To access the different users :

Type email password
'lecteur' clemence.sebe@universite-paris-saclay.fr clemence
'annotateur' ambre.baumann@universite-paris-saclay.fr ambre
'validateur' lindsay.goulet@universite-paris-saclay.fr lindsay
'administrateur' george.marchment@universite-paris-saclay.fr george

To empty and delete the Database

Warning : When pushing any changes to the git make sure to destroy the DB

  • To destroy the database, simply run the command
./destroy_DB.sh

Steps to run Genomicus in a docker container

Warning : When using docker, you might have to use sudo

The Dockerfile and the create_site.sh script can be found in the folder elements_docker.

Pulling Docker image

  • We first have to start by pulling the corresponding Docker image, run the command :
docker pull marchment/genomicus:v3.0

Running the application

  • To guarantee the docker container is up to date with the current version of the genomicus project, we access the containers terminal. Simply run the following command :
docker run -it -p 8000:8000 --entrypoint bash  -t -i marchment/genomicus:v3.0
  • Now we need to create the database, fill it and run the application. Simply run the following command :
./create_site.sh

Note : To access the users, the same rule applies as above.


Visual representation of the Database

Here is a UML class diagram of the genomicus data base :

Steps to generate the diagram

  • The first step is to install graphviz if it is not installed already. Simply run the following command (for Debian or Debian-based Linux distributions) :
sudo apt install graphviz
  • Then we need to generate the diagram using the command manage.py graph_models, simply run the following commands :
python3 genomicus/manage.py graph_models -a --dot -o diagram.dot
dot -Tpng diagram.dot -o diagram.png

About

Projet (UE Programmation Web) du Master AMI2B (M2) 2022-2023

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 50.3%
  • HTML 42.7%
  • Shell 4.8%
  • CSS 1.2%
  • Batchfile 0.5%
  • Makefile 0.4%
  • Dockerfile 0.1%