Skip to content

Update & simplify message data model #39

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

Merged
merged 13 commits into from
Jan 20, 2025
Merged

Update & simplify message data model #39

merged 13 commits into from
Jan 20, 2025

Conversation

eemeli
Copy link
Member

@eemeli eemeli commented Jan 20, 2025

This builds on #38, and will need a rebase after that's merged. Actual diff here is reorg-paths...simpler-messages.

This applies the following upstream changes made to the MF2 data model:

Going further from there, the message data model is also made more ergonomic:

  • Declarations are required for SelectMessage, as at least one is needed for the selector.
  • Declarations are defined by a dict, rather than a list of (name, expression) tuples.
  • SelectMessage.selectors is a tuple, not a list.
  • FunctionAnnotation is flattened into Expression.function and Expression.options.

As far as I can tell, no external users should be impacted by these changes.

@eemeli eemeli requested a review from mathjazz January 20, 2025 11:32
Copy link
Contributor

@mathjazz mathjazz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't run the code, but nothing in the changes and tests stands our. r+

@eemeli eemeli merged commit c9ae3a4 into main Jan 20, 2025
11 checks passed
@eemeli eemeli deleted the simpler-messages branch January 20, 2025 17:52
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