-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Zavod validate step #673
Zavod validate step #673
Conversation
Missing entities can be caused by source. Self-reference too.
|
||
from zavod.entity import Entity | ||
from zavod.meta.assertion import Assertion, Comparison, Metric | ||
from zavod.exporters.statistics import Statistics |
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.
this feels a tad icky, but rather than move the Statistics object somewhere more general, I think once we want more fancy assertions, we'll build a dedicated aggregator and leave the exporter alone.
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.
no I like this a lot. Let's split it up early. The stats is part of our exposed interface so separating them makes a ton of sense to get ease of change for the validator.
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.
Do you mean I should implement statistics for the validator now, or use it as implemented here until we want a more powerful validator?
In this PR to see a dataset change in cI
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'm very excited about how this is implemented, just wonder if we should have more clearly defined notions of how we'd abort a botched validation. Throwing a RuntimeException works, but it's not the most elegant thing we could do :)
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.
Looks good to me, unless you want to do the Statistics fork now?
One thought: do we want to validate collections, too? Or just sources? Just in terms if how actionable the warnings are - it's all in the sources, no?
oh yes definitely makes sense not to run this on collections, so we can keep publishing even when one source is misbehaving. I fix. |
Adds validator interface used in
zavod run
andzavod validate
.zavod run
skips validation for collections.Both commands exit with non-zero status if an aborting validator triggers abort.