-
Notifications
You must be signed in to change notification settings - Fork 8
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 class and attribute types #40
Fix class and attribute types #40
Conversation
tom-hg57
commented
Oct 27, 2024
•
edited
Loading
edited
- Common:
- Fix some attribute types
- Fix handling of Decimal as float class
- Add class property "is_a_primitive_class" and attribute property "is_primitive_float_attribute"
- Improve _get_attribute_type in cimgen.py
- Improve setting of long profile names
- Refactor _merge_profiles and _merge_classes in cimgen.py
- Add "is_a_datatype_class" and "is_datatype_attribute" (stereotype == "CIMDatatype"), use these instead of "is_a_float_class" and "is_primitive_float_attribute"
- modernpython:
- Fix type and default of some attributes (for enums and attribute types Date, DateTime, MonthDay, Status, StreetAddress, StreetDetail, TownDetail)
- Rename writer.py to chevron_writer.py (to prevent conflicts with the new writer in https://github.com/zaphiro-technologies/cimgen/tree/xml-generation-and-parsing)
…Type2, WindContPType3IEC for cpp and modernpython Signed-off-by: Thomas Günther <[email protected]>
…primitive_float_attribute" Signed-off-by: Thomas Günther <[email protected]>
…nd attribute types Date, DateTime, MonthDay, Status, StreetAddress, StreetDetail, TownDetail) Signed-off-by: Thomas Günther <[email protected]>
Signed-off-by: Thomas Günther <[email protected]>
Signed-off-by: Thomas Günther <[email protected]>
Signed-off-by: Thomas Günther <[email protected]>
Signed-off-by: Thomas Günther <[email protected]>
Signed-off-by: Thomas Günther <[email protected]>
ad41d88
to
ab563b3
Compare
@tom-hg57 what is the motivation to copy all the libcimpp code here? For the base classes it might make sense but also including the handlers seems a little bit out of scope when compared to other languages. This would essentially merge the two projects. |
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 feel like this PR includes too many different things. Copying the cimpp code goes way beyond fixing some classes and attribute types and I don’t understand the motivation of copying all this over here.
… imported but unused) Signed-off-by: Thomas Günther <[email protected]>
… in modernpython/lang_pack.py Signed-off-by: Thomas Günther <[email protected]>
…"CIMDatatype"), use these instead of "is_a_float_class" and "is_primitive_float_attribute" There are now 4 disjoint class types: - is_a_datatype_class (= float) - is_an_enum_class - is_a_primitive_class (Integer, Boolean, Float/Decimal = float, String/Date/DateTime/MonthDay = string) - all others are normal classes and 5 disjoint attribute types: - is_class_attribute - is_enum_attribute - is_datatype_attribute - is_list_attribute - is_primitive_attribute Signed-off-by: Thomas Günther <[email protected]>
…nflicts with the new writer in https://github.com/zaphiro-technologies/cimgen/tree/xml-generation-and-parsing) Signed-off-by: Thomas Günther <[email protected]>
0fc5750
to
b2376a8
Compare
Quality Gate passedIssues Measures |
I've now removed most of the cpp changes and will put these into a new branch. |