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

Issue 87 - Display standard networks in powsybl-dev-tools #92

Merged
merged 7 commits into from
Feb 13, 2024

Conversation

tadam50
Copy link
Contributor

@tadam50 tadam50 commented Jan 23, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?
'Fixes #87'

@tadam50
Copy link
Contributor Author

tadam50 commented Jan 23, 2024

Expected behavior can be realized as following example:
issue-87-2

@flo-dup flo-dup force-pushed the 87-display-standard-networks-in-powsybl-dev-tools branch from 0eda12c to 2887ce2 Compare February 5, 2024 10:35
flo-dup
flo-dup previously requested changes Feb 5, 2024
Copy link
Contributor

@flo-dup flo-dup left a comment

Choose a reason for hiding this comment

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

Really nice feature I wanted to add for ages! just the way to get the network should be done differently.

diagram-viewer/pom.xml Outdated Show resolved Hide resolved
@tadam50 tadam50 force-pushed the 87-display-standard-networks-in-powsybl-dev-tools branch from 2887ce2 to dda21b9 Compare February 6, 2024 15:19
Signed-off-by: Thomas ADAM <[email protected]>
@tadam50 tadam50 force-pushed the 87-display-standard-networks-in-powsybl-dev-tools branch from 71455a0 to d89b49e Compare February 6, 2024 15:54
@@ -152,6 +156,37 @@ public TreeItem<Container<?>> fromString(String string) {
sldViewController.addListener((observable, oldValue, newValue) -> updateSldDiagrams());
}

private void initializeNetworkFactories() {
Map<String, Supplier<Network>> suppliers = new HashMap<>();
suppliers.put("BatteryNetwork", com.powsybl.iidm.network.test.BatteryNetworkFactory::create);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add import com.powsybl.iidm.network.test.*; so that these lines are more compact?

@@ -14,6 +14,7 @@
<Button fx:id="loadingStatus" minWidth="28" style="-fx-background-color: red"/>
<TextField fx:id="filePath" prefWidth="900" HBox.hgrow="ALWAYS" maxWidth="Infinity"/>
<Button onMouseClicked="#onClickLoadFile" text="..."/>
<MenuButton fx:id="networkFactoryMenuButton" text="Networks" minWidth="100"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

And maybe just rename "Networks" into something like "Sample networks"?

Copy link

@So-Fras So-Fras dismissed flo-dup’s stale review February 13, 2024 15:13

Comments taken into account by @tadam50 + discussed with @flo-dup before he left on holiday

@So-Fras So-Fras merged commit 216cdb2 into main Feb 13, 2024
4 checks passed
@So-Fras So-Fras deleted the 87-display-standard-networks-in-powsybl-dev-tools branch February 13, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display standard networks in powsybl-dev-tools
3 participants