Skip to content

Conversation

@rcourtier
Copy link
Member

@rcourtier rcourtier commented Oct 6, 2025

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)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?

No.

What kind of change does this PR introduce?

Bug fix.

What is the current behavior?

When CGMES input data have duplicate GeographicalRegion.rdf:Id but with different name, the CGMES import fails and throws an exception: "Substation should be null". This is due to the substations SPARQL query finding 2 Substation instead of one (1 PropertyBag with the first region name, and another PropertyBag with the second region name).

What is the new behavior (if this is a feature change)?

Only 1 Substation is returned by the SPARQL query in case of duplicate GeographicalRegion with different name. The lowest region name is kept.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

The method microGridBaseCaseDuplicateRegion() of CgmesConformity1ModifiedCatalog has been removed. It was used for unit testing, but it relied on big a CGMES file ; this slowed the tests execution. If you still need to use it you can retrieve the methods at this URL and the corresponding CGMES files in this directory.

Other information:

Original PR to fix duplicate in sub-region ids and region ids: #2507. The same logic is now applied to region name.

@rcourtier rcourtier self-assigned this Oct 6, 2025
@rcourtier rcourtier moved this from TODO to Waiting for review in Release 09/2025 Oct 6, 2025
@olperr1 olperr1 removed this from Release 09/2025 Oct 7, 2025
@olperr1 olperr1 moved this from TODO to Waiting for review in Release 12/2025 Oct 7, 2025
Signed-off-by: Romain Courtier <[email protected]>
Signed-off-by: Romain Courtier <[email protected]>
@rcourtier rcourtier force-pushed the fix_cgmes_import_duplicate_region_name branch from c515a2c to d551283 Compare October 9, 2025 09:12
Signed-off-by: Romain Courtier <[email protected]>
@sonarqubecloud
Copy link

@github-project-automation github-project-automation bot moved this from Waiting for review to Approved in Release 12/2025 Oct 16, 2025
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

4 participants