This project implements a simple slideshow using Python Dash. The project provides the UI framework, including navigation, and a docker-compose setup for easy local setup.
Agenda | Slide with interactive Plot |
---|---|
- Write a function in
src/slides
which creates the UI of your new slide - Add it within
src/slides/__init__.py
with your intended url for this slide - Eventually implement callbacks in
src/callbacks
for dynamic elements - Callbacks are added to the dash app in
src/callbacks/__init__.py
docker-compose build
docker-compose up -d
# Stop and remove container
docker-compose stop
# Restart container
docker-compose restart
You can change the title of the slideshow in app.py
and once you are down developing, you can set debug to False and switch the command in the docker-compose.yml
.
I'd recommend to use VS Code as it allows to develop directly inside the Docker container.
- Install the
Docker
andRemote Development
extensions. - Start the docker image, open Docker tab in side-panel, right-click on the container and click attach VS Code
- This opens the root folder in your container
- Open your project folder and enable extensions if you need any (e.g. python for formatting or jupyter)
By default, the dash app is started using gunicorn and the code is reloaded on each code change.
In case of errors, the image would shut down which is why the app creation is wrapped within a try/except block.
To check why the app fails, run python app.py
from within the docker image.
mypy .
flake8 .
pylint src