From 4a25abafc00f87f2c3736dedbe9ac7d7a6724e7e Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Mon, 3 Jul 2023 16:49:19 +0200 Subject: [PATCH 1/7] update to java 17 Signed-off-by: Sophie Frasnedo --- pom.xml | 2 +- .../com/powsybl/sld/iidm/TestFeederInfos.java | 8 +- ....svg => TestFormattingFeederInfosNBSP.svg} | 0 .../TestFormattingFeederInfosNNBSP.svg | 195 ++++++++++++++++++ 4 files changed, 203 insertions(+), 2 deletions(-) rename single-line-diagram/single-line-diagram-core/src/test/resources/{TestFormattingFeederInfos.svg => TestFormattingFeederInfosNBSP.svg} (100%) create mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNNBSP.svg diff --git a/pom.xml b/pom.xml index 54ff8ded4..92bfc7e76 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ - 11 + 17 ../distribution-diagram/target/site/jacoco-aggregate/jacoco.xml, diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java index 73125b53a..d13cad1c5 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java @@ -136,7 +136,13 @@ void testFrenchFormatting() { voltageLevelGraphLayout(g); // write SVG and compare to reference - assertEquals(toString("/TestFormattingFeederInfos.svg"), toSVG(g, "/TestFormattingFeederInfos.svg")); + String resourceName; + if (Runtime.version().feature() >= 13) { + resourceName = "/TestFormattingFeederInfosNNBSP.svg"; + } else { + resourceName = "/TestFormattingFeederInfosNBSP.svg"; + } + assertEquals(toString(resourceName), toSVG(g, "/TestFormattingFeederInfos.svg")); } @Test diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNBSP.svg similarity index 100% rename from single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg rename to single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNBSP.svg diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNNBSP.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNNBSP.svg new file mode 100644 index 000000000..8fcd4a626 --- /dev/null +++ b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNNBSP.svg @@ -0,0 +1,195 @@ + + + + + + + + bbs + + + + + + + + + + + + + + + + + + 1 200,3 + + + + + -1,0 + + + + + + + + + + + + + + + + + + + + l + + + + From d853223eee4d308bc3687226813ed90ca0c97854 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 4 Jul 2023 09:40:44 +0200 Subject: [PATCH 2/7] update to java 17 in github workflow Signed-off-by: Sophie Frasnedo --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 4464789b1..2f45e727d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'zulu' - java-version: 11 + java-version: 17 - name: Build with Maven run: mvn --batch-mode -P jacoco,checks package From ce4eb07843c29794652a53b2a7a9963233f289c8 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 4 Jul 2023 10:25:49 +0200 Subject: [PATCH 3/7] update powsybl-parent version Signed-off-by: Sophie Frasnedo --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 92bfc7e76..e28485ca2 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ com.powsybl powsybl-parent - 9 + 11 powsybl-diagram From 2258afda00ae656a623740966add723782a3e95b Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 4 Jul 2023 11:26:44 +0200 Subject: [PATCH 4/7] remove useless condition branch in test Signed-off-by: Sophie Frasnedo --- .../com/powsybl/sld/iidm/TestFeederInfos.java | 13 +- .../TestFormattingFeederInfosNBSP.svg | 195 ------------------ 2 files changed, 1 insertion(+), 207 deletions(-) delete mode 100644 single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNBSP.svg diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java index d13cad1c5..727fb5883 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java @@ -8,8 +8,6 @@ import com.powsybl.diagram.test.Networks; import com.powsybl.ieeecdf.converter.IeeeCdfNetworkFactory; - -import com.powsybl.iidm.network.*; import com.powsybl.iidm.network.extensions.ConnectablePosition; import com.powsybl.sld.builders.NetworkGraphBuilder; import com.powsybl.sld.model.coordinate.Direction; @@ -31,9 +29,6 @@ import java.util.*; import static com.powsybl.sld.library.ComponentTypeName.*; - -import static com.powsybl.sld.library.ComponentTypeName.ARROW_ACTIVE; -import static com.powsybl.sld.library.ComponentTypeName.ARROW_REACTIVE; import static org.junit.jupiter.api.Assertions.assertEquals; /** @@ -136,13 +131,7 @@ void testFrenchFormatting() { voltageLevelGraphLayout(g); // write SVG and compare to reference - String resourceName; - if (Runtime.version().feature() >= 13) { - resourceName = "/TestFormattingFeederInfosNNBSP.svg"; - } else { - resourceName = "/TestFormattingFeederInfosNBSP.svg"; - } - assertEquals(toString(resourceName), toSVG(g, "/TestFormattingFeederInfos.svg")); + assertEquals(toString("/TestFormattingFeederInfosNNBSP.svg"), toSVG(g, "/TestFormattingFeederInfos.svg")); } @Test diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNBSP.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNBSP.svg deleted file mode 100644 index 9525577e4..000000000 --- a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNBSP.svg +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - bbs - - - - - - - - - - - - - - - - - - 1 200,3 - - - - - -1,0 - - - - - - - - - - - - - - - - - - - - l - - - - From c4b3a8a56b3dbac3130b2fc17f5b10ad26e46009 Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Tue, 4 Jul 2023 11:31:17 +0200 Subject: [PATCH 5/7] fix import problem (imports were deleted by mistake) Signed-off-by: Sophie Frasnedo --- .../src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java index 727fb5883..91cf50f19 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java @@ -8,6 +8,8 @@ import com.powsybl.diagram.test.Networks; import com.powsybl.ieeecdf.converter.IeeeCdfNetworkFactory; + +import com.powsybl.iidm.network.*; import com.powsybl.iidm.network.extensions.ConnectablePosition; import com.powsybl.sld.builders.NetworkGraphBuilder; import com.powsybl.sld.model.coordinate.Direction; @@ -29,6 +31,9 @@ import java.util.*; import static com.powsybl.sld.library.ComponentTypeName.*; + +import static com.powsybl.sld.library.ComponentTypeName.ARROW_ACTIVE; +import static com.powsybl.sld.library.ComponentTypeName.ARROW_REACTIVE; import static org.junit.jupiter.api.Assertions.assertEquals; /** From b63c9e5a73c8c5ece58d7aa9f670e5f4a48d410f Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Fri, 21 Jul 2023 13:36:19 +0200 Subject: [PATCH 6/7] remove NNBS from name file Signed-off-by: Sophie Frasnedo --- .../src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java | 2 +- ...attingFeederInfosNNBSP.svg => TestFormattingFeederInfos.svg} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename single-line-diagram/single-line-diagram-core/src/test/resources/{TestFormattingFeederInfosNNBSP.svg => TestFormattingFeederInfos.svg} (100%) diff --git a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java index 91cf50f19..73125b53a 100644 --- a/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java +++ b/single-line-diagram/single-line-diagram-core/src/test/java/com/powsybl/sld/iidm/TestFeederInfos.java @@ -136,7 +136,7 @@ void testFrenchFormatting() { voltageLevelGraphLayout(g); // write SVG and compare to reference - assertEquals(toString("/TestFormattingFeederInfosNNBSP.svg"), toSVG(g, "/TestFormattingFeederInfos.svg")); + assertEquals(toString("/TestFormattingFeederInfos.svg"), toSVG(g, "/TestFormattingFeederInfos.svg")); } @Test diff --git a/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNNBSP.svg b/single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg similarity index 100% rename from single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfosNNBSP.svg rename to single-line-diagram/single-line-diagram-core/src/test/resources/TestFormattingFeederInfos.svg From 05d5450ddcf5bbb1912b6f7e132407087cf6febb Mon Sep 17 00:00:00 2001 From: Sophie Frasnedo Date: Fri, 21 Jul 2023 13:37:51 +0200 Subject: [PATCH 7/7] align powsybl-diagram pom parent version with powsybl-core pom parent version Signed-off-by: Sophie Frasnedo --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 707fc57fd..e7a38f5f0 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ com.powsybl powsybl-parent - 11 + 10 powsybl-diagram