-
Notifications
You must be signed in to change notification settings - Fork 140
[ENH] Custom Float Value Enhancements #86
base: 10.0
Are you sure you want to change the base?
[ENH] Custom Float Value Enhancements #86
Conversation
3020d15
to
f385db5
Compare
Allows float rounding to be defined. Checks min and max better I have not changed the js and xml for the configurator front end NOT changed!
f385db5
to
70783ba
Compare
Codecov Report
@@ Coverage Diff @@
## 10.0 #86 +/- ##
==========================================
+ Coverage 61.11% 61.72% +0.61%
==========================================
Files 14 14
Lines 1368 1382 +14
==========================================
+ Hits 836 853 +17
+ Misses 532 529 -3
Continue to review full report at Codecov.
|
string="Max Float Value", | ||
digits=(16, 4), | ||
help="Maximum value allowed, or 0 if not checked" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we keep one float field for min/max of int and float since there can only be one custom field type per attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PCatinean True, but it needs to be a float min or max, not an integer. Our requirement was that the minimum was 0.573, and the maximum was 20.127 (a length).
I think this is a little cleaner, though, because it implies the validation steps are dependent on the type, which could be extended to other types at another time...
Also, if a float min is used, then we need to ensure the error converts the min to an integer before displaying so it does not say "Value cannot be greater than 20.0"
Allows float rounding to be defined.
Checks min and max better
js and xml for the configurator front end NOT changed!