-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
feat(number): add parameter fractionDigits
in float
#1855
feat(number): add parameter fractionDigits
in float
#1855
Conversation
precision
with fractionDigits
in float
8d0e3ae
to
cb35103
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #1855 +/- ##
==========================================
- Coverage 99.57% 99.57% -0.01%
==========================================
Files 2807 2807
Lines 250411 250448 +37
Branches 1143 1149 +6
==========================================
+ Hits 249349 249372 +23
- Misses 1034 1048 +14
Partials 28 28
|
Adding the new parameter Around 3 month ago, with many discussions and looking deeper into it, we finally came to the conclusion that we want to officially want to support this behavior to achieve "steps" But as #1855 (comment) pointed to #1596 (comment) we want to XOR the parameter, so you will get a |
Would it be better to make stepped values a seperate method? so faker.number.float takes |
I mark this for |
Lets continue the discussion in the related issue to give our community the ability to input their suggestions so we can take them into consideration, when deciding this. |
Team decision The proposal to move the |
We will first refactor the method precision -> step. |
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.
i think the documentation to the whole method could still use an overall rewrite, but as its not really specific to this parameter change i'll do that as a seperate PR after this is merged.
Fixes #1596.
Since
datatype.float
anddatatype.number
now have significant differences compared tonumber.float
I put the legacy implementation for thedatatype
functions directly into that module, without referencing the new implementation of theNumberModule
.This allows us to more freely change the new APIs without having a fear of breaking something in the legacy one.