-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix in _create_custom_type #722
base: master
Are you sure you want to change the base?
Conversation
-fix prop name because of dataclass prop names -add modelingrule (otherwise the props will not be instantiated)
i guess we should add typing!? |
would like to change the tests aswell (API-Change)! it makes more sence to let a variant decide the initial value and have the option to predefine a default value by the user!? |
""" | ||
properties: [iterable(<name>, <ua.Variant>, <datatype>), ...] | ||
variables: [iterable(<name>, <ua.Variant>, <datatype>), ...] | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not even knew these arguments existed. Why can't we add variable and properties in a new call by adding children to the created type node? That is much more flexible and does not take much longer to type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont know! stumbled over it and realised that it does not work that well ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe better flag is as depcrecated then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delay!
flagging it as depricated will not solve the issue... if you use it you can create a type but it has no modelling rules so our instantiate method will just instantiate the objectnode!
the only thing i added is that i like to pass a list of iterable(name, Variant, Datatype) so the default value for that type can be added via the Variant!
in my opinion a nice feature and i would like to keep it ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but add a small test to make sure it works. Add something in test_common..py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure! need to make some changes on the existing tests aswell as some for that specific case!
-fix prop name because of dataclass prop names
-add modelingrule (otherwise the props will not be instantiated)