-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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] Another color palette when too many colors needed #2522
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2522 +/- ##
==========================================
+ Coverage 75.11% 75.13% +0.02%
==========================================
Files 323 324 +1
Lines 56902 56956 +54
==========================================
+ Hits 42743 42796 +53
- Misses 14159 14160 +1 |
self.colors = colorpalette.ColorPaletteGenerator( | ||
N, colorbrewer.colorSchemes["qualitative"]["Dark2"]) | ||
N, scheme) |
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.
Why line break here?
classification.NaiveBayesLearner(), | ||
classification.SGDClassificationLearner() | ||
] | ||
return evaluation.CrossValidation(data, learners, k=2, store_data=True) |
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.
Rename common.py
to base.py
. Instead of function color_palette_test
, base.py
should include a class derived from WidgetTest
with a method test_many_evaluation_results
. TestOWROCAnalysis
, TestOWCalibrationPlot
and TestOWLiftCurve
are then derived from this class.
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.
Done.
@@ -49,3 +50,11 @@ def test_nan_input(self): | |||
self.assertTrue(self.widget.Error.invalid_results.is_shown()) | |||
self.send_signal(self.widget.Inputs.evaluation_results, None) | |||
self.assertFalse(self.widget.Error.invalid_results.is_shown()) | |||
|
|||
def test_many_evaluation_results(self): |
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.
Remove this method (inherit it from the base class).
@@ -51,3 +52,11 @@ def test_nan_input(self): | |||
self.assertTrue(self.widget.Error.invalid_results.is_shown()) | |||
self.send_signal(self.widget.Inputs.evaluation_results, None) | |||
self.assertFalse(self.widget.Error.invalid_results.is_shown()) | |||
|
|||
def test_many_evaluation_results(self): |
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.
Remove this method (inherit it from the base class).
Issue
Similar as in #2394. This time fixed in widgets Calibration Plot and Lift Curve.
Additional info: https://sentry.io/biolab/orange3/issues/210623933/
Description of changes
Same solution as in #2394.
Three tests use the same code and that is why that code is moved to a separate file.
Includes