Skip to content

Latest commit

 

History

History
117 lines (74 loc) · 3.04 KB

README.md

File metadata and controls

117 lines (74 loc) · 3.04 KB

organilab

Tests Documentation PyPI - Python Version Coverage

Simple laboratory organizer with multiples features:

  • Laboratory builder and elegant presentation
  • Multi-laboratory management
  • Reservation system
  • Solution Calculator
  • Procedures management
  • Object limit notifications
  • Internationalization

Documentation

Documentation will be available in read the docs

Installation

Clone this repository

$ git clone [email protected]:solvo/organilab.git
$ cd organilab

Create a virtualenv

$ mkdir -p ~/entornos/
$ python -m venv ~/entornos/organilab
$ source ~/entornos/organilab/bin/activate

Note: If you are using a python 3.* or greater version you need to execute the following command instead.

$ python3 -m venv ~/entornos/organilab

Install requirements

$ pip install -r requirements.txt

Run in development

Check your database configuration and sync your models

$ make database_config

Could be required to call python manage.py loaddata initial_data.json

Create a superuser for admin views

$ python manage.py createsuperuser
$ python manage.py shell
$ from auth_and_perms.models import Profile
$ from django.contrib.auth.models import User
$ user = User.objects.get(username=#USERNAME#)
$ profile = Profile.objects.create(user=user)
$ ctrl + z

Run your development server

$ python manage.py runserver

Create translations

$ django-admin makemessages --all --no-location --no-obsolete

Create javascript translations

$ django-admin makemessages -d djangojs -l es  --ignore *.min.js

Compile translations

$ django-admin compilemessages --locale es

Run with composer in development environment

Create your image organilab

docker build -f docker/Dockerfile -t solvosoft/organilab .

Run with bind mount folder to sync with changes without rebuild image:

docker run -it --name organilab -p 80:80 -p 8000:8000 \
    -v `pwd`/src/:/organilab --env DBHOST=YOUR_PG_HOST \
	solvosoft/organilab

Enter to the container:

docker run -it organilab python manage.py runserver 0.0.0.0:8000

And finally each change you make in your local files will restart the environment in order to apply them.

Testing with selenium and docker

Run all selenium test is too slow, so you maybe want to generate a gif of your test.

First create a docker image:

make build_docker_selenium

Run your test, please note that quotes ("") are required on the command before run=.

make run_docker_selenium run="python manage.py test  --no-input --tag=selenium laboratory.tests.selenium_tests.manage_organizations.test_laboratory_tab"

happy hacking