-
Notifications
You must be signed in to change notification settings - Fork 17
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
1072 qc automate state properties in qualitycontrol and evaluation based on metric states #1074
1072 qc automate state properties in qualitycontrol and evaluation based on metric states #1074
Conversation
Coverage not at 100% yet Also replaced date with datetime in QCStatus
…ontrol-and-evaluation-based-on-metric-states
You can't do what I wanted (hide the _evaluation_status list) because pydantic doesn't serialize the field. So we have to keep the history exposed but we'll have to encourage people not to access it directly
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.
let's use the same datetime that we use throughout the schema.
I'm still a little confused by the structure overall - I might have you explain it for me again (or look with fresh eyes in the morning)
…ontrol-and-evaluation-based-on-metric-states
…ontrol-and-evaluation-based-on-metric-states
This PR now also closes two other issues that involved adding |
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 want to deal with the asset id separately. Otherwise I think it looks good.
…ontrol-and-evaluation-based-on-metric-states
…ontrol-and-evaluation-based-on-metric-states
This PR refactors the
overall_status
andevaluation_status
fields to built from the status of theQCMetric
objects in each evaluation. The complication to this PR is that it would require people to build QualityControl objects to use these features, if you dump to JSON and you don't re-validate as a model you can only access the private status lists indirectly. You can still use the schema without building the classes you just don't get access to the convenience functions that are defined using the@property
tags.Obviously the hope is that nobody has to deal with this stuff since the QC portal handles it for them.
I'll walk through the tests to explain how this works:
This object has status set for the metrics, but not for the evaluation or the full quality control object. If you now call:
You'll find that
self.assertEqual(q.overall_status.status, Status.PASS)
If you append a metric to one of the evaluations that is set to
Status.PENDING
orFAIL
the evaluation status and the overall status will subsequently resolve to that state:Timestamps automatically get set to
datetime.now()
unless the user specifies a timestamp, to allow for generating the qc.json separately from the actual processing that happened.