-
Notifications
You must be signed in to change notification settings - Fork 6
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
configurable date format and handle decimal InvalidOperation #20
Conversation
Hi @ome9ax bumping this. Do you have time to review? |
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.
Thanks for your contribution @aroder
Left a note, Let me know your thoughts.
pytest-cov | ||
moto[s3] |
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.
Those are already in the [options.extras_require]
section L34-35. I keep them apart as they are not needed to run the package, only to run the tests.
My rational is to keep the target lean if possible.
So I don't know how much of a best practice it is but I used
pip install --upgrade .[test,lint,dist]
To install what's needed on local
. It was my way of following the KISS principle here.
@@ -13,12 +13,13 @@ | |||
|
|||
from jsonschema import Draft4Validator, FormatChecker | |||
from decimal import Decimal | |||
from adjust_precision_for_schema import adjust_decimal_precision_for_schema |
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.
That a great one. Thanks for adding it.
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.
Reading the Handle multipleOf overflow fix introduced in jsonschema v4.0.0, I wonder if that update doesn't make adjust_precision_for_schema
reduntant?
I would like to note that the current implementation allows for specifying the date format already. the additional parameter might be redundant. e.g.
however, we should add some parsing logic to ensure that the naming convention provided is valid and update the documentation with some examples. |
All the functionalities are now implemented. |
date_format
that makes the target key's date format configurable. It defaults to the original hard-coded date format, making this change backwards compatible.@ome9ax are you open to a PR for this, or open to discuss?