-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Rename StopModel to SiteRepository #6165
Conversation
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 saw a few names in the tests that were named "model" something. These should probably be renamed now. Most of them weren't related to the stop model though.
But I think you can merge this and do that in a follow-up PR if you don't want to keep this open too long and risk merge conflicts.
@@ -89,14 +89,14 @@ public class TripRequestMapperTest implements PlanTestConstants { | |||
.bus(route2, 2, time("11:20"), time("11:40"), Place.forStop(stop3)) | |||
.build(); | |||
var patterns = itineraryPatterns(itinerary); | |||
var stopModel = TEST_MODEL | |||
.stopModelBuilder() | |||
var siteRepository = TEST_MODEL |
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.
We should probably find a better name for TEST_MODEL
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.
Renaming TransitModelForTest
to TimetableRepositoryForTest
was a mistake in #6148
TransitModelForTest
contains test helpers to create timetable and stop entities, it has nothing to do with the repository.
Since it is under org.opentripplanner.transit.model
, TransitModelForTest
is maybe not such a bad name.
To be fixed in another PR
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.
Yeah, I think the original name wasn't very good either. It should probably be called something with "Factory" or "Helper" imo.
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.
TimetableTestDataFactory
?
application/src/test/java/org/opentripplanner/netex/NetexEpipBundleSmokeTest.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/netex/NetexNordicBundleSmokeTest.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/routing/algorithm/GraphRoutingTest.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/transit/model/_data/PatternTestModel.java
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestConstants.java
Outdated
Show resolved
Hide resolved
029d96c
@habrahamsson-skanetrafiken I applied one review suggestion and deferred the other ones to follow-up PRs |
Tema for Dev Meeting: When we have massive renaming PRs like this I prefer them to only do one thing. It makes the review much faster. The comments from Henrik on renaming other stuff is good, but we have a lot of these - should we collect them somewhere instead of requesting the author to change them? |
Summary
Rename:
StopModel --> SiteRepository
StopModelIndex --> SiteRepositoryIndex
The more generic term of Site is preferred over Stop.
The TransModel definition of a SITE is:
Issue
No
Unit tests
No
Documentation
No