- Python 99.3%
- Dockerfile 0.7%
| terdiag | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
| TODO.md | ||
Terdiag project
Terdiag is a scientific application built on the publication "Ramousse J, Goupil C. Chart for Thermoelectric Systems Operation Based on a Ternary Diagram for Bithermal Systems. Entropy. 2018; 20(9):666. https://doi.org/10.3390/e20090666".
The application is built on the holoviz framework (https://holoviz.org/) and especially panel (https://panel.holoviz.org/). It is a web application that can be run locally or deployed on a server.
Installation
Local installation
To install the application locally, you need to have python 3.10 or higher. You can install it with pip from its main repository (git is needed):
pip install git+https://gitlab.com/celliern/terdiag
A command line is then available to launch the application:
terdiag-app
Docker installation
A docker image is available on the gitlab project registry. To run it, you need to have docker installed on your computer. You can then run the following command:
docker run -p 5006:5006 registry.gitlab.com/celliern/terdiag/terdiag:latest
The application is then available on http://localhost:5006.
You can also build the docker image yourself. To do so, you need to clone the repository and run the following command:
docker build -t terdiag .
docker run -p 5006:5006 terdiag
A docker-compose file is also available to run the application as a service: in the cloned repository:
docker-compose up
A production ready docker-compose using the registry image will look like this:
version: '3.7'
services:
terdiag:
image: registry.gitlab.com/celliern/terdiag/terdiag:latest
ports:
- 5006:80
restart: always
Development
To develop the application, you need to clone the repository and install the dependencies with poetry:
git clone https://gitlab.com/celliern/terdiag
cd terdiag
poetry install
You can then run the application with the following command:
poetry run terdiag-app
or, if you want to have an auto-reload on file change:
poetry run panel serve terdiag/app.py --autoreload
As good practice, black and ruff are used to format and lint the code. You can run them with the following commands:
poetry run black terdiag
poetry run ruff --fix terdiag
License
This project is licensed under the terms of the MIT license.