Skip to content

Commit 66f8383

Browse files
committed
use bootstrap for layout
1 parent 39e03db commit 66f8383

3 files changed

Lines changed: 27 additions & 6 deletions

File tree

meshtastic/analysis/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import pyarrow as pa
99
import pyarrow.feather as feather
1010
from dash import Dash, Input, Output, callback, dash_table, dcc, html
11+
import dash_bootstrap_components as dbc
1112

1213
from .. import mesh_pb2, powermon_pb2
1314

@@ -83,7 +84,9 @@ def to_pmon_name(n):
8384

8485
def create_dash():
8586
"""Create a Dash application for visualizing power consumption data."""
86-
app = Dash()
87+
app = Dash(
88+
external_stylesheets=[dbc.themes.BOOTSTRAP]
89+
)
8790

8891
def set_legend(f, name):
8992
f["data"][0]["showlegend"] = True

poetry.lock

Lines changed: 19 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "GPL-3.0-only"
77
readme = "README.md"
88

99
[tool.poetry.dependencies]
10-
python = "^3.9,<3.13" # 3.9 is needed for pandas, bleak requires a max of 3.13 for some reason
10+
python = "^3.9,<3.13" # 3.9 is needed for pandas, bleak requires a max of 3.13 for some reason
1111
pyserial = "^3.5"
1212
protobuf = ">=5.26.0"
1313
dotmap = "^1.3.30"
@@ -29,6 +29,7 @@ platformdirs = "^4.2.2"
2929
print-color = "^0.4.6"
3030
dash = { version = "^2.17.1", optional = true }
3131
pytap2 = { version = "^2.3.0", optional = true }
32+
dash-bootstrap-components = { version = "^1.6.0", optional = true }
3233

3334
[tool.poetry.group.dev.dependencies]
3435
hypothesis = "^6.103.2"
@@ -47,7 +48,7 @@ types-setuptools = "^69.5.0.20240423"
4748
types-pyyaml = "^6.0.12.20240311"
4849
pyarrow-stubs = "^10.0.1.7"
4950

50-
# If you are doing power analysis you probably want these extra devtools
51+
# If you are doing power analysis you might want these extra devtools
5152
[tool.poetry.group.analysis]
5253
optional = true
5354

@@ -60,7 +61,7 @@ jupyterlab-widgets = "^3.0.11"
6061

6162
[tool.poetry.extras]
6263
tunnel = ["pytap2"]
63-
analysis = [ "dash" ]
64+
analysis = ["dash", "dash-bootstrap-components"]
6465

6566
[tool.poetry.scripts]
6667
meshtastic = "meshtastic.__main__:main"

0 commit comments

Comments
 (0)