-
Notifications
You must be signed in to change notification settings - Fork 19
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
Improve exceptions #59
Conversation
Unspecified dates previously could not handle qualification. Unspecified dates also couldn't handle dates with 3 unspecified digits ("1XXX"). This commit adds both those features and tests for those use cases.
Requires quite a few overrides of lower_ and upper_ range methods to properly handle dates due to padding working in the opposite direction for negative dates, esp when combined with month/day padding.
If not in debug mode, use a simpler EDTFParseException rather than returning the full pyparsing error
edtf/parser/grammar.py
Outdated
try: | ||
if not str: | ||
if not input_string: | ||
raise ParseException("You must supply some input text") |
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 maybe this should be moved up out of the try:
block, because otherwise you don't see the "You must supply..." message.
I think maybe we should catch the error and process in the same way here: https://github.com/ixc/python-edtf/blob/v5/edtf/fields.py#L135-L138 What do you think about this approach?
|
Includes handling for empty or null input strings and null errs passed to the constructor Co-Authored-By: aweakley <[email protected]>
Thanks for the feedback @aweakley - let me know if there's anything else needed here. |
Make the string representation of TestEvent simpler
I think these are failing due a permissions issue again - the tests themselves seem to pass. |
I'm seeing an error with the coverage report in my latest run here: https://github.com/ixc/python-edtf/actions/runs/9358234831/job/25820224297#step:11:1
|
I think this is the same permissions issue as in PRs like this:
I think this is because the PRs are from a fork: MishaKav/pytest-coverage-comment#68 If you look at the workflow on my fork, you can see all the tests work and everything runs up until publishing the benchmarks, which fails because I don't have GHPages set up for the fork: https://github.com/artshumrc/python-edtf/actions/runs/9358234517/job/25759630204 |
Thank you, this looks great. |
Any other ideas of what we would want to improve here @aweakley ?