feat: handle p and q measurement modification in battery#817
Conversation
📝 WalkthroughWalkthroughBattery modification mapping now includes active/reactive power measurement values and validity flags; pom property bumped to 0.83.0 and tests were expanded to set and assert these measurement fields. ChangesBattery Measurement Fields
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pom.xml`:
- Line 56: Update the Maven property network-modification.version to remove the
SNAPSHOT and point to a released artifact: change the value from 0.82.0-SNAPSHOT
to a released version (e.g., 0.78.0) so builds are reproducible; ensure any
references to org.gridsuite:gridsuite-network-modification in the pom(s) use
that released version and run a quick mvn -DskipTests verify to confirm
dependency resolution succeeds before merging.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 98d86604-cd75-4613-be57-8e6ae3adb048
📒 Files selected for processing (3)
pom.xmlsrc/main/java/org/gridsuite/modification/server/entities/equipment/modification/BatteryModificationEntity.javasrc/test/java/org/gridsuite/modification/server/modifications/BatteryModificationTest.java
| Collection<Measurement> reactivePowerMeasurements = measurements.getMeasurements(Measurement.Type.REACTIVE_POWER).stream().toList(); | ||
| assertThat(activePowerMeasurements).isNotEmpty(); | ||
| assertThat(reactivePowerMeasurements).isNotEmpty(); | ||
| assertThat(activePowerMeasurements).allMatch(m -> m.getValue() == MEASUREMENT_P_VALUE && m.isValid() == MEASUREMENT_P_VALID); |
There was a problem hiding this comment.
same remark as network-modification lib => prefer using isEqualTo
Signed-off-by: Kamil MARUT <kamil.marut@rte-france.com>
Signed-off-by: KoloMenek <kolomenek@gmail.com>
Signed-off-by: KoloMenek <kolomenek@gmail.com>
821ca5f to
00727b3
Compare
|



PR Summary