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

refactored type annotation to be able to resuse union types #429

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

tylerflex
Copy link
Collaborator

  • moves TYPE_TAG_STR to types.py
  • introduces annotate_type(UnionType) function to wrap the adding of discriminator to Union[...] type.
  • puts annotations directly in Field() definitions with Tuple[Union[], ...] fields
  • adds discriminator to pd.Fiedl() for Union[] fields.

Copy link
Contributor

@shashwat-sh shashwat-sh left a comment

Choose a reason for hiding this comment

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

Looks good to me. I'm having unrelated problems with compiling the solver after the recent CMake changes, so I wasn't able to run backend tests. But since the frontend test_IO is passing, there probably shouldn't be any issues.

@tylerflex tylerflex merged commit f32bf08 into develop Jun 30, 2022
@tylerflex tylerflex deleted the tyler/union_discriminators branch June 30, 2022 20:27
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