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

PR-6377 Add base ummg generation classes #34

Merged
merged 1 commit into from
Jan 29, 2025
Merged

PR-6377 Add base ummg generation classes #34

merged 1 commit into from
Jan 29, 2025

Conversation

reweeden
Copy link
Contributor

@reweeden reweeden commented Jan 14, 2025

Adds a stripped down version of our UmmgBase class to mandible. The idea is that the UmmgBase class has a get_* method for every possible UMM-G element. Elements that are required either get a default implementation if one makes sense or are marked as abstract methods. Workflows can define their own WorkflowUmmgBase subclasses to add additional workflow specific functionality to the base class.

Some optional elements that have nested fields also get a mixin class that can be used to pull in boilerplate get_* methods for sub elements. Some even provide a default implementation if that implementation was common enough in our workflows.

The idea for now is just to create a pretty bare bones starting point. There may be more functionality that is common enough to pull into mandible later. There is already a lot of code here because of the TypedDict definitions which give useful type hints and the large number of boilerplate get_* functions.

@reweeden reweeden force-pushed the rew/umm-classes branch 12 times, most recently from 8b9a3af to 69be2ba Compare January 17, 2025 19:16
@reweeden reweeden marked this pull request as ready for review January 17, 2025 19:22
@reweeden reweeden changed the title WIP: Add base ummg generation classes Add base ummg generation classes Jan 17, 2025
@reweeden reweeden changed the title Add base ummg generation classes PR-6377 Add base ummg generation classes Jan 21, 2025
Copy link
Contributor

@mattp0 mattp0 left a comment

Choose a reason for hiding this comment

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

I like the approach!

@reweeden reweeden merged commit 4acdd4e into main Jan 29, 2025
8 checks passed
@reweeden reweeden deleted the rew/umm-classes branch January 29, 2025 20:32
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.

3 participants