Use FormulaStruct when loading formulae from the API
#21176
Draft
+119
−48
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.
This PR adds a new
FormulaStructto serve as an intermediary between the API and the formula loading inFormulary.This doesn't do much right now, but it is a good starting point to show that this idea will work. Eventually, this will be able to load from the internal API, and will be a bit more robust. Also, nested hashes should, ideally, become nested structs so we can do things like
formula_struct.urls.stable.checksum.Also, there are likely several optimizations that can happen here to make the
Formularylogic much cleaner, which I will continue to explore.