-
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
Primitives, enum and CIM_datatype #39
base: master
Are you sure you want to change the base?
Primitives, enum and CIM_datatype #39
Conversation
ca8f3d0
to
ddcd22b
Compare
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
…atype Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
26640c4
to
a0d0068
Compare
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Improved var names for better readability Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
… defined as dict Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
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.
This is fine apart from the failing formatting check. Thanks!
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Signed-off-by: HUG0-D <[email protected]>
Quality Gate passedIssues Measures |
@HUG0-D not necessarily linked to this PR, but it seems we have lot of annotations that may be redundant in attributes:
|
Enum classes
Correctly defining classes with defined values, using Enum. (Issue: #38 )
Examples:
UnitSymbol
orUnitMultiplier
Primitives classes
The current model generates classes for primitives, which are then rarely used to define the other classes.
Instead of creating individual classes for each primitives, a generic
Primitive
class is created.Examples:
Float = Primitive(name="Float", type=float, profiles=[Profile.EQBD, Profile.OP, Profile.SSH, Profile.EQ, Profile.DY, Profile.DL, Profile.SV, Profile.SC, ])
Common CIMDatatype class
The current model generates datatypes that are then never used in the cim classes (example:
CurrentFlow
).Instead of creating multiple unused classes with the same attributes (multiplier, unit, value), this pr creates a generic
CIMDatatype
class. (Issue: #38 )Examples:
CurrentFlow = CIMDatatype(name="CurrentFlow", type=float, symbol=UnitSymbol.A, multiplier=UnitMultiplier.none, profiles=[Profile.SSH,Profile.EQ,Profile.SV,Profile.SC,])
Annotation of the data type
As said above, the newly created datatypes are added as annotation (
data_type
) when creating the other classes.