-
Notifications
You must be signed in to change notification settings - Fork 0
Integrate frictionless baseline validators with workflow_runner #15
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
@@ -7,7 +7,8 @@ Brazil,Brasília,,5,South America | |||
Pakistan,Islamabad,197015955,6,Asia | |||
Nigeria,Abuja,190886311,7,Africa | |||
Bangladesh,Dhaka,,8,Asia | |||
Russia,Moscow,143989754,9,Europe | |||
Russia,Moscow,notanumber!,9,Europe |
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.
Checking that the Type validator works properly
row_number=row_num, | ||
message=f"Value '{value}' for field '{field.name}' is not a valid number" | ||
# TypeError is raised if value is None | ||
except (TypeError, ValueError) as e: |
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.
Idk if this has to do with my python interpreter (i'm using the venv), because I don't know how the original unit tests didn't see this.
But basically the float cast throws a TypeError if the input is None (which happens when there are missing cells), which isn't caught by the original except statement.
requirements.txt
Outdated
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.
Not sure if these changes are supposed to be here?
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.
Thank you for this!
And thanks for being so thorough in your commenting, it really helped in the review.
Changes are:
parse_frictionless
function that combines parsing a file into a Frictionless Resource with a Frictionless baseline validator.process_workflow
function.