Thats a great solution! Maybe together with something like a config/setting file to store the preferred settings permanent? I am not sure if something like that already exist in tespy, but that might also be interesting for defining default units or similar settings.
Keeping the current display mode for background compatibility seems to be best practice, but is it really necessary? It shouldnt change the behavior of type checks like the following, because it still returns the object in the code:
isinstance(my_conn('c1').T, FluidProperties)
Originally posted by @HaSchneider in #1048 (reply in thread)
We can implement config file at global level and at project level that automatically apply the printout preferences. Also in those files there could be predefined unit sets, which can be applied in a model, e.g. Network.use_unit_preset("path/to/config.yaml", name="default|imperial|...") so you do not have to type out all the specifications yourself everytime. Note: units should only be applied on user action, because they affect the model, while display can be auto-applied as it does not affect anything in the simulation. There might be other things that could be integrated in that configuration file (e.g. logging, iterinfo, ...)
Thats a great solution! Maybe together with something like a config/setting file to store the preferred settings permanent? I am not sure if something like that already exist in tespy, but that might also be interesting for defining default units or similar settings.
Keeping the current display mode for background compatibility seems to be best practice, but is it really necessary? It shouldnt change the behavior of type checks like the following, because it still returns the object in the code:
isinstance(my_conn('c1').T, FluidProperties)Originally posted by @HaSchneider in #1048 (reply in thread)
We can implement config file at global level and at project level that automatically apply the printout preferences. Also in those files there could be predefined unit sets, which can be applied in a model, e.g. Network.use_unit_preset("path/to/config.yaml", name="default|imperial|...") so you do not have to type out all the specifications yourself everytime. Note: units should only be applied on user action, because they affect the model, while display can be auto-applied as it does not affect anything in the simulation. There might be other things that could be integrated in that configuration file (e.g. logging, iterinfo, ...)