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

[WIP] Different extension's serialization names depending on the version #3282

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

olperr1
Copy link
Member

@olperr1 olperr1 commented Jan 21, 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

What is the current behavior?

What is the new behavior (if this is a feature change)?
Add several improvements on the extension serialization:

  • It is now possible to use another serialization name and/or XML namespace prefix when exporting an extension.
  • Previously, the XML namespace prefix could only have one value for an extension, determined by its SerDe class. Therefore, trying to import an XIIDM network containing an extension with a namespace prefix that didn't match the known prefix would fail. Now, the prefix could have any value supported by the XML format. (The prefix defined in the SerDe is now only used as a preferred one at export.)
  • When exporting a network in XIIDM, if several extensions have the same namespace prefix in their SerDe (which could happen when using custom extensions), duplicates are renamed. For instance, if several extensions have the same prefix 'foo', the first one will be named 'foo' and the others 'foo1', 'foo2', ...

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)

Other information:

@olperr1 olperr1 self-assigned this Jan 21, 2025
@olperr1 olperr1 changed the title Different extension's serialization names depending on the version [WIP] Different extension's serialization names depending on the version Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant