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] settings: Store settings version in the serialized defaults #2631

Merged
merged 2 commits into from
Sep 29, 2017

Conversation

ales-erjavec
Copy link
Contributor

Issue

Widget settings version were not stored in the serialized defaults, but were still passed to OWWidget.migrate_settings with an incorrect version of 0.

One example where this caused an error (due to wrong migration)

  • Open canvas, add 'Test & Score', change the Sampling option to Test on test data, close canvas
  • Open again, add 'Test & Score', observe that no Sampling option is selected at all. Without changing anything add a single file and learner input to the widget.
-------------------------- AssertionError Exception ---------------------------
Traceback (most recent call last):
  File "/Users/aleserjavec/workspace/orange3/Orange/canvas/scheme/widgetsscheme.py", line 839, in process_signals_for_widget
    widget.handleNewSignals()
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/evaluate/owtestlearners.py", line 486, in handleNewSignals
    self.__update()
  File "/Users/aleserjavec/workspace/orange3/Orange/widgets/evaluate/owtestlearners.py", line 826, in __update
    assert False, "self.resampling %s" % self.resampling
AssertionError: self.resampling 6
Description of changes

Store settings version in the serialized defaults.

Includes
  • Code changes
  • Tests
  • Documentation

@jerneju
Copy link
Contributor

jerneju commented Sep 27, 2017

@codecov-io
Copy link

codecov-io commented Sep 27, 2017

Codecov Report

Merging #2631 into master will increase coverage by 0.17%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2631      +/-   ##
==========================================
+ Coverage   75.01%   75.18%   +0.17%     
==========================================
  Files         331      331              
  Lines       58109    57796     -313     
==========================================
- Hits        43588    43456     -132     
+ Misses      14521    14340     -181

@astaric astaric added this to the 3.6 milestone Sep 29, 2017
@astaric astaric merged commit c675d30 into biolab:master Sep 29, 2017
@ales-erjavec ales-erjavec deleted the fixes/defaults-store-version branch November 14, 2017 08:55
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.

4 participants