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

Rvs/front power restrictions v2 #7824

Merged
merged 1 commit into from
Jul 11, 2024
Merged

Conversation

RomainValls
Copy link
Contributor

@RomainValls RomainValls commented Jun 23, 2024

closes #7025

What does the power restriction selector do :

  • Detects the change of electrification on a path
  • creates intervals with the electrification change points values

The user can :

  • Cut intervals manually (cut tool, or with the inputs)
  • Select power restrictions in intervals

Once a power restriction has been selected on an interval :

  • Two pathSteps are created. One where the power restriction begins, and one at the end (calculated with the position on Path)

@RomainValls RomainValls force-pushed the rvs/front-power-restrictions-v2 branch from 1dc7dec to de1e59c Compare June 24, 2024 08:45
@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 13.59712% with 1201 lines in your changes missing coverage. Please review.

Project coverage is 28.11%. Comparing base (45b2718) to head (d4a0773).

Files Patch % Lines
.../operationalStudiesConf/powerRestrictionReducer.ts 21.48% 189 Missing and 1 partial ⚠️
...ion/hooks/usePowerRestrictionSelectorBehaviours.ts 0.00% 166 Missing and 1 partial ⚠️
...modules/powerRestriction/helpers/createPathStep.ts 0.00% 134 Missing and 1 partial ⚠️
...striction/hooks/usePowerRestrictionSelectorData.ts 0.00% 108 Missing and 1 partial ⚠️
...owerRestriction/helpers/getRestrictionsToResize.ts 0.00% 102 Missing and 1 partial ⚠️
...owerRestriction/helpers/formatPowerRestrictions.ts 0.00% 92 Missing and 1 partial ⚠️
.../reducers/osrdconf/operationalStudiesConf/utils.ts 22.72% 85 Missing ⚠️
...riction/components/PowerRestrictionsSelectorV2.tsx 0.00% 66 Missing and 1 partial ⚠️
...werRestriction/helpers/powerRestrictionWarnings.ts 18.96% 47 Missing ⚠️
...ront/src/modules/powerRestriction/helpers/utils.ts 0.00% 43 Missing and 1 partial ⚠️
... and 28 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #7824      +/-   ##
============================================
- Coverage     28.22%   28.11%   -0.11%     
  Complexity     2075     2075              
============================================
  Files          1276     1285       +9     
  Lines        156311   157442    +1131     
  Branches       3084     3117      +33     
============================================
+ Hits          44115    44269     +154     
- Misses       110355   111300     +945     
- Partials       1841     1873      +32     
Flag Coverage Δ
core 75.03% <ø> (ø)
editoast 70.81% <ø> (-0.03%) ⬇️
front 9.96% <13.59%> (+0.04%) ⬆️
gateway 2.34% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 72.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RomainValls RomainValls force-pushed the rvs/front-power-restrictions-v2 branch from 3d839bc to 2cf5596 Compare June 26, 2024 06:34
@RomainValls RomainValls marked this pull request as ready for review June 26, 2024 06:37
@RomainValls RomainValls requested a review from a team as a code owner June 26, 2024 06:37
front/src/utils/strings.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

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

Thank you for this PR, just a quick check on the code for forgot code comments mostly.

front/src/reducers/osrdconf/osrdConfCommon/index.ts Outdated Show resolved Hide resolved
front/src/reducers/osrdconf/osrdConfCommon/index.ts Outdated Show resolved Hide resolved
front/src/reducers/osrdconf/osrdConfCommon/index.ts Outdated Show resolved Hide resolved
front/src/reducers/osrdconf/osrdConfCommon/index.ts Outdated Show resolved Hide resolved
front/src/reducers/osrdconf/osrdConfCommon/utils.ts Outdated Show resolved Hide resolved
@RomainValls RomainValls force-pushed the rvs/front-power-restrictions-v2 branch from 3b4edbf to c5e8007 Compare June 27, 2024 07:11
@clarani clarani force-pushed the rvs/front-power-restrictions-v2 branch 2 times, most recently from 9abcaa4 to 56e7f56 Compare July 5, 2024 14:58
Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

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

Ready for review 🥳

@clarani clarani force-pushed the rvs/front-power-restrictions-v2 branch from 56e7f56 to d04ed93 Compare July 10, 2024 08:39
@clarani clarani force-pushed the rvs/front-power-restrictions-v2 branch from d04ed93 to 1440239 Compare July 10, 2024 13:47
Copy link
Contributor

@Yohh Yohh left a comment

Choose a reason for hiding this comment

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

nice, bravo for this huge PR, LGTM 💪
left a few comments about typo

@clarani clarani force-pushed the rvs/front-power-restrictions-v2 branch from 1440239 to 92c4baa Compare July 10, 2024 16:10
@clarani clarani force-pushed the rvs/front-power-restrictions-v2 branch from b5425ae to d4a0773 Compare July 11, 2024 07:19
@clarani clarani enabled auto-merge July 11, 2024 07:19
@clarani clarani added this pull request to the merge queue Jul 11, 2024
Merged via the queue into dev with commit bea61b1 Jul 11, 2024
17 checks passed
@clarani clarani deleted the rvs/front-power-restrictions-v2 branch July 11, 2024 07:38
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.

front: adapt the powerRestriction selector to trainSchedule v2
6 participants