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

Cleanup of unused and naming improvements of existing paramters #180

Merged
merged 11 commits into from
Aug 21, 2023

Conversation

dellerDLR
Copy link
Contributor

First draft for the cleanup of the mass and power parameters.

AFAIK it is not possible to set a default value for a parameter.
As a result the PowerUnitIsActive cannot be assigned a default value of 1

Fixes #169

@dellerDLR dellerDLR added this to the Release 4.16.0 milestone Aug 15, 2023
@dellerDLR dellerDLR self-assigned this Aug 15, 2023
@dellerDLR dellerDLR force-pushed the feature/169-cleanup-unused-params branch from 3c64bbe to f631376 Compare August 15, 2023 12:36
Copy link
Member

@franzTobiasDLR franzTobiasDLR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looking good! Did you make sure that all manually written code in the UI snippet classes of the old parameters (if there is any?) is migrated to the new snippet classes?

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #180 (9951006) into development (53d48ec) will decrease coverage by 0.10%.
Report is 1 commits behind head on development.
The diff coverage is 33.33%.

❗ Current head 9951006 differs from pull request most recent head 9f22788. Consider uploading reports for the commit 9f22788 to get more accurate results

Impacted file tree graph

@@                Coverage Diff                @@
##             development     #180      +/-   ##
=================================================
- Coverage          87.85%   87.75%   -0.10%     
- Complexity           511      512       +1     
=================================================
  Files                 73       74       +1     
  Lines               1729     1732       +3     
  Branches             209      209              
=================================================
+ Hits                1519     1520       +1     
- Misses               139      141       +2     
  Partials              71       71              
Files Changed Coverage Δ
...sat/model/extension/cefx/migrator/Migrator1v1.java 33.33% <33.33%> (ø)

@dellerDLR dellerDLR force-pushed the feature/169-cleanup-unused-params branch from f631376 to 4aae9d6 Compare August 15, 2023 14:37
Copy link
Contributor

@pchrszon-dlr pchrszon-dlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Besides the inconsistent description of the changed parameter, I found no issues.

}

Category EquipmentPowerParameters {
Applicable For [de.dlr.sc.virsat.model.extension.ps.ElementDefinition, de.dlr.sc.virsat.model.extension.ps.ElementConfiguration, de.dlr.sc.virsat.model.extension.ps.ElementOccurence, de.dlr.sc.virsat.model.extension.ps.ElementRealization];
Cardinality 1;

Type powerUnitActive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is active in the given mode, 0 in case it is totally off.";
Type powerUnitIsInactive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is active in the given mode, 0 in case it is totally off.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the description still correct? I think it should say the opposite if the parameter is negated, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the description has to be updated

@dellerDLR
Copy link
Contributor Author

Nice, looking good! Did you make sure that all manually written code in the UI snippet classes of the old parameters (if there is any?) is migrated to the new snippet classes?

I also checked the de.dlr.sc.virsat.model.extension.cefx.ui.snippet package for occurences of the properties, but couldn't find any. So no migration is needed.

}

Category EquipmentPowerParameters {
Applicable For [de.dlr.sc.virsat.model.extension.ps.ElementDefinition, de.dlr.sc.virsat.model.extension.ps.ElementConfiguration, de.dlr.sc.virsat.model.extension.ps.ElementOccurence, de.dlr.sc.virsat.model.extension.ps.ElementRealization];
Cardinality 1;

Type powerUnitActive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is active in the given mode, 0 in case it is totally off.";
Type powerUnitIsInactive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is active in the given mode, 0 in case it is totally off.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description is still "Active" ^^ Pls update: I will add a suggestion that you can directly apply

}

Category EquipmentPowerParameters {
Applicable For [de.dlr.sc.virsat.model.extension.ps.ElementDefinition, de.dlr.sc.virsat.model.extension.ps.ElementConfiguration, de.dlr.sc.virsat.model.extension.ps.ElementOccurence, de.dlr.sc.virsat.model.extension.ps.ElementRealization];
Cardinality 1;

Type powerUnitActive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is active in the given mode, 0 in case it is totally off.";
Type powerUnitIsInactive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is active in the given mode, 0 in case it is totally off.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Type powerUnitIsInactive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is active in the given mode, 0 in case it is totally off.";
Type powerUnitIsInactive of Category Parameter quantityKind "Dimensionless" unit "No Unit" description "Should be 1 if the equipment is inactive in the given mode, meaning it is totally off.";

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't see that, I like your version more :D

@dellerDLR dellerDLR changed the title WIP: Feature/169 cleanup unused params Cleanup of unused and naming improvements of existing paramters Aug 16, 2023
@dellerDLR dellerDLR merged commit 0653d25 into development Aug 21, 2023
12 checks passed
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.

CEF-X: Can some parameter be removed from the parameter groups?
3 participants