Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Conversation

DecFox
Copy link
Contributor

@DecFox DecFox commented Apr 26, 2024

Create oonifindings service with clickhouse support
Closes #814

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):
Copy link
Member

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,
Copy link
Member

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
Copy link
Member

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):
Copy link
Member

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

@DecFox
Copy link
Contributor Author

DecFox commented May 8, 2024

I'll be rebasing this and pushing a new diff since we want to separate the pytest plugin work from the service

@DecFox DecFox closed this May 8, 2024
@DecFox DecFox deleted the issue/814-oonifindings branch May 8, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port findings platform over to new pattern
2 participants