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
min, max properties for IntegerParamter and FloatParameter
index property for EnumParameter
default property (per instance) for all Parameters
set_with_boundary() method for IntegerParamter and FloatParameter
reset() method for all Parameters
Name and String validation: investigate the differences
investigate escaping requirements for str values
explicit setter for draft variable as value
Rationale
The current interaction with Parameter (get_value and set_value) is very cumbersome for Python. One would expect that
abc = componentx.collectiony.paramz
yields the result directly.
Furthermore, one would expect to set the value of a parameter just like this:
componentx.collectiony.paramz = xyz
instead of with the set_value() method.
However, there are a few features that parameters need to support:
min, max values should be respected in setters (for int, float)
nice to have: string and name parameters should be distinguishable, including an easy way to apply enumeration to names (if there is any difference between them)
draft variables need to be supported → "$XY" has to be evaluated by scanning the draft for matching rtds_draft_var components
resolving draft variables could be a method in the Draft class or a method of the Parameter class that takes a dictionary with available draft variables
Thoughts:
Parameters don't need their key attribute (this is all handled in the collection).
Explicit getters and setters could be hidden via auto-generated properties in collections.
BUT: when getting the value of a parameter, we need a way to specify if we want the raw value or the evaluated value (or always return the raw value and check for possible variables in the calling code)
Maybe implementing the value as a property would be a viable compromise
The from_str option could be implemented as a factory (class) method
The text was updated successfully, but these errors were encountered:
Tasks
Rationale
The current interaction with Parameter (get_value and set_value) is very cumbersome for Python. One would expect that
yields the result directly.
Furthermore, one would expect to set the value of a parameter just like this:
instead of with the
set_value()
method.However, there are a few features that parameters need to support:
rtds_draft_var
componentsDraft
class or a method of theParameter
class that takes a dictionary with available draft variablesThoughts:
from_str
option could be implemented as a factory (class) methodThe text was updated successfully, but these errors were encountered: