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] Color: fix coloring of computed (processed) variables #6261

Merged
merged 2 commits into from
Dec 23, 2022

Conversation

markotoplak
Copy link
Member

Issue

Fixes Quasars/orange-spectroscopy#652

The Color widget currently saves AttrDesc in contexts. The problem is that AttrDesc contains a variable. Because the contexts only match by names (and values for discrete features) the saved variables get colored instead of the ones on the input.

Description of changes

After this fix, the variable descriptors on the input are always used when creating colored variables instead of the ones stored in the context.

Also, compute_values do not need to be stored in settings (within AttrDesc) and are therefore removed.

Includes
  • Code changes
  • Tests
  • Documentation

@markotoplak markotoplak changed the title [FIX] Color widget: fix coloring computed variables [FIX] Color: fix coloring computed (processed) variables Dec 16, 2022
@markotoplak markotoplak changed the title [FIX] Color: fix coloring computed (processed) variables [FIX] Color: fix coloring of computed (processed) variables Dec 16, 2022
@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Merging #6261 (aaeac3e) into master (e75f21c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6261   +/-   ##
=======================================
  Coverage   86.70%   86.70%           
=======================================
  Files         316      316           
  Lines       68120    68120           
=======================================
+ Hits        59064    59065    +1     
+ Misses       9056     9055    -1     

Variables stored in context settings were reused when constructing new
domains. Therefore, there were problems if only their compute_values
changed because the old context (matching names and values) still
matched. After this fix the variable descriptors on the input are always
used when creating colored variables instead of the ones stored in the
context.

Also, compute_values do not need to be stored in settings and are
therefore removed.
@janezd janezd self-assigned this Dec 23, 2022
@janezd janezd merged commit f1fcd72 into biolab:master Dec 23, 2022
@markotoplak markotoplak deleted the fix-color-compute-value branch March 21, 2023 15:52
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.

Preprocess Spectra widget breaks Color widget
2 participants