Conversation
colton-smith
left a comment
There was a problem hiding this comment.
Very sick PR Ahmed !
Couple of requested changes:
- Use new app.callback() arguement prevent_initial_call = True to prevent the callback from firing initially, and remove the workaround we used before
- Very few tiny style changes like consistent line spacing, and one or 2 long lines
- Most importantly, I think we will need a data structure to hold the profile in so that we can access that data when we go to start the test! This could be in a class - all we need is to load the profile (we can already do so) then on start we will have to read all the values in the current input boxes and set them to fields in a class
- The other important thing is exposing the min/max values a little more using constants at the top of the layout file. This is super easy, just use arbitrary values if they aren't in the spec doc, and we will ask any questions you have in a meeting with Nick
Very close to merge worthy!
| @@ -1 +1,18 @@ | |||
| # Stability dash entrypoint | |||
There was a problem hiding this comment.
I'd like to see top of file comments replaced with a module docstring
| import time | ||
|
|
||
| import dash | ||
| import dash_bootstrap_components as dbc | ||
| import dash_core_components as dcc | ||
| import dash_daq as daq | ||
| import dash_html_components as html | ||
| from dash.dependencies import Input, Output, State | ||
|
|
||
| import stability_dash.callbacks.control_callbacks | ||
| from stability_dash.app import app | ||
| from stability_dash.layout.control import control_layout |
There was a problem hiding this comment.
Imports look to be in order, nice~!
| @@ -0,0 +1,44 @@ | |||
| .pad-top { | |||
There was a problem hiding this comment.
We (meaning I) am pretty dumb for not laying out these dash apps to all use the same assets folder so we could avoid copy pasting what little custom css we do have
Way she goes
| from dash.dependencies import Input, Output, State | ||
| from dash.dash import no_update |
There was a problem hiding this comment.
Swap these 2 to maintain alphabetical order of imports
| json.dump(profiles_json, profiles_file, indent=4) | ||
|
|
||
| return profile_name | ||
|
|
|
|
||
| dbc.Row([ | ||
| dbc.Col([ | ||
| dbc.Card([dbc.Button("EMERGENCY STOP", color="danger", size="lg", block = True, style={"height":"100%","width":"100%"} )]) |
There was a problem hiding this comment.
This row is a little long - maybe stack some of the arguments to button
| @@ -0,0 +1,151 @@ | |||
| import dash | |||
There was a problem hiding this comment.
This file is super clean, nice job dude
| if not delete_clicks: | ||
| raise dash.exceptions.PreventUpdate |
There was a problem hiding this comment.
See above comment about the new feature
|
|
||
|
|
There was a problem hiding this comment.
Should be always one space between rows or always 2 spaces, seems like you went with mostly one space so you can just make this one space as well
|
|
||
| dbc.Row([ |
There was a problem hiding this comment.
Add Min/Max constants for each input at the top of this file.
OR we can add another file like suspension_config.py that includes all these constants and then import it. I kind of like that a little better!
This branch contains the GUI for suspension testing. It prompts entering test parameters and allows saving them as profiles in a JSON file. You can load profiles or delete them. The actual testing logic hasn't been done yet.
Features tested:
Note: some fixes need to be done for layout sizing