Skip to content
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

Merged
merged 12 commits into from
Nov 16, 2024

Conversation

tom-hg57
Copy link
Collaborator

@tom-hg57 tom-hg57 commented Oct 27, 2024

  • 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:

…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]>
@tom-hg57 tom-hg57 force-pushed the fix-class-and-attribute-types branch from ad41d88 to ab563b3 Compare October 31, 2024 02:23
@m-mirz
Copy link
Contributor

m-mirz commented Nov 8, 2024

@tom-hg57 could you please add a description summarizing the most important changes? The same goes for #41

@m-mirz
Copy link
Contributor

m-mirz commented Nov 16, 2024

@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.

@m-mirz m-mirz self-assigned this Nov 16, 2024
Copy link
Contributor

@m-mirz m-mirz left a 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.

… 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]>
@tom-hg57 tom-hg57 force-pushed the fix-class-and-attribute-types branch from 0fc5750 to b2376a8 Compare November 16, 2024 14:37
@tom-hg57
Copy link
Collaborator Author

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.

I've now removed most of the cpp changes and will put these into a new branch.

@tom-hg57 tom-hg57 requested a review from m-mirz November 16, 2024 14:54
@m-mirz m-mirz merged commit 8010364 into sogno-platform:master Nov 16, 2024
8 checks passed
@tom-hg57 tom-hg57 deleted the fix-class-and-attribute-types branch November 16, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants