Skip to content

add Line segments infos#172

Open
basseche wants to merge 1 commit intomainfrom
add_LineSegmentInfos_LineCreation
Open

add Line segments infos#172
basseche wants to merge 1 commit intomainfrom
add_LineSegmentInfos_LineCreation

Conversation

@basseche
Copy link
Copy Markdown
Contributor

@basseche basseche commented Mar 24, 2026

PR Summary

Add Line segments infos to line creation infos

Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
@basseche basseche self-assigned this Mar 24, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

📝 Walkthrough

Walkthrough

Two new data structures were added to support line segment information in line creation modifications. A new LineSegmentInfos record was created to represent segment details, and the LineCreationInfos class was extended with a lineSegments field to carry a list of these segments.

Changes

Cohort / File(s) Summary
New Line Segment Data Structure
src/main/java/org/gridsuite/modification/dto/LineSegmentInfos.java
Added a new public record with five components: segmentTypeId, segmentDistanceValue, area, temperature, and shapeFactor to represent individual line segment information.
Line Creation Enhancement
src/main/java/org/gridsuite/modification/dto/LineCreationInfos.java
Added a lineSegments field of type List<LineSegmentInfos> with Swagger schema annotation to store segments used from catalogue. Lombok-generated getter/setter included.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes—adding line segments information to the LineCreationInfos entity.
Description check ✅ Passed The PR description accurately describes the changeset, stating the intent to add line segments information to line creation entity, which aligns with the actual code changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/main/java/org/gridsuite/modification/dto/LineCreationInfos.java`:
- Around line 50-51: The new DTO field lineSegments
(LineCreationInfos.lineSegments / getLineSegments()) is accepted but never used
in LineCreation.check() or LineCreation.apply(), causing a silent no-op; add a
fail-fast validation in LineCreation.check() that detects a non-null/non-empty
dto.getLineSegments() and throws a clear validation exception (or
IllegalArgumentException/ValidationException consistent with existing error
handling) stating that lineSegments is not yet supported, so callers receive an
immediate, descriptive error instead of the field being ignored.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f034b298-8b98-46f7-83b8-6477b1c9c752

📥 Commits

Reviewing files that changed from the base of the PR and between 38f7d60 and 7d8a9dd.

📒 Files selected for processing (2)
  • src/main/java/org/gridsuite/modification/dto/LineCreationInfos.java
  • src/main/java/org/gridsuite/modification/dto/LineSegmentInfos.java

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.

1 participant