Skip to content

Commit 1bbf1a6

Browse files
jirhikeractions-user
authored andcommitted
Formatting changes
1 parent d5fd24d commit 1bbf1a6

File tree

9 files changed

+160
-116
lines changed

9 files changed

+160
-116
lines changed

pychron/bakeout/bakeout_manager.py

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@
2626

2727
class BakeoutManager(StreamGraphManager):
2828
controller = Any
29-
settings_name = 'bakeout_streaming'
29+
settings_name = "bakeout_streaming"
3030

3131
def _create_manager(
3232
self, klass, manager, params, port=None, host=None, remote=False
3333
):
3434
return self.application.get_service(BakeoutManager)
3535

3636
def _controller_default(self):
37-
return BakeoutPLC(name='controller', configuration_dir_name='bakeout')
37+
return BakeoutPLC(name="controller", configuration_dir_name="bakeout")
3838

3939
def prepare_destroy(self):
4040
self.set_streaming_active(False)
4141
self.stop_scan()
4242
self.controller.prepare_destroy()
4343

4444
def activate(self):
45-
self.debug('asdfascasdcasdc')
45+
self.debug("asdfascasdcasdc")
4646
self.set_streaming_active(True)
4747
# self.bind_preferences()
4848

@@ -86,17 +86,27 @@ def _graph_factory(self, *args, **kw):
8686
g.set_data_limits(1.8 * 600, plotid=0)
8787

8888
# Output/Duty Cycle
89-
g.new_plot(ytitle="Output/Duty Cycle (%)", padding_top=5, padding_left=75, padding_right=5)
89+
g.new_plot(
90+
ytitle="Output/Duty Cycle (%)",
91+
padding_top=5,
92+
padding_left=75,
93+
padding_right=5,
94+
)
9095

9196
g.set_scan_width(600, plotid=1)
9297
g.set_data_limits(1.8 * 600, plotid=1)
9398
g.set_y_limits(min_=-2, max_=102, plotid=1)
9499
for channel in self.controller.channels:
95-
series, _ = g.new_series(plotid=0, color=channel.color, name=channel.shortname)
96-
g.new_series(plotid=0,
97-
# render_style="connectedhold",
98-
line_style='dash',
99-
color=series.color, name=f'{channel.shortname}, Setpoint')
100+
series, _ = g.new_series(
101+
plotid=0, color=channel.color, name=channel.shortname
102+
)
103+
g.new_series(
104+
plotid=0,
105+
# render_style="connectedhold",
106+
line_style="dash",
107+
color=series.color,
108+
name=f"{channel.shortname}, Setpoint",
109+
)
100110

101111
g.new_series(plotid=1, name=channel.shortname, color=series.color)
102112

@@ -106,9 +116,7 @@ def get_display_channels(self):
106116
return [ci for ci in self.controller.channels if ci.display]
107117

108118

109-
110-
111-
if __name__ == '__main__':
119+
if __name__ == "__main__":
112120
b = BakeoutManager()
113121
b.activate()
114122
b.setup_scan()

pychron/bakeout/tasks/bakeout_panes.py

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@
1818
from click import style
1919
from pyface.tasks.traits_dock_pane import TraitsDockPane
2020
from pyface.tasks.traits_task_pane import TraitsTaskPane
21-
from traitsui.api import View, UItem, InstanceEditor, TableEditor, EnumEditor, ListEditor, ButtonEditor
21+
from traitsui.api import (
22+
View,
23+
UItem,
24+
InstanceEditor,
25+
TableEditor,
26+
EnumEditor,
27+
ListEditor,
28+
ButtonEditor,
29+
)
2230
from traitsui.extras.checkbox_column import CheckboxColumn
2331
from traitsui.table_column import ObjectColumn
2432

@@ -29,57 +37,57 @@ def traits_view(self):
2937
v = View(UItem("graph", style="custom", editor=InstanceEditor()))
3038
return v
3139

40+
3241
class BakeoutControlPane(TraitsDockPane):
33-
name = 'Controls'
42+
name = "Controls"
3443
id = "pychron.bakeout.control"
3544

3645
def traits_view(self):
3746
cols = [
3847
# CheckboxColumn(name='display'),
39-
CheckboxColumn(name='enabled'),
40-
ObjectColumn(name='name', editable=False),
41-
ObjectColumn(name='setpoint',
42-
format='%0.3f',
43-
editable=False),
44-
ObjectColumn(name='temperature',
45-
format='%0.3f',
46-
editable=False),
47-
ObjectColumn(name='duty_cycle',
48-
format='%0.3f',
49-
editable=False),
50-
CheckboxColumn(name='overtemp', editable=False),
48+
CheckboxColumn(name="enabled"),
49+
ObjectColumn(name="name", editable=False),
50+
ObjectColumn(name="setpoint", format="%0.3f", editable=False),
51+
ObjectColumn(name="temperature", format="%0.3f", editable=False),
52+
ObjectColumn(name="duty_cycle", format="%0.3f", editable=False),
53+
CheckboxColumn(name="overtemp", editable=False),
5154
# ObjectColumn(name='clear_overtemp',
5255
# style='custom',
5356
# editor=ButtonEditor(),
5457
# label='Clear Over Temp.'),
55-
5658
# ObjectColumn(name='temperature_address', editable=False),
5759
# ObjectColumn(name='duty_cycle_address', editable=False),
5860
# ObjectColumn(name='setpoint_address', editable=False),
5961
]
6062

6163
edit_view = View(
62-
UItem('object.temperature'),
63-
UItem('object.clear_overtemp', style='custom'),
64+
UItem("object.temperature"),
65+
UItem("object.clear_overtemp", style="custom"),
6466
)
6567

6668
v = View(
67-
UItem('object.controller.configuration',
68-
editor=EnumEditor(name='object.controller.configurations'),
69-
width=200),
70-
UItem("object.controller.channels", style="custom",
71-
editor=TableEditor(
72-
columns=cols,
73-
selection_mode="rows",
74-
edit_view=edit_view,
75-
orientation='vertical',
76-
selected="object.controller.selected_channel",
77-
)),
69+
UItem(
70+
"object.controller.configuration",
71+
editor=EnumEditor(name="object.controller.configurations"),
72+
width=200,
73+
),
74+
UItem(
75+
"object.controller.channels",
76+
style="custom",
77+
editor=TableEditor(
78+
columns=cols,
79+
selection_mode="rows",
80+
edit_view=edit_view,
81+
orientation="vertical",
82+
selected="object.controller.selected_channel",
83+
),
84+
),
7885
# UItem(
7986
# 'object.controller.channels',
8087
# editor=ListEditor(style='custom')
8188
# )
82-
8389
)
8490
return v
91+
92+
8593
# ============= EOF =============================================

pychron/bakeout/tasks/bakeout_plugin.py

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,36 @@
2020

2121

2222
class BakeoutPlugin(BaseTaskPlugin):
23-
id = 'pychron.bakeout.plugin'
24-
name = 'Bakeout'
23+
id = "pychron.bakeout.plugin"
24+
name = "Bakeout"
2525

2626
def _tasks_default(self):
27-
return [TaskFactory(
28-
id="pychron.bakeout.task",
29-
factory=self._task_factory,
30-
name="Bakeout",
31-
image="applications-science",
32-
task_group="hardware",
33-
accelerator="Ctrl+Shift+B",
34-
)]
27+
return [
28+
TaskFactory(
29+
id="pychron.bakeout.task",
30+
factory=self._task_factory,
31+
name="Bakeout",
32+
image="applications-science",
33+
task_group="hardware",
34+
accelerator="Ctrl+Shift+B",
35+
)
36+
]
3537

3638
def _service_offers_default(self):
3739
""" """
38-
so = self.service_offer_factory(
39-
protocol=BakeoutManager, factory=self._factory
40-
)
40+
so = self.service_offer_factory(protocol=BakeoutManager, factory=self._factory)
4141
return [so]
4242

4343
def _factory(self):
4444
return BakeoutManager(application=self.application)
4545

4646
def _task_factory(self):
4747
from pychron.bakeout.tasks.bakeout_task import BakeoutTask
48-
return BakeoutTask(application=self.application,
49-
manager=self.application.get_service(BakeoutManager))
48+
49+
return BakeoutTask(
50+
application=self.application,
51+
manager=self.application.get_service(BakeoutManager),
52+
)
5053

5154
def _managers_default(self):
5255
""" """
@@ -57,4 +60,6 @@ def _managers_default(self):
5760
manager=self.application.get_service(BakeoutManager),
5861
)
5962
]
63+
64+
6065
# ============= EOF =============================================

pychron/bakeout/tasks/bakeout_task.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ def create_dock_panes(self):
3131
def _default_layout_default(self):
3232
return TaskLayout(left=PaneItem("pychron.bakeout.control"))
3333

34+
3435
# ============= EOF =============================================

pychron/entry/tasks/project/task.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class ProjectTask(BaseManagerTask):
2929
name = "Project Database"
3030
id = "pychron.entry.project.task"
3131

32-
3332
def create_central_pane(self):
3433
return ProjectPane(model=self.manager)
3534

0 commit comments

Comments
 (0)