Skip to content
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

Merged
merged 6 commits into from
Aug 22, 2017
Merged

[FIX] Another color palette when too many colors needed #2522

merged 6 commits into from
Aug 22, 2017

Conversation

jerneju
Copy link
Contributor

@jerneju jerneju commented Aug 9, 2017

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
  • Code changes
  • Tests
  • Documentation

@jerneju jerneju changed the title Colorpalette ten colors [FIX] Another color palette when too many colors needed Aug 9, 2017
@codecov-io
Copy link

codecov-io commented Aug 9, 2017

Codecov Report

Merging #2522 into master will increase coverage by 0.02%.
The diff coverage is 98.52%.

@@            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)
Copy link
Contributor

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)
Copy link
Contributor

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.

Copy link
Contributor Author

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):
Copy link
Contributor

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):
Copy link
Contributor

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).

@janezd janezd merged commit 212d8a9 into biolab:master Aug 22, 2017
@jerneju jerneju deleted the colorpalette-ten-colors branch August 23, 2017 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants