Closed blakeNaccarato closed 3 months ago
How can an Implementation
produce anything other than a str
as a result? Maybe instead, the Implementation
is always called in the absence of a certain form existing. How could this be cached, or need it be cached? If the python
form is missing, but is derived from the sympy
form, like solving for a particular variable, can that be done on the fly with each call?
Ultimately, we want to actually generate Python modules representing the symbolic and Python/numeric forms, which is easy for forms representable entirely as text. But what about complex forms that would otherwise require some pickling or binary storage? I don't want to ship binaries in boilercv
, or check pickles into version control, so Implementation
could represent how a given form can be produced from another.
For an Equation
, does that mean that the result of an Implementation
is a lambda function? Maybe we just have a Function
model which also has a forms
attribute, but its forms are the text you would eval
or write to a generated Python module. But you would need to hook up the imports properly, so an correlations.abc_1985
Python function would need to know how to import a correlations.symbolic.abc_1985
module. These could be a second attribute, modules
, which hold the module paths to be generated for each form.
Need to further document and test after merging #186. For now, just trying to get all equations modeled before going further into the documentation effort for this.
This meta-issue tracks the overall effort towards https://github.com/softboiler/boilercv/milestone/1.
185
189
194