-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change sim plots entrypoint, add tests (#979)
* Adds new entrypoint for dash. * Add tests for dashboard. * Update md files. * fix multiple plots on the same row are not shrinking --------- Co-authored-by: Norbert <katunanorbert@gmail.com>
- Loading branch information
1 parent
476272b
commit 5a20bc8
Showing
12 changed files
with
212 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 1 addition & 14 deletions
15
pdr_dash_plots/util.py → pdr_backend/sim/dash_plots/util.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python | ||
from dash import Dash, dcc, html | ||
|
||
from pdr_backend.sim.dash_plots.callbacks import get_callbacks | ||
from pdr_backend.sim.dash_plots.view_elements import empty_graphs_template | ||
|
||
app = Dash(__name__) | ||
app.config["suppress_callback_exceptions"] = True | ||
app.layout = html.Div( | ||
html.Div( | ||
[ | ||
html.Div(empty_graphs_template, id="live-graphs"), | ||
dcc.Interval( | ||
id="interval-component", | ||
interval=3 * 1000, # in milliseconds | ||
n_intervals=0, | ||
disabled=False, | ||
), | ||
] | ||
) | ||
) | ||
|
||
get_callbacks(app) | ||
|
||
|
||
def sim_dash(args): | ||
app.run_id = args.run_id | ||
app.run(debug=True, port=args.port) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.