-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.py
25 lines (20 loc) · 1.02 KB
/
index.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Plotly Dash modules
from app import app
# MiRo dashboard modules
# PyCharm will complain these imports are unused, but they definitely are
# Comment these out to test / modify basic layout without a running ROS core
import models.callback_fast
import models.callback_medium
import models.callback_slow
import models.callback_modal
# Separation of app.py and index.py required to allow definition of callbacks in separate files
# See bottom of https://dash.plotly.com/urls
# TODO: Package into easy-install app bundle
# TODO: Move from Scatter() to ScatterGL() (see: https://plot.ly/python/webgl-vs-svg/)
if __name__ == '__main__':
# Enable to suppress warnings TEMPORARILY
# app.config['suppress_callback_exceptions'] = True
# "debug=False" because hot reloading causes "IOError: [Errno 11] Resource temporarily unavailable" errors
# "host='0.0.0.0'" allows connections from non-localhost addresses
# I *think* "threaded=True" gives a performance boost to multiple callbacks
app.run_server(debug=False, host='0.0.0.0', threaded=True)