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

editoast, front: allow providing etcs_brake_params to rolling-stock web api #10422

Merged

Conversation

bougue-pe
Copy link
Contributor

@bougue-pe bougue-pe commented Jan 16, 2025

front: persist etcs params when editing a rollingstock handling etcs (without this, etcs_brake_params are emptied when updating a RS with the front).

Follow-up on #10147

AC:

  • ability to create a RS with etcs_brake_params via editoast's web API:
    • curl 'http://localhost:4000/api/rolling_stock?locked=false' -X POST -H 'content-type: application/json' -H 'Cookie: gateway=<blabliblo>' --data '@/<path/to>/osrd/tests/data/rolling_stocks/etcs_level2_rolling_stock.json'
    • check in PG that etcs_brake_params column is filled
  • ability to update given RS without erasing etcs_brake_params:
    • change some field of the RS using the front (i.e. name, details)
    • check in PG that etcs_brake_params column is still filled

front: persist etcs params when editing a rollingstock handling etcs
 (without this, etcs_brake_params are emptied when updating a RS with the
 front).

Co-authored-by: romainvalls <romain.valls95@gmail.com>

Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
@bougue-pe bougue-pe requested a review from a team as a code owner January 16, 2025 17:08
@bougue-pe bougue-pe requested a review from a team as a code owner January 16, 2025 17:08
@github-actions github-actions bot added area:front Work on Standard OSRD Interface modules area:editoast Work on Editoast Service labels Jan 16, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2025

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

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 81.65%. Comparing base (accd619) to head (af30b5c).
Report is 11 commits behind head on dev.

Files with missing lines Patch % Lines
...ents/RollingStockEditor/RollingStockEditorForm.tsx 0.00% 4 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10422      +/-   ##
==========================================
+ Coverage   81.62%   81.65%   +0.03%     
==========================================
  Files        1070     1071       +1     
  Lines      105881   106112     +231     
  Branches      727      727              
==========================================
+ Hits        86428    86650     +222     
- Misses      19412    19423      +11     
+ Partials       41       39       -2     
Flag Coverage Δ
editoast 73.71% <100.00%> (-0.04%) ⬇️
front 89.36% <0.00%> (+0.04%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 87.05% <ø> (ø)

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.

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.

LGTM ✅

@bougue-pe bougue-pe added this pull request to the merge queue Jan 17, 2025
Merged via the queue into dev with commit 1b0be11 Jan 17, 2025
27 checks passed
@bougue-pe bougue-pe deleted the peb/editoast/allow_rs_with_etcs_brake_params_in_web_api branch January 17, 2025 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants