[FIX] Fix compatibility with Color widget#1552
Merged
janezd merged 5 commits intobiolab:masterfrom Sep 17, 2016
Merged
Conversation
Current coverage is 88.86% (diff: 100%)@@ master #1552 diff @@
==========================================
Files 78 78
Lines 8099 8100 +1
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 7197 7198 +1
Misses 902 902
Partials 0 0
|
Widget uses a dict for mapping of old variable descriptions to the new ones. If an old variable contains values in its attributes dict, which are not hashable, this makes description not hashable as well. This is worked around by matching old variables by everything except attributes. Fixes biolab#1527
d1af9fd to
5e3b7b7
Compare
This way, attributes are treated the same way as when they are read from file: evaluated if possible, if not, left as string
As PerfectDomainContextHandler uses different *args from its BaseClass, it needs to override the clone_context method.
When colors are inferred from variable's attributes, something might go wrong (i.e. invalid value). Instead of crashing, default colors are now used.
0f2eefd to
88c0745
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Color widget stores colors as a list inside the variables attribute dict. This caused a number of problems when used with EditDomain widget. For details, see individual commits.
Fixes #1527