-
Notifications
You must be signed in to change notification settings - Fork 4
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
Bugfix/jsonschema #577
Bugfix/jsonschema #577
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #577 +/- ##
===========================================
+ Coverage 75.29% 75.38% +0.08%
===========================================
Files 258 258
Lines 14430 14485 +55
Branches 2078 2003 -75
===========================================
+ Hits 10865 10919 +54
- Misses 3104 3112 +8
+ Partials 461 454 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…PR and we see that we do not ahve any new issues with how the application solve actually works
@@ -181,6 +184,12 @@ def solve( | |||
|
|||
instance_checks = SuperDict(inst.check()) | |||
|
|||
inst_errors = inst.validate_checks(instance_checks) |
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 wouldn't use "inst_errors" again because it can be confusing with the errors of the instance schema. I think "inst_checks_errors" is better.
And the same with "inst_errors". I would prefer "inst_squema_errors"
If anything, two different names. If you like to keep "inst_errors" for me that would be for the checks. And for the squema of the instance i would use inst_squema_errors
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 have changed the way it is done. See if you like it.
""" | ||
checks = self.check() | ||
validator = Draft7Validator(self.schema_checks) | ||
if not validator.is_valid(checks): |
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.
It would be interesting to include a warning message when, despite the schema validation being correct, it is detected that the tables or columns of the json being validated are not in the schema. And print the tables or columns that are not being checked.
This applies to all schema validations.
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 you create an issue with this, because I do not think with the current jsonschema package taht we use is not possible but I will checkj it out, so I want to close this PR without this.
This PR should implement json schmea validation for instance, solution, instance checks and solution checks on the airflow side.
It should fix #575 and fix #576