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

Remove iidm converter api #2350

Merged
merged 22 commits into from
Nov 3, 2022
Merged

Remove iidm converter api #2350

merged 22 commits into from
Nov 3, 2022

Conversation

geofjamg
Copy link
Member

@geofjamg geofjamg commented Nov 2, 2022

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • 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 ? If so, link to this issue using '#XXX' and skip the rest
No

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Redesign of network loading and saving API

What is the current behavior? (You can also link to an open issue here)
We can import/export or load/save a network using utility classes Importers and Exporters.

What is the new behavior (if this is a feature change)?
We have removed the iidm-converter-api module and moved everything to iidm-api and all loading and saving functions have been moved to Network class

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

geofjamg and others added 15 commits September 1, 2022 21:39
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
# Conflicts:
#	cgmes/cgmes-conversion/src/test/java/com/powsybl/cgmes/conversion/test/export/EquipmentExportTest.java
#	cgmes/cgmes-conversion/src/test/java/com/powsybl/cgmes/conversion/test/export/StateVariablesExportTest.java
#	iidm/iidm-xml-converter/src/main/java/com/powsybl/iidm/xml/IidmImportExportMode.java
#	iidm/iidm-xml-converter/src/main/java/com/powsybl/iidm/xml/XMLExporter.java
#	iidm/iidm-xml-converter/src/main/java/com/powsybl/iidm/xml/XMLImporter.java
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
# Conflicts:
#	cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/CgmesExport.java
#	cgmes/cgmes-conversion/src/test/java/com/powsybl/cgmes/conversion/test/export/EquipmentExportTest.java
#	cgmes/cgmes-conversion/src/test/java/com/powsybl/cgmes/conversion/test/export/StateVariablesExportTest.java
#	cgmes/cgmes-conversion/src/test/java/com/powsybl/cgmes/conversion/test/export/TopologyExportTest.java
#	iidm/iidm-converter-api/pom.xml
#	powerfactory/powerfactory-converter/pom.xml
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
@geofjamg geofjamg requested a review from miovd November 2, 2022 21:23
@geofjamg geofjamg added IIDM Breaking Change API is broken labels Nov 2, 2022
Copy link
Contributor

@miovd miovd left a comment

Choose a reason for hiding this comment

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

It seems to me that a save method implies that it is saved in a database or an object, which is okay when saved in a datasource but less obvious when we want to write a network in a file. It is just a remark though and I don't have a better name idea. Maybe discriminate with write when passing a path or a file/directory name, save otherwise?

@geofjamg
Copy link
Member Author

geofjamg commented Nov 3, 2022

It seems to me that a save method implies that it is saved in a database or an object, which is okay when saved in a datasource but less obvious when we want to write a network in a file. It is just a remark though and I don't have a better name idea. Maybe discriminate with write when passing a path or a file/directory name, save otherwise?

I just wanted to be symmetrical with 'load' as load and save are often used together.
You are probably right, write is better but in that case I rename load to read ?

var n = Network.read("/tmp/toto.xiidm")
n.write(("UCTE", "/tmp/tutu.uct")

Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
# Conflicts:
#	security-analysis/security-analysis-api/src/main/java/com/powsybl/security/tools/SecurityAnalysisTool.java
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: VEDELAGO MIORA <miora.ralambotiana@rte-france.com>
@miovd miovd force-pushed the remove_iidm_converter_api branch from 47f6f90 to de7b9ca Compare November 3, 2022 14:38
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 3, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

78.0% 78.0% Coverage
0.8% 0.8% Duplication

@miovd miovd merged commit b8476d7 into main Nov 3, 2022
@miovd miovd deleted the remove_iidm_converter_api branch November 3, 2022 14:54
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.

2 participants