-
Notifications
You must be signed in to change notification settings - Fork 45
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
New editoast InfraCache
API for accessing objects
#6184
Conversation
005bd77
to
9fa3c91
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #6184 +/- ##
============================================
+ Coverage 26.69% 26.87% +0.17%
Complexity 2139 2139
============================================
Files 931 931
Lines 123484 123773 +289
Branches 2682 2682
============================================
+ Hits 32968 33259 +291
+ Misses 88918 88916 -2
Partials 1598 1598
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.
You could add some tests to check that the errors are indeed thrown when the objects do not exist.
InfraCache
API for accessing objectsInfraCache
API for accessing objects
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.
Why prefix your commit message with editoast(feat):
and not editoast:
?
@flomonster I'm used to https://www.conventionalcommits.org/en/v1.0.0/. Ideally, I'd prefer to do the opposite |
I didn't know about this convention. Our delivery style is described [here] (https://osrd.fr/en/docs/guides/contribute/code/#git-commit-style). I prefer to keep it consistent with other contributions. |
a893bce
to
9575f85
Compare
These API wrap some of the boilerplate we have to do to access objects in `InfraCache`. It also hides the `panic` in a coherent API and expose an API that cannot `panic` anymore.
This is just good practice to make the API takes `&[]` instead of `&Vec<>`.
9575f85
to
8bcb233
Compare
@Erashin Done in /~https://github.com/osrd-project/osrd/compare/9fa3c912a42c470b4ad5389c91042dd4fd70f258..a893bceb092dc2d870a50d234ac2cb20027e8c69. |
These API wrap some of the boilerplate we have to do to access objects in
InfraCache
. It also hides thepanic
in a coherent API and expose an API that cannotpanic
anymore.