Add powsybl-diagram version number to metadata output#803
Open
hqqw2h-lgtm wants to merge 2 commits intopowsybl:mainfrom
Open
Add powsybl-diagram version number to metadata output#803hqqw2h-lgtm wants to merge 2 commits intopowsybl:mainfrom
hqqw2h-lgtm wants to merge 2 commits intopowsybl:mainfrom
Conversation
Use ServiceLoader to resolve the powsybl-diagram version at startup and include it as a top-level 'diagramVersion' field in the metadata JSON output for both SLD and NAD diagrams. Closes powsybl#802 Signed-off-by: hanweiwei <duzielww@163.com> Made-with: Cursor
rolnico
requested changes
Apr 7, 2026
Member
rolnico
left a comment
There was a problem hiding this comment.
Hello,
Thanks for the PR!
There are a few things to fix:
- Could you follow the PR template for the PR description?
- The DCO does not pass on your first commit, could you fix it? It's missing the sign-off.
- There are many tests that do not pass now, since the expected files do not contain the diagram version yet. Could you fix them?
Member
|
Also, two unrelated things:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the
powsybl-diagramversion number to the metadata JSON output.A new top-level
diagramVersionfield is now included in the metadata JSON for both SLD (GraphMetadata) and NAD (DiagramMetadata) diagrams. The version is resolved at startup viaServiceLoaderfrom thePowsyblDiagramVersionSPI provider.Example output:
{ "diagramVersion" : "5.4.0-SNAPSHOT", ... }Changes
AbstractMetadata: addedgetDiagramVersion()method with@JsonProperty("diagramVersion")annotation, and@JsonPropertyOrderto ensure it appears first in the JSON output.Note
Golden test JSON files may need updating to include the new
diagramVersionfield. Happy to update them if needed.Closes #802