-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add rolling stocks categories #10701
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10701 +/- ##
==========================================
- Coverage 81.95% 81.93% -0.03%
==========================================
Files 1083 1084 +1
Lines 107626 107212 -414
Branches 741 737 -4
==========================================
- Hits 88203 87839 -364
+ Misses 19382 19332 -50
Partials 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hi @flomonster, I removed the |
3ce02b5
to
dc40bee
Compare
dc40bee
to
611ace2
Compare
159aa07
to
ae4dbf2
Compare
ae4dbf2
to
87502e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that I understand why we need to nest into Option
? Apart from that, nice PR.
editoast/editoast_models/src/rolling_stock/rolling_stock_category.rs
Outdated
Show resolved
Hide resolved
87502e8
to
35f70ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding things in editoast_models
, less things to do in the future!
Shouldn't the -Form
s be updated as well with the categories?
Note
The commit and the PR title use "categorie" instead of "category/ies"
editoast/migrations/2025-02-03-094532_add_primary_and_other_categories_to_rolling_stock/up.sql
Outdated
Show resolved
Hide resolved
editoast/editoast_models/src/rolling_stock/rolling_stock_category.rs
Outdated
Show resolved
Hide resolved
front/src/modules/rollingStock/components/RollingStockSelector/sampleData.ts
Outdated
Show resolved
Hide resolved
35f70ec
to
2f0caec
Compare
RollingStockModel
RollingStockModel
56cb9ea
to
fa838cd
Compare
Thanks for noticing that! I’ve fixed it now. |
fa838cd
to
6c47779
Compare
As mentioned in this issue, this PR addresses Task 1, which involves adding two new columns to the model and updating the model in |
400f053
to
b06df50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR. There are a few things I'd like to clarify before I approve.
editoast/editoast_models/src/rolling_stock/rolling_stock_category.rs
Outdated
Show resolved
Hide resolved
editoast/editoast_models/src/rolling_stock/rolling_stock_category.rs
Outdated
Show resolved
Hide resolved
editoast/editoast_models/src/rolling_stock/rolling_stock_category.rs
Outdated
Show resolved
Hide resolved
RollingStockModel
e76a492
to
adbc99d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still do not agree with the unknown
variant. If the other maintainers agree with this, then I'll yield.
adbc99d
to
519b22f
Compare
@leovalais @woshilapin what do you think? |
519b22f
to
b5b89c7
Compare
Signed-off-by: hamz2a <[email protected]>
46ad103
to
0941476
Compare
As discussed with @flomonster, @leovalais and @woshilapin: we will use |
Signed-off-by: hamz2a <[email protected]>
0941476
to
d4347b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Part of #10574
Editoast:
rolling_stock_category
enum and update therolling_stock
table with the new fieldsprimary_category
andother_categories
.rolling_stock_category
androlling_stock_categories
) were added to theeditoast_models
crate, as the goal is to migrate all models to this crate for better organization.RollingStockModel
struct was updated to includeprimary_category
andother_categories
.primary_category
andother_categories
are correctly set when creating rolling stock.openapi.yaml
was updated to reflect the newprimary_category
andother_categories
fields inRollingStock
.Front:
generatedEditoastApi.ts
was updated to include the newRollingStockCategory
andRollingStockCategories
types.osrd_schemas
RollingStockCategory
was addedRollingStock
class was updated to includeprimary_category
andother_categories
.core