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] Fix compatibility with Color widget #1552

Merged
merged 5 commits into from
Sep 17, 2016

Conversation

astaric
Copy link
Member

@astaric astaric commented Sep 9, 2016

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

@codecov-io
Copy link

codecov-io commented Sep 9, 2016

Current coverage is 88.86% (diff: 100%)

Merging #1552 into master will increase coverage by <.01%

@@             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          

Sunburst

Powered by Codecov. Last update 3f3ebd4...88c0745

@markotoplak markotoplak self-assigned this Sep 16, 2016
astaric and others added 2 commits September 16, 2016 13:01
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
@astaric astaric changed the title EditDomain: Skip attributes when describing old vars [FIX] Fix compatibility with Color widget Sep 16, 2016
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.
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.

5 participants