Skip to content

jamesscottbrown/list-of-liquids

Repository files navigation

List of Liquids

A graphical interface for writing laboratory protocols.

Pre-print of paper describing this system.

Project homepage Demo installation

Other documentation:

Getting started

With Docker

The simplest way to run List of Liquids is to install Docker and Docker compose, and clone this repository.

At the terminal, change directory into the cloned repository, and run:

docker-compose build
docker-compose up

You will then be able to use List of Liquids by opening the URL http://localhost:5000/ in your web-browser.

Alternatively, to run in development mode, run:

docker-compose -f docker-compose.dev.yml build
docker-compose -f docker-compose.dev.yml up

Note that by default data is be saved to an SQLite database file inside the Docker container (/code/dev.db or /code/prod.db), so will be lost if this container is stopped or restarted. To persist data, use a volume.

Without Docker

Clone the repository and install required python packages:

git clone https://github.com/jamesscottbrown/protocol_gui
cd protocol_gui
pip install -r requirements/dev.txt

Before running shell commands, set the FLASK_APP and FLASK_DEBUG environment variables :

export FLASK_APP=/path/to/autoapp.py
export FLASK_DEBUG=1

Run the following to create your app's database tables and perform the initial migration :

flask db init
flask db migrate
flask db upgrade

You can now run the application:

flask run

You can also pen an interactive shell by running :

flask shell

Deployment

If running in production, you will need to set a secret key to prevent sessions from being trivially steal-able.

To do this, set the PROTOCOL_GUI_SECRET environment variable. For example, add the following to .bashrc or .bash_profile:

export PROTOCOL_GUI_SECRET='something-really-secret'

You will also want to ensure the FLASK_DEBUG environment variable is unset or is set to 0, so that ProdConfig is used.

Migrations

Whenever a database migration needs to be made, first generate a new migration script :

flask db migrate

And then apply it :

flask db upgrade

For a full migration command reference, run flask db --help.

About

A visual tool for editing laboratory protocols.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published