-
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
Move electrical profile set id from timetable to scenario #8167
Conversation
e5d181e
to
4cc1899
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.
Great PR. Not tested yet (waiting to be ready for review)
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 editoast part :)
4cc1899
to
937fd4d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #8167 +/- ##
=============================================
+ Coverage 27.25% 87.49% +60.23%
=============================================
Files 1310 31 -1279
Lines 157453 1535 -155918
Branches 3259 0 -3259
=============================================
- Hits 42915 1343 -41572
+ Misses 112557 192 -112365
+ Partials 1981 0 -1981
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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
91fb501
to
2a34c19
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, (tested + reviewed)
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, not tested. An issue tracking the problem with ModelV2 is opened here: #8111
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.
OK for tests/
front/src/reducers/osrdconf/operationalStudiesConf/simulationConfReducers.spec.ts
Outdated
Show resolved
Hide resolved
front/src/applications/operationalStudies/views/v2/ScenarioV2.tsx
Outdated
Show resolved
Hide resolved
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.
Thank you for this nice PR, left some comments (mostly for syntax and front good practices)
front/src/reducers/osrdconf/operationalStudiesConf/simulationConfReducers.spec.ts
Outdated
Show resolved
Hide resolved
front/src/applications/operationalStudies/views/v2/ScenarioV2.tsx
Outdated
Show resolved
Hide resolved
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.
Thank you for the changes, one issue left
Note to self: we're now passing the electrical set ID as query param in requests because a single timetable might be used from multiple scenarii. |
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.
Apart from these minor comments, looks good!
82b21d9
to
b9e0ffa
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 and tested, great job :)
b9e0ffa
to
6ff702b
Compare
6ff702b
to
fe27f60
Compare
Warning
For editoast please review only the first commit
The timetable model gets a ton of changes in editoast because the
ModelV2
derive does not handle struct with only primary keys.Indeed, the derive creates a
TimetableV2Changeset
struct, with no fields, and a struct with no field can not deriveAsChangeset
andInsertable
fromdiesel
.With @leovalais we checked the following solutions:
TimetableV2Changeset
: impossible due to the way they're madeTimetableV2Changeset
struct: this would complexify the derive a lot for a single and simple use, we deemed it overkill.ModelV2
traits manually: the solution we selected.I removed the timetable listing endpoint because it was unused, because the
List
trait required the struct to be aModel
(which it isn't anymore), and because a list of only ids did not seem very exploitable...