You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #429, I introduced a backend api available at Calliope.Model.backend. E.g., to view parameters: model.backend.parameters; to update a parameter: model.backend.update_parameter("param_name", ...), etc.
If we wrapped the backend component arrays in a class, we could move some of this functionality more nested objects with associated methods, e.g., model.backend.parameters has each parameter as an attribute. these paramter classes can then be updated model.backend.parameters.param_name.update(...) or simply viewed: model.backend.parameters.param_name.data. The benefit of this is that you get tab autocompletion for free, and it is probably the more "pythonic" way to implement the API.
However, the current approach works. So maybe this is low priority to implement.
Calliope version
v0.7.0.dev
The text was updated successfully, but these errors were encountered:
Problem description
In #429, I introduced a backend api available at
Calliope.Model.backend
. E.g., to view parameters:model.backend.parameters
; to update a parameter:model.backend.update_parameter("param_name", ...)
, etc.If we wrapped the backend component arrays in a class, we could move some of this functionality more nested objects with associated methods, e.g.,
model.backend.parameters
has each parameter as an attribute. these paramter classes can then be updatedmodel.backend.parameters.param_name.update(...)
or simply viewed:model.backend.parameters.param_name.data
. The benefit of this is that you get tab autocompletion for free, and it is probably the more "pythonic" way to implement the API.However, the current approach works. So maybe this is low priority to implement.
Calliope version
v0.7.0.dev
The text was updated successfully, but these errors were encountered: