PR-6377 Add base ummg generation classes #34
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a stripped down version of our
UmmgBase
class to mandible. The idea is that theUmmgBase
class has aget_*
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 ownWorkflowUmmgBase
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 boilerplateget_*
functions.