Skip to content

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 force-pushed the feat/tunnel-modeling branch from b94f146 to 62d72d2 Compare July 25, 2024 12:50
@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
@hellais
Copy link
Member

hellais commented Jan 24, 2025

Do we still want to land something of this sort and run it?

Ideally we would somehow make this converge together with: #48

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