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/tunnel modeling #63

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

ainghazal
Copy link

work in progress; pushing for discussion on the data modelling and needed granularity.

@ainghazal ainghazal marked this pull request as draft April 18, 2024 12:24
@ainghazal ainghazal requested a review from hellais April 18, 2024 12:24
@hellais
Copy link
Member

hellais commented Jul 12, 2024

Leaving here some links following our discussion.

You will have to adjust the models to make use of the new table_model decorator and use composition instead of inheritance for the meta fields. See: https://github.com/ooni/data/blob/main/oonidata/src/oonidata/models/observations.py#L344 as an example.

What was already missing and needs to be added is support for your test inside of the transforms: https://github.com/ooni/data/blob/main/oonipipeline/src/oonipipeline/transforms/observations.py#L27

To see how this is actually used, check the temporal activity: https://github.com/ooni/data/blob/main/oonipipeline/src/oonipipeline/temporal/activities/observations.py

It's also worth reading the docs of temporal to understand what you should do and not do inside of an activity and workflow.

If you want your tables to be created automatically via the --create-tables flag (you probably do), you should also add your table to this list: https://github.com/ooni/data/blob/main/oonipipeline/src/oonipipeline/db/create_tables.py#L146

Finally, you mentioned interest in making use of scheduled operations. You can see an example of how to set this up here: https://github.com/ooni/data/blob/main/oonipipeline/src/oonipipeline/temporal/workflows.py#L208, though note that this is currently not used in production and I haven't tested it heavily.

@ainghazal ainghazal changed the title WIP: feat/tunnel modeling feat/tunnel modeling Sep 30, 2024
@ainghazal ainghazal marked this pull request as ready for review September 30, 2024 14:38
@ainghazal ainghazal self-assigned this Sep 30, 2024
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.

2 participants