Skip to content

Commit

Permalink
changed feature test to hist plot
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdelgrosso committed Oct 20, 2021
1 parent 052ae5c commit 054f0ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
8 changes: 3 additions & 5 deletions features/test_all_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,9 @@ def step_impl(app: App, channel_name: str):
converters={'range_min': int, 'range_max': int},
)
def step_impl(app: App, range_min: int, range_max: int):
hist = app.num_spots_histogram.histogram
assert hist is not None
assert max(hist.bin_edges) == range_max
assert min(hist.bin_edges) == range_min
assert len(hist.bar_heights) == len(hist.bin_edges) - 1
hist = app.hist_plots
assert max(hist.selected_data) == range_max
assert min(hist.selected_data) == range_min


@then(
Expand Down
12 changes: 3 additions & 9 deletions regexport/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,14 @@ def __init__(self, debug=False):
self.colordata_selector_dropdown.register(model=self.model, options_attr='column_to_plot_options',
selected_attr='column_to_plot')

self.num_spots_histogram = HistogramModel()
self.num_spots_histogram.register(model=self.model)

self.num_spots_histogram2 = HistogramModel(cumulative=True)
self.num_spots_histogram2.register(model=self.model)

self.download_biop_extensions_button = SaveBiopExtensionsActionModel()
self.save_groovy_script_button = SaveGroovyScriptActionModel()

self.channel_filter_model = ChannelFilterModel()
self.channel_filter_model.register(model=self.model)

self.plot = PlotModel()
self.plot.register(model=self.model)
self.hist_plots = PlotModel()
self.hist_plots.register(model=self.model)

self.show_plots_checkbox = CheckboxModel(label='Auto-Update Histograms')
self.show_plots_checkbox.register(model=self.model, model_property='show_plots')
Expand All @@ -76,7 +70,7 @@ def create_gui(self) -> QMainWindow:
widgets=(
DropdownTextSelectorView(model=self.colordata_selector_dropdown),
DropdownTextSelectorView(model=self.colormap_selector_model),
PlotView(model=self.plot),
PlotView(model=self.hist_plots),
CheckboxView(model=self.show_plots_checkbox),
ChannelFilterView(model=self.channel_filter_model),
),
Expand Down

0 comments on commit 054f0ca

Please sign in to comment.