You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your view class creates multiple instances of the data source
(originally in file model.py and now apparently in data_analyze.py).
View (UI) should not create any instances of the model. Use dependency injection, or let the view "get" a reference from the controller:
data=self.controller.get_dataset()
Regardless of how you do it, you should not create multiple instances of the data source (model). That wastes memory, time, and I/O.
In your view code:
definit_data_information_tab(self):
# name should be "columns" or "attributes", # not "column" since there are manycolumn=DataAnalyze().get_column_names()
defhandle_attribute_selection(self, selected_attribute):
# Get data analyzer instancedata_analyzer=DataAnalyze()
Its a matter of choice, but I think "DataAnalyze" is not a
descriptive name for the model class. It's not doing actual analysis.
The text was updated successfully, but these errors were encountered:
Your view class creates multiple instances of the data source
(originally in file
model.py
and now apparently indata_analyze.py
).In your view code:
Its a matter of choice, but I think "DataAnalyze" is not a
descriptive name for the model class. It's not doing actual analysis.
The text was updated successfully, but these errors were encountered: