-
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
core: add check on different constraints #2548
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #2548 +/- ##
=============================================
+ Coverage 37.61% 80.09% +42.48%
- Complexity 1661 1666 +5
=============================================
Files 551 237 -314
Lines 16808 7410 -9398
Branches 2355 942 -1413
=============================================
- Hits 6322 5935 -387
+ Misses 10116 1136 -8980
+ Partials 370 339 -31
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Please add tests for this new behavior.
core/src/main/java/fr/sncf/osrd/api/pathfinding/PathfindingRoutesEndpoint.java
Outdated
Show resolved
Hide resolved
core/src/main/java/fr/sncf/osrd/api/pathfinding/PathfindingRoutesEndpoint.java
Outdated
Show resolved
Hide resolved
core/src/main/java/fr/sncf/osrd/api/pathfinding/PathfindingRoutesEndpoint.java
Outdated
Show resolved
Hide resolved
core/src/main/java/fr/sncf/osrd/api/pathfinding/PathfindingRoutesEndpoint.java
Outdated
Show resolved
Hide resolved
core/src/main/java/fr/sncf/osrd/api/pathfinding/PathfindingRoutesEndpoint.java
Outdated
Show resolved
Hide resolved
…nto mji/pathfinding-error-message # Conflicts: # core/src/main/java/fr/sncf/osrd/api/pathfinding/PathfindingRoutesEndpoint.java
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 the weird behavior in assertThrows
, this looks good to me.
You should clean up the git history, the "fix" commits should be merged with the commit they fix. A simple way to do this is a git rebase -i dev
, this opens a text editor and you can replace pick
with fixup
for fixup commits. This branch shouldn't have more than one or two commits. Then you need to git push --force-with-lease
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 (modulo eckter's feedback re git history)
* add check on different constraints * fix checkStyle * fix additional checkStyle * fix additional checkStyle * add electrification & gauge throw tests * correct behaviour when pathfinding is null * correct behaviour when pathfinding is null * fix compilation errors * fix checkstyle errors * correct error origin detection * delete duplicated test + correct checkstyle errors * formatting * remove unecessary line * Handle generic pathfinding error as well * indentation * simplify by making the constraints hashmap static * make constraints private * missing javadoc * String format * Better function flow (return early and the big error handling block at the end) * simplify logic * change assertThrows to assertEquels * Fix generic case * fix style Co-authored-by: Valentin Chanas <[email protected]>
* add check on different constraints * fix checkStyle * fix additional checkStyle * fix additional checkStyle * add electrification & gauge throw tests * correct behaviour when pathfinding is null * correct behaviour when pathfinding is null * fix compilation errors * fix checkstyle errors * correct error origin detection * delete duplicated test + correct checkstyle errors * formatting * remove unecessary line * Handle generic pathfinding error as well * indentation * simplify by making the constraints hashmap static * make constraints private * missing javadoc * String format * Better function flow (return early and the big error handling block at the end) * simplify logic * change assertThrows to assertEquels * Fix generic case * fix style Co-authored-by: Valentin Chanas <[email protected]>
closes #2486