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

Decoupling cells and layout, blocks and layout #380

Merged
merged 4 commits into from
Apr 5, 2022

Conversation

BenoitJeanson
Copy link
Contributor

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • 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 ? If so, link to this issue using '#XXX' and skip the rest
no

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
decoupling of subpackage from model by decoupling LayoutParameters and LayoutContext to avoid circular dependencies of subpackages.
(if any of the questions/checkboxes don't apply, please delete them entirely)

Signed-off-by: BenoitJeanson <benoit.jeanson@rte-france.com>
Signed-off-by: BenoitJeanson <benoit.jeanson@rte-france.com>
Copy link
Contributor

@flo-dup flo-dup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really nice work, grouping the calculation code in dedicated visitors makes it more readable - thanks! A few minor comments before merging it

@@ -0,0 +1,131 @@
/**
* Copyright (c) 2019, RTE (http://www.rte-france.com)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you change the header of the all the new added files by replacing 2019 by 2022?

* @author Benoit Jeanson <benoit.jeanson at rte-france.com>
*/
public class BlockCalculationVisitors {
LayoutParameters layoutParameters;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be final and private. But you can remove it in fact, BlockCalculationVisitors can be final, with private constructor and with only static methods.

Signed-off-by: BenoitJeanson <benoit.jeanson@rte-france.com>
Signed-off-by: BenoitJeanson <benoit.jeanson@rte-france.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

96.1% 96.1% Coverage
0.0% 0.0% Duplication

@flo-dup flo-dup merged commit 8e6d244 into main Apr 5, 2022
@flo-dup flo-dup deleted the NewDecouplingLayoutParameter branch April 5, 2022 12:53
@flo-dup flo-dup changed the title New decoupling layout parameter Decoupling cells and layout, blocks and layout Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants