-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Resolve deprecations #63
Conversation
03e8653
to
c2591f3
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #63 +/- ##
=======================================
Coverage 93.47% 93.47%
=======================================
Files 16 16
Lines 5030 5030
=======================================
Hits 4702 4702
Misses 328 328
☔ View full report in Codecov by Sentry. |
497000e
to
97db09a
Compare
97db09a
to
4f6e91e
Compare
self.send_signal(self.widget.Inputs.model, self.rf_cls) | ||
self.wait_until_finished() | ||
self.assertTrue(self.widget.Error.domain_transform_err.is_shown()) | ||
with patch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot make a case where DomainTransformationError
is raised. When a new domain doesn't have attributes from the model, the list view is empty, resulting in an empty feature variable and the process finishing with None (before domain transformation).
I hope I didn't miss any cases. I would anyway leave domain_transform_err
, so I added a test with a patch for it.
@@ -39,15 +40,19 @@ def test_input_cls(self): | |||
|
|||
self.send_signal(self.widget.Inputs.model, self.rf_reg) | |||
self.wait_until_finished() | |||
self.assertTrue(self.widget.Error.unknown_err.is_shown()) | |||
# no error since no attributes in view and those no future is selected | |||
self.assertFalse(self.widget.Error.unknown_err.is_shown()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model and data domain are different, which results in no attributes in the list view and those no feature is selected. ICE shows an empty graph without error.
self.feature = selection.indexes()[0].data(gui.TableVariable) | ||
self._apply_feature_sorting() | ||
def __on_feature_changed(self): | ||
selection = self._features_view.selectionModel().selectedIndexes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes while filtering, __on_feature_changed
is called two times. First with a selection change and second without change (both selected and deselected parameters are empty). Since it is safer, use self._features_view.selectionModel().selectedIndexes()
.
In the addon, there are some calls to deprecated functions.
This PR resolve deprecated calls/classes.
It also increases the minimum versions of Orange packages because of ListViewFilter and get_column.