Skip to content

Support of all UTF-16 characters in IdWithWildcardsNetworkElementIdentifier #3342

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

olperr1
Copy link
Member

@olperr1 olperr1 commented Mar 4, 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)

Does this PR already have an issue describing the problem?

No

What kind of change does this PR introduce?

Feature

Does this PR introduce a new Powsybl Action implying to be implemented in simulators or pypowsybl?

  • Yes, the corresponding issue is here
  • No

What is the current behavior?

  • The only allowed characters in the IdWithWildcardsNetworkElementIdentifier pattern were from A to Z (capitalized or not), the digits, '_', '.' or '-'.
  • The wildcard was '?'.

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

  • All the UTF-16 characters are allowed in the pattern.
  • By default, the wildcard is '?', but the user can change this character if needed / wanted.

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 JSON serialization of IdWithWildcardsNetworkElementIdentifier now contains a wildcard attribute. When reading a JSON without this attribute, the default wildcard (?) is used.
  • As a consequence, the serializations of the following elements (which can contain a IdWithWildcardsNetworkElementIdentifier) are potentially impacted. Their serialization version numbers were increased:
Category Element Previous version New version
Action list ActionList 1.1 1.2
Contingency list IdentifierContingencyList 1.2 1.3
Contingency list ListOfContingencyLists 1.0 1.1

⚠️ The JSON serialized version of these elements (action or contingency list) may be not readable with older versions of PowSyBl.

Also, this change of serialization versions can have an impact on your unit tests (if you use a JSON serialized object as a reference).

Other information:

@olperr1 olperr1 changed the title Support of all characters in IdWithWildcardsNetworkElementIdentifier Support of all UTF-16 characters in IdWithWildcardsNetworkElementIdentifier Mar 4, 2025
Signed-off-by: Olivier Perrin <[email protected]>
@olperr1 olperr1 moved this from TODO to Waiting for review in Release 03/2025 Mar 4, 2025
@olperr1 olperr1 requested review from alicecaron and flo-dup March 4, 2025 14:57
@olperr1 olperr1 added the Breaking Change API is broken label Mar 4, 2025
@github-project-automation github-project-automation bot moved this from Waiting for review to Approved in Release 03/2025 Mar 4, 2025
@olperr1 olperr1 changed the title Support of all UTF-16 characters in IdWithWildcardsNetworkElementIdentifier Support of all UTF-16 characters in IdWithWildcardsNetworkElementIdentifier Mar 5, 2025
@olperr1 olperr1 changed the title Support of all UTF-16 characters in IdWithWildcardsNetworkElementIdentifier Support of all UTF-16 characters in IdWithWildcardsNetworkElementIdentifier Mar 5, 2025
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