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

core: add v2 conflict detection endpoint #7345

Merged
merged 3 commits into from
May 2, 2024
Merged

Conversation

Erashin
Copy link
Contributor

@Erashin Erashin commented Apr 30, 2024

Fixes #6905. Convert V2 payload to V1 structs to use them in Conflicts.kt, because stdcm is not v2 yet and still calls conflict detection with v1 structs.

@Erashin Erashin requested a review from a team as a code owner April 30, 2024 10:19
@Erashin Erashin requested a review from multun April 30, 2024 10:19
@Erashin Erashin linked an issue Apr 30, 2024 that may be closed by this pull request
@Erashin Erashin requested review from eckter and removed request for multun April 30, 2024 10:22
@Erashin Erashin force-pushed the alch/ts2-conflict_detection branch from b9e826d to 4707776 Compare April 30, 2024 12:40
@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2024

Codecov Report

Attention: Patch coverage is 32.38636% with 119 lines in your changes are missing coverage. Please review.

Project coverage is 18.58%. Comparing base (1fae581) to head (73c143f).

Files Patch % Lines
...pi/api_v2/conflicts/ConflictDetectionEndpointV2.kt 0.00% 46 Missing ⚠️
.../api_v2/pathfinding/PathfindingBlocksEndpointV2.kt 21.05% 10 Missing and 5 partials ⚠️
.../api/api_v2/conflicts/ConflictDetectionResponse.kt 0.00% 14 Missing ⚠️
...rd/api/api_v2/standalone_sim/SimulationResponse.kt 7.14% 13 Missing ⚠️
...d/api/api_v2/conflicts/ConflictDetectionRequest.kt 0.00% 12 Missing ⚠️
...rd/api/api_v2/standalone_sim/SimulationEndpoint.kt 0.00% 6 Missing ⚠️
...kotlin/fr/sncf/osrd/utils/json/UnitJsonAdapters.kt 0.00% 4 Missing and 1 partial ⚠️
.../kotlin/fr/sncf/osrd/sim_infra/utils/InfraUtils.kt 0.00% 3 Missing ⚠️
...f/osrd/standalone_sim/ScheduleMetadataExtractor.kt 0.00% 3 Missing ⚠️
...api/api_v2/pathfinding/PathfindingBlockResponse.kt 33.33% 2 Missing ⚠️

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

Additional details and impacted files
@@              Coverage Diff              @@
##                dev    #7345       +/-   ##
=============================================
- Coverage     29.13%   18.58%   -10.55%     
+ Complexity     2020     2016        -4     
=============================================
  Files          1137      887      -250     
  Lines        139713   112304    -27409     
  Branches       2755     2769       +14     
=============================================
- Hits          40707    20874    -19833     
+ Misses        97397    89814     -7583     
- Partials       1609     1616        +7     
Flag Coverage Δ
core 76.32% <19.04%> (-0.69%) ⬇️
editoast ?
front 9.35% <100.00%> (+<0.01%) ⬆️
gateway 2.43% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 83.96% <ø> (ø)

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.

@Erashin Erashin force-pushed the alch/ts2-conflict_detection branch 2 times, most recently from 67991e6 to d3573a9 Compare April 30, 2024 12:51
@Erashin Erashin force-pushed the alch/ts2-conflict_detection branch from d3573a9 to d868cd9 Compare April 30, 2024 15:16
@Erashin Erashin force-pushed the alch/ts2-conflict_detection branch from d868cd9 to 3805d3d Compare April 30, 2024 15:45
@Erashin Erashin requested a review from a team as a code owner April 30, 2024 16:47
@flomonster flomonster force-pushed the alch/ts2-conflict_detection branch 2 times, most recently from 6b78f05 to 6199e2b Compare April 30, 2024 23:11
@Erashin Erashin force-pushed the alch/ts2-conflict_detection branch 2 times, most recently from 00677a3 to 455e729 Compare May 2, 2024 07:25
@flomonster flomonster force-pushed the alch/ts2-conflict_detection branch from 455e729 to 706f50b Compare May 2, 2024 07:27
@Erashin Erashin force-pushed the alch/ts2-conflict_detection branch 2 times, most recently from f3b5661 to 8c59e5f Compare May 2, 2024 08:33
Copy link
Contributor

@woshilapin woshilapin left a comment

Choose a reason for hiding this comment

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

I've reviewed only the editoast part. There is at least one comment about the redundancy of information that I'd like to be addressed (or be convinced it's good as-is). The 2 other comments are minor. Apart from that, thanks for the good work, and long live v2!

@Erashin Erashin force-pushed the alch/ts2-conflict_detection branch from 8c59e5f to 95808ea Compare May 2, 2024 10:09
@flomonster flomonster force-pushed the alch/ts2-conflict_detection branch from 95808ea to 944a8fa Compare May 2, 2024 11:08
@Erashin Erashin force-pushed the alch/ts2-conflict_detection branch 2 times, most recently from 4f14e24 to 3b7f250 Compare May 2, 2024 11:57
Copy link
Contributor

@woshilapin woshilapin left a comment

Choose a reason for hiding this comment

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

Thanks for the pair programming, looks good for editoast 🎉

@flomonster flomonster force-pushed the alch/ts2-conflict_detection branch from 1eeca71 to 1188669 Compare May 2, 2024 13:19
@flomonster flomonster enabled auto-merge May 2, 2024 13:19
Erashin and others added 3 commits May 2, 2024 15:52
- Handle batch simulation for better performances
- Rename signal projection endpoint url
@flomonster flomonster force-pushed the alch/ts2-conflict_detection branch from 1188669 to 73c143f Compare May 2, 2024 13:52
@Erashin Erashin requested a review from a team as a code owner May 2, 2024 13:52
@flomonster flomonster disabled auto-merge May 2, 2024 14:02
@flomonster flomonster merged commit 85349f4 into dev May 2, 2024
17 checks passed
@flomonster flomonster deleted the alch/ts2-conflict_detection branch May 2, 2024 14:02
new FkRegex("/detect_conflicts", new ConflictDetectionEndpoint()),
new FkRegex("/v2/conflict_detection", new ConflictDetectionEndpointV2()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe these endpoints should be added to the core/openapi.yaml.

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.

TS2: Add core conflict endpoint
5 participants