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] owimpute: Make default_numeric locale independant #5209

Merged
merged 2 commits into from
Jan 29, 2021

Conversation

ales-erjavec
Copy link
Contributor

Issue

The default_numeric parameter in OWImpute is stored as localized string and is hence not portable.

Steps to reproduce on macOS:

  • Open System Preferences.app -> Language & Region -> Advanced..., Change decimal separator to '.'
  • Open Orange, add File (load say brown-selected) -> Impute -> Table. In Impute set default fixed numeric value to '1.222', Observe that on the output the missing values are correctly replaced.
  • Save the workflow and close Orange
  • Open System Preferences.app -> Language & Region -> Advanced..., Change decimal separator to ','
  • Open Orange and load the saved workflow
  • Observe that in the Impute widget the numeric fixed value text is '1.222', and that on the output the missing values remain missing.
Description of changes

Replace use of QLineEdit with QDoubleSpin box for editing. Unify min/max/precision in default method and individual variable spin boxes.

No migrations since the change that introduced the default fixed values was not yet released.

Includes
  • Code changes
  • Tests
  • Documentation

@ales-erjavec ales-erjavec force-pushed the impute-default-value-locale branch 2 times, most recently from b52605d to ba28128 Compare January 26, 2021 11:33
@codecov
Copy link

codecov bot commented Jan 26, 2021

Codecov Report

Merging #5209 (703320c) into master (0d6da92) will increase coverage by 0.01%.
The diff coverage is 97.29%.

@@            Coverage Diff             @@
##           master    #5209      +/-   ##
==========================================
+ Coverage   85.17%   85.19%   +0.01%     
==========================================
  Files         299      300       +1     
  Lines       60888    60947      +59     
==========================================
+ Hits        51864    51924      +60     
+ Misses       9024     9023       -1     

@ales-erjavec ales-erjavec force-pushed the impute-default-value-locale branch from ba28128 to 2a9de6f Compare January 27, 2021 09:57
The default_numeric was stored as localized string and was hence not
portable.

Replace use of QLineEdit with QDoubleSpin box for editing
Implement `stepBy` update using decimal type.
@ales-erjavec ales-erjavec force-pushed the impute-default-value-locale branch from 2a9de6f to 703320c Compare January 27, 2021 10:01
@janezd janezd self-assigned this Jan 28, 2021
@janezd janezd merged commit 516d3d9 into biolab:master Jan 29, 2021
@ales-erjavec ales-erjavec deleted the impute-default-value-locale branch February 18, 2021 08:35
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.

2 participants