-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Is your feature request related to a problem? Please describe.
Hi SDK team,
We recently came across a set of use cases where the ability to update template expressions via the Python API would have been extremely useful.
_Use case 1: xxx --> @FlorianVolue
They received a list of template expressions extracted from an old database that they now have to copy and paste manually into a new model.
_Use case 2: yyy --> @stefanosala99
They want to transfer timeseries template calculations from pre-production to production.
Use Case 3 - Python Best Practice for reading out and comparing two system environments --> @AKRittinghausen
Here, we started an initiative to promote coding best practices for consultants. The aim is to present the mesh model structure in a human-readable format, enabling consultants to track changes in template calculations and model tree structure Volue/BestPractice_TestProdCopy. If there were an option to write template calculations, it would be possible to "merge" or "synchronise" two systems without having to copy and paste between them, e.g. by using .diff files.
Describe the solution you'd like
From what we understand, there is currently no option to write template calculations into Mesh using the Python SDK. However, there is the option to write local calculations into Mesh using the update_timeseries_attribute() method.
While we recognise the potential risks of updating template expressions via the Python interface, we also recognise the significant use case for it. We understand that when adding template calculations via the calculator, an additional syntax check is performed by the 'Validate expression' button.
However, perhaps this is something that could be incorporated into the Python SDK also? And, to be fair, the "validate button" does not really prevent one from saving nonsense to calculator, either 😄
Describe alternatives you've considered
That would probably be manual copy paste