biolab / orange-canvas-core

Orange Canvas core workflow editor
GNU General Public License v3.0
36 stars 62 forks source link

readwrite: Load NaN setting #233

Closed VesnaT closed 2 years ago

VesnaT commented 2 years ago
Issue

Settings with NaN values can not be loaded.

Issue

To reproduce: Create a widget with a float setting. Assign the setting NaN value and save the workflow. When opening the workflow, the saved value of the setting is not used.

Description of changes

In case of NaN raise an exception when writing it into a string as a python literal.

codecov-commenter commented 2 years ago

Codecov Report

Merging #233 (f770af1) into master (925bfe4) will decrease coverage by 0.12%. The diff coverage is 60.00%.

@@            Coverage Diff             @@
##           master     #233      +/-   ##
==========================================
- Coverage   74.28%   74.15%   -0.13%     
==========================================
  Files          95       95              
  Lines       20481    20486       +5     
==========================================
- Hits        15214    15192      -22     
- Misses       5267     5294      +27     
Impacted Files Coverage Δ
orangecanvas/scheme/readwrite.py 71.97% <60.00%> (-0.15%) :arrow_down:
orangecanvas/utils/overlay.py 74.80% <0.00%> (-4.80%) :arrow_down:
orangecanvas/utils/shtools.py 82.92% <0.00%> (-2.44%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 925bfe4...f770af1. Read the comment docs.