Skip to content

Conversation

@ghazwarhili
Copy link
Contributor

No description provided.

@ghazwarhili ghazwarhili changed the base branch from main to refactor-voltage-level-topology October 20, 2025 12:46
Copy link
Contributor

@EtienneLt EtienneLt left a 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);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
VoltageLevelFormInfos barSectionsInfos = getVoltageLevelBusBarSectionsInfos(voltageLevel);
VoltageLevelFormInfos busBarSectionsInfos = getVoltageLevelBusBarSectionsInfos(voltageLevel);


SWITCHES("switches"),
FEEDER_BAYS("feeder_bays"),
BUSBAR_SECTIONS("busbar_sections");
Copy link
Contributor

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()
Copy link
Contributor

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();
Copy link
Contributor

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()

@sonarqubecloud
Copy link

@ghazwarhili ghazwarhili merged commit d8a599f into refactor-voltage-level-topology Oct 29, 2025
4 checks passed
@ghazwarhili ghazwarhili deleted the GRH-suggestion-voltage-level-refacto branch October 29, 2025 08:29
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