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

Refactor grouped queries in CgmesModel #3238

Draft
wants to merge 7 commits into
base: use_endnumber_for_powertransformerend_numbering
Choose a base branch
from

Conversation

rcourtier
Copy link
Member

@rcourtier rcourtier commented Dec 2, 2024

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?

Refactoring.

What is the current behavior?

There is a lack of consistency in the methods of CgmesModel that fetch data based on a common object ID. The methods don't have a similar naming, nor do they have a similar signature, and nor are they implemented in the same way and in the same class.
For instance:

  • ratioTapChangerTable (table points grouped by table) // groupedTransformerEnds (transformer ends grouped by transformer)
  • PropertyBags ratioTapChangerTable(String tableId) // Map<String, PropertyBags> groupedTransformerEnds()
  • ratioTapChangerListForPowerTransformer (caching is done in Context) // nonlinearShuntCompensatorPoints (caching is done in AbstractCgmesModel)

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

Grouped queries now are implemented in a more consistent way, with a similar naming, a similar signature and a similar implementation in AbstractCgmesModel with final caches.

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:

@rcourtier rcourtier force-pushed the refactor_cgmesmodel_grouped_queries branch from ea68a93 to 860acf3 Compare December 2, 2024 15:22
@rcourtier rcourtier self-assigned this Dec 4, 2024
@rcourtier rcourtier force-pushed the refactor_cgmesmodel_grouped_queries branch from 80d5838 to d7f5aed Compare December 9, 2024 09:21
@rcourtier rcourtier force-pushed the use_endnumber_for_powertransformerend_numbering branch from 4e1fd3d to f680d6a Compare December 9, 2024 09:23
@rcourtier rcourtier force-pushed the refactor_cgmesmodel_grouped_queries branch from d7f5aed to b4c9a64 Compare December 9, 2024 09:24
…lisions with queries methods

Signed-off-by: Romain Courtier <[email protected]>
Copy link

sonarcloud bot commented Dec 9, 2024

@rcourtier rcourtier added the Breaking Change API is broken label Dec 9, 2024
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.

1 participant