-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: oonifindings service #845
Conversation
This creates a pytest plugin for clickhouse using the clickhouse docker image as the executor
Create oonifindings service with clickhouse support
|
||
|
||
@pytest.fixture | ||
def clickhouse_migration(clickhouse): |
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.
We should for the time being swap this out for pytest-docker based approach: https://github.com/ooni/data/blob/main/oonipipeline/tests/conftest.py#L39
# TODO(decfox): try using OONIFindings.validate_model to populate model | ||
for incident in incidents: | ||
incident_model = OONIFinding( | ||
incident_id=incident.id, |
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 should be changed to be id
instead of incident_id
|
||
|
||
class OONIFindingBase(BaseModel): | ||
incident_id: str |
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.
You can use alias to change the serialization: https://docs.pydantic.dev/latest/concepts/fields/#field-aliases
return q[0]["cnt"] > 0 | ||
|
||
|
||
class OONIFindingsUpdate(BaseModel): |
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.
Probably rename this to not conflict with the other OONIFindingsUpdate
I'll be rebasing this and pushing a new diff since we want to separate the pytest plugin work from the service |
Create oonifindings service with clickhouse support
Closes #814