- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
GRH suggestion voltage level refacto #303
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
GRH suggestion voltage level refacto #303
Conversation
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.
some minor comments, it seems good to me
| .identifiableShortCircuit(ExtensionUtils.toIdentifiableShortCircuit(voltageLevel)) | ||
| .build(); | ||
| if (voltageLevel.getTopologyKind().equals(TopologyKind.NODE_BREAKER)) { | ||
| VoltageLevelFormInfos barSectionsInfos = getVoltageLevelBusBarSectionsInfos(voltageLevel); | 
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.
| VoltageLevelFormInfos barSectionsInfos = getVoltageLevelBusBarSectionsInfos(voltageLevel); | |
| VoltageLevelFormInfos busBarSectionsInfos = getVoltageLevelBusBarSectionsInfos(voltageLevel); | 
|  | ||
| SWITCHES("switches"), | ||
| FEEDER_BAYS("feeder_bays"), | ||
| BUSBAR_SECTIONS("busbar_sections"); | 
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.
@etiennehomer is it good for you ? we send a list of enum to the back to dertermine what we want
| public static BusBarSectionsInfos getBusBarSectionsInfos(VoltageLevel voltageLevel) { | ||
| Map<Integer, Integer> nbSectionsPerBusbar = new HashMap<>(); | ||
| List<BusBarSectionFormInfos> busbarSectionInfos = new ArrayList<>(); | ||
| BusBarSectionsInfos busBarSectionsInfos = BusBarSectionsInfos.builder() | 
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 you can keep the builder and call build() only at the end of the method ?
| VoltageLevel voltageLevel = network.getVoltageLevel(voltageLevelId); | ||
| if (voltageLevel.getTopologyKind().equals(TopologyKind.NODE_BREAKER)) { | ||
| return TopologyUtils.getTopologyInfos(voltageLevel); | ||
| TopologyInfos topologyInfos = TopologyInfos.builder().build(); | 
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.
same you can use the builder, fill the selected fields and then call .build()
| 
 | 



No description provided.