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: move light_rolling_stock to /models #3641

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

clarani
Copy link
Contributor

@clarani clarani commented Mar 22, 2023

closes #3642

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Merging #3641 (e610de1) into dev (4661682) will decrease coverage by 0.89%.
The diff coverage is 97.56%.

❗ Current head e610de1 differs from pull request most recent head 003d010. Consider uploading reports for the commit 003d010 to get more accurate results

@@             Coverage Diff              @@
##                dev    #3641      +/-   ##
============================================
- Coverage     69.79%   68.91%   -0.89%     
  Complexity     2002     2002              
============================================
  Files           438      439       +1     
  Lines         21896    22358     +462     
  Branches       1658     1658              
============================================
+ Hits          15282    15407     +125     
- Misses         5819     6156     +337     
  Partials        795      795              
Flag Coverage Δ
editoast 75.41% <97.50%> (+0.10%) ⬆️
front 57.43% <100.00%> (-1.56%) ⬇️

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

Impacted Files Coverage Δ
editoast/src/models/mod.rs 37.03% <ø> (ø)
editoast/src/models/rolling_stock/mod.rs 96.87% <ø> (ø)
editoast/src/schema/mod.rs 94.64% <ø> (ø)
editoast/src/schema/rolling_stock_livery.rs 87.50% <ø> (ø)
editoast/src/views/rolling_stocks.rs 97.77% <ø> (ø)
...st/src/models/rolling_stock/light_rolling_stock.rs 97.05% <97.05%> (ø)
editoast/src/views/light_rolling_stocks.rs 100.00% <100.00%> (ø)
front/src/common/api/osrdEditoastApi.ts 90.96% <100.00%> (+0.13%) ⬆️

... and 6 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@clarani clarani force-pushed the cni/editoast/refacto-light-rs-model branch 4 times, most recently from 7219fcf to ea570c7 Compare March 29, 2023 15:08
@clarani clarani marked this pull request as ready for review March 29, 2023 15:15
@clarani clarani requested a review from a team as a code owner March 29, 2023 15:15
Copy link
Contributor

@Castavo Castavo left a comment

Choose a reason for hiding this comment

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

Cool PR !
The effort curves structure is okay 😁

I don't know if you really need to keep DieselJson in your structs if they are not Queryable or Insertable
Also, you replaced "without effort curves" with "with simplified effort curves" in docstrings, however there are no speed-effort curves in the light rolling stock (even though there is an argument mode_effort_curves). I think it's okay but it might be confusing

Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

The whole PR is very cool thanks for this refactor

@clarani clarani force-pushed the cni/editoast/refacto-light-rs-model branch 6 times, most recently from 8c94807 to e610de1 Compare March 31, 2023 15:37
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

Two things to fix and we're good.

editoast/src/schema/rolling_stock/mod.rs Outdated Show resolved Hide resolved
editoast/src/views/rolling_stocks.rs Outdated Show resolved Hide resolved
@clarani clarani force-pushed the cni/editoast/refacto-light-rs-model branch from e610de1 to 8725d59 Compare April 3, 2023 16:12
@Tguisnet
Copy link
Contributor

Tguisnet commented Apr 4, 2023

Good PR, it's ok for me, but I think we should rename the type field in DB to avoid the renaming of this field in editoast.

- move LightRollingStockModel to /models
- create LightRollingStock schema
- add tests
@clarani clarani force-pushed the cni/editoast/refacto-light-rs-model branch from 8725d59 to 003d010 Compare April 4, 2023 14:24
@flomonster flomonster merged commit e0a83a3 into dev Apr 4, 2023
@flomonster flomonster deleted the cni/editoast/refacto-light-rs-model branch April 4, 2023 15:09
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.

editoast: move light_rolling_stock to /models
4 participants