Skip to content

Commit d992467

Browse files
committed
Merge remote-tracking branch 'otp/dev-2.x' into predicted_delay
# Conflicts: # application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchemaFactory.java # application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql
2 parents 7b2bc6c + 297de30 commit d992467

File tree

105 files changed

+1503
-1057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1503
-1057
lines changed

.github/workflows/debug-client.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ jobs:
5656
REMOTE_BRANCH: main
5757
TOKEN: ${{ secrets.CHANGELOG_TOKEN }}
5858
run: |
59+
# throw away changes to package-lock.json
60+
git checkout -- client/package-lock.json
61+
5962
# Configure git user
6063
git config --global user.name 'OTP Bot'
6164
git config --global user.email '[email protected]'

ARCHITECTURE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ examples. The Transit model is more complex than the VehiclePosition model.
4040
Below is a list of documented components in OTP. Not every component is documented at a high level,
4141
but this is a start and we would like to expand this list in the future.
4242

43-
### [OTP Configuration design](application/src/main/java/org/opentripplanner/standalone/config/package.md)
43+
### [OTP Configuration Design](application/src/main/java/org/opentripplanner/standalone/config/package.md)
4444

4545
The Configuration module is responsible for loading and parsing OTP configuration files and map them
4646
into Plan Old Java Objects (POJOs). These POJOs are injected into the other components.
4747

48-
### [GTFS import module](application/src/main/java/org/opentripplanner/gtfs/package.md)
48+
### [GTFS Import Module](application/src/main/java/org/opentripplanner/gtfs/package.md)
4949

5050
Used to import GTFS transit data files.
5151

52-
### [NeTEx import module](application/src/main/java/org/opentripplanner/netex/package.md)
52+
### [NeTEx Import Module](application/src/main/java/org/opentripplanner/netex/package.md)
5353

5454
Used to import NeTEx transit data files.
5555

5656
### Transit Routing
5757

58-
#### [Raptor transit routing](raptor/src/main/java/org/opentripplanner/raptor/package.md)
58+
#### [Raptor Transit Routing](raptor/src/main/java/org/opentripplanner/raptor/package.md)
5959

6060
This is the OTP2 new transit routing engine implemented using the Raptor algorithm. It explains how
6161
Raptor works, the important concepts and the design. It might be worth reading even if you are not a
@@ -82,14 +82,14 @@ existing Raptor coded should be tested with the
8282
[SpeedTest](application/src/test/java/org/opentripplanner/transit/speed_test/package.md) and compared
8383
with an earlier version of the code to make sure the performance is NOT degraded.
8484

85-
#### [Transfer path optimization](application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/package.md)
85+
#### [Transfer Path Optimization](application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/package.md)
8686

8787
Describes the transfer functionality, the design and the implementation. The logic for finding the
8888
best transfer is distributed to the Raptor and
8989
the [OptimizeTransferService](application/src/main/java/org/opentripplanner/routing/algorithm/transferoptimization/OptimizeTransferService.java)
9090
.
9191

92-
#### [Itinerary list filter chain](application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/package.md)
92+
#### [Itinerary List Filter Chain](application/src/main/java/org/opentripplanner/routing/algorithm/filterchain/package.md)
9393

9494
Describes the itinerary list filter chain, used to post-process the itineraries returned from the
9595
routers in [RoutingWorker](application/src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java),

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ add it to a meeting's agenda thread in Gitter.
2323
[a web forum](https://groups.google.com/g/opentripplanner-users)
2424
or as a mailing list: <[email protected]>.
2525

26-
## Developer meetings
26+
## Developer Meetings
2727

2828
- OTP development meetings usually occur twice a week.
2929
- The meeting times have been deliberately chosen to allow participation during regular business
@@ -45,21 +45,21 @@ an [iCal link to import this calendar](https://calendar.google.com/calendar/ical
4545
into calendar apps. Check the details of the calendar events for the Google Meet link, which is
4646
different on different days of the week.
4747

48-
## Code conventions and architecture
48+
## Code Conventions and Architecture
4949

5050
### Architecture
5151

5252
See [ARCHITECTURE.md](ARCHITECTURE.md)
5353

54-
### Coding style
54+
### Coding Style
5555

5656
See [Codestyle.md](doc/dev/decisionrecords/Codestyle.md)
5757

58-
### Naming conventions
58+
### Naming Conventions
5959

6060
See [NamingConventions.md](doc/dev/decisionrecords/NamingConventions.md)
6161

62-
### Development process conventions
62+
### Development Process Conventions
6363

6464
See [DevelopmentProcessConventions.md](doc/dev/decisionrecords/DevelopmentProcessConventions.md)
6565

@@ -69,7 +69,7 @@ See [DEVELOPMENT_DECISION_RECORDS.md](DEVELOPMENT_DECISION_RECORDS.md)
6969

7070
## Contributing Issues and Pull Requests
7171

72-
### Short version
72+
### Short Version
7373

7474
- When creating
7575
issues and pull requests, please follow the instructions in the template.
@@ -103,7 +103,7 @@ grind to a halt, the maintainers of the project will:
103103
features are added.
104104

105105

106-
### Long version
106+
### Long Version
107107

108108
OpenTripPlanner has been in active development and use for well over a decade and is now relied upon
109109
as infrastructure by large organizations and millions of public transit passengers around the world.
@@ -147,7 +147,7 @@ time you invest in OTP will need to be spent on collaboration, discussion, docum
147147
you will need to be available for regular meetings. You will need to take this into consideration in
148148
your budget and timeline.
149149

150-
## Other ways to share development work
150+
## Other Ways to Share Development Work
151151

152152
We don't want to discourage innovation and experimentation, and want promising new features to be
153153
visible to other users, so we have also created a Sandbox system for fast-track review and inclusion

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ contributors around the world. We welcome new contributions.
2525
Further [development guidelines](http://docs.opentripplanner.org/en/latest/Developers-Guide/) can be
2626
found in the documentation.
2727

28-
### Contributing guidelines
28+
### Contributing Guidelines
2929

3030
See [CONTRIBUTING.md](CONTRIBUTING.md)
3131

32-
### Development history
32+
### Development History
3333

3434
The OpenTripPlanner project was launched by Portland, Oregon's transport agency
3535
TriMet (http://trimet.org/) in July of 2009. As of this writing in September 2025, it has been in
@@ -38,15 +38,15 @@ of [OTP history](http://docs.opentripplanner.org/en/dev-2.x/History/) and a list
3838
of [cities and regions using OTP](http://docs.opentripplanner.org/en/dev-2.x/Deployments/) around
3939
the world.
4040

41-
## Performance Test
41+
## Measuring OTP Performance
4242

4343
[📊 Dashboard](https://otp-performance.leonard.io/)
4444

4545
We run a speed test (included in the code) to measure the performance for every PR merged into OTP.
4646

4747
[More information about how to set up and run it.](./test/performance/README.md)
4848

49-
## Repository layout
49+
## Repository Layout
5050

5151
The main Java server code is in `application/src/main/`. OTP also includes a Javascript client
5252
based on the MapLibre mapping library in `client/src/`. This client is now used for testing, with
@@ -58,7 +58,7 @@ Additional information and instructions are available in
5858
the [main documentation](http://docs.opentripplanner.org/en/dev-2.x/), including a
5959
[quick introduction](http://docs.opentripplanner.org/en/dev-2.x/Basic-Tutorial/).
6060

61-
## Getting in touch
61+
## Getting in Touch
6262

6363
The fastest way to get help is to use our [Gitter chat room](https://gitter.im/opentripplanner/OpenTripPlanner) where most of the core developers
6464
are. Bug reports may be filed via the Github [issue tracker](https://github.com/openplans/OpenTripPlanner/issues). The OpenTripPlanner [mailing list](http://groups.google.com/group/opentripplanner-users)

application/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,14 @@
348348
<version>2.0</version>
349349
</dependency>
350350
<dependency>
351-
<groupId>org.eclipse.paho</groupId>
352-
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
353-
<version>1.2.5</version>
351+
<groupId>com.hivemq</groupId>
352+
<artifactId>hivemq-mqtt-client</artifactId>
353+
<version>1.3.9</version>
354354
</dependency>
355355
<dependency>
356356
<groupId>io.github.ci-cmg</groupId>
357357
<artifactId>mapbox-vector-tile</artifactId>
358-
<version>4.0.6</version>
358+
<version>4.0.7</version>
359359
</dependency>
360360
<dependency>
361361
<groupId>net.objecthunter</groupId>

application/src/client/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<link rel="icon" type="image/svg+xml" href="/img/otp-logo.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>OTP Debug</title>
8-
<script type="module" crossorigin src="https://www.opentripplanner.org/debug-client-assets/2025/09/2025-09-25T11:23/assets/index-CPoyesw_.js"></script>
9-
<link rel="stylesheet" crossorigin href="https://www.opentripplanner.org/debug-client-assets/2025/09/2025-09-25T11:23/assets/index--BYSqEed.css">
8+
<script type="module" crossorigin src="https://www.opentripplanner.org/debug-client-assets/2025/10/2025-10-09T09:23/assets/index-CthobLJK.js"></script>
9+
<link rel="stylesheet" crossorigin href="https://www.opentripplanner.org/debug-client-assets/2025/10/2025-10-09T09:23/assets/index--BYSqEed.css">
1010
</head>
1111
<body>
1212
<div id="root"></div>

application/src/ext-test/java/org/opentripplanner/ext/flex/AreaStopsToVerticesMapperTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.opentripplanner.street.model._data.StreetModelForTest;
2222
import org.opentripplanner.transit.model._data.TimetableRepositoryForTest;
2323
import org.opentripplanner.transit.model.framework.Deduplicator;
24+
import org.opentripplanner.transit.model.framework.FeedScopedId;
2425
import org.opentripplanner.transit.model.site.AreaStop;
2526
import org.opentripplanner.transit.service.SiteRepository;
2627
import org.opentripplanner.transit.service.TimetableRepository;
@@ -43,8 +44,8 @@ class AreaStopsToVerticesMapperTest {
4344

4445
static List<TestCase> testCases() {
4546
return List.of(
46-
new TestCase(BERLIN, ALL, Set.of(BERLIN_AREA_STOP)),
47-
new TestCase(BERLIN, PEDESTRIAN_AND_CAR, Set.of(BERLIN_AREA_STOP)),
47+
new TestCase(BERLIN, ALL, Set.of(BERLIN_AREA_STOP.getId())),
48+
new TestCase(BERLIN, PEDESTRIAN_AND_CAR, Set.of(BERLIN_AREA_STOP.getId())),
4849
new TestCase(BERLIN, BICYCLE_AND_CAR, Set.of()),
4950
new TestCase(HAMBURG, ALL, Set.of()),
5051
new TestCase(BERLIN, PEDESTRIAN, Set.of()),
@@ -79,6 +80,6 @@ void mapAreaStopsInVertex(TestCase tc) {
7980
private record TestCase(
8081
Coordinate coordinate,
8182
StreetTraversalPermission permission,
82-
Set<AreaStop> expectedAreaStops
83+
Set<FeedScopedId> expectedAreaStops
8384
) {}
8485
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
package org.opentripplanner.updater.vehicle_rental.datasources.gbfs.v3;
2+
3+
import static org.junit.jupiter.api.Assertions.assertFalse;
4+
import static org.junit.jupiter.api.Assertions.assertTrue;
5+
import static org.junit.jupiter.params.provider.Arguments.argumentSet;
6+
7+
import java.util.List;
8+
import java.util.stream.Stream;
9+
import org.junit.jupiter.api.Test;
10+
import org.junit.jupiter.params.ParameterizedTest;
11+
import org.junit.jupiter.params.provider.Arguments;
12+
import org.junit.jupiter.params.provider.MethodSource;
13+
import org.mobilitydata.gbfs.v3_0.station_information.GBFSName;
14+
import org.mobilitydata.gbfs.v3_0.station_information.GBFSStation;
15+
16+
class GbfsStationInformationMapperTest {
17+
18+
private static final String TEST_STATION_ID = "TEST_STATION_ID";
19+
private static final String TEST_STATION_NAME = "TEST_STATION_NAME";
20+
21+
@Test
22+
void acceptValidStation() {
23+
assertTrue(GbfsStationInformationMapper.isValid(validStation()));
24+
}
25+
26+
@ParameterizedTest
27+
@MethodSource("provideInvalidStations")
28+
void invalidStationsShouldFail(GBFSStation station) {
29+
assertFalse(GbfsStationInformationMapper.isValid(station));
30+
}
31+
32+
private static GBFSStation validStation() {
33+
return new GBFSStation()
34+
.withLat(0d)
35+
.withLon(0d)
36+
.withStationId(TEST_STATION_ID)
37+
.withName(List.of(new GBFSName().withText(TEST_STATION_NAME).withLanguage("EN")));
38+
}
39+
40+
private static Stream<Arguments> provideInvalidStations() {
41+
return Stream.of(
42+
argumentSet("Missing station ID", validStation().withStationId(null)),
43+
argumentSet("Missing latitude", validStation().withLat(null)),
44+
argumentSet("Missing longitude", validStation().withLon(null)),
45+
argumentSet("Missing station name list", validStation().withName(null)),
46+
argumentSet("Empty station name list", validStation().withName(List.of())),
47+
argumentSet(
48+
"Station name list contains null name",
49+
validStation()
50+
.withName(
51+
List.of(new GBFSName().withText(TEST_STATION_NAME), new GBFSName().withText(null))
52+
)
53+
),
54+
argumentSet(
55+
"Station name list contains empty name",
56+
validStation()
57+
.withName(
58+
List.of(new GBFSName().withText(TEST_STATION_NAME), new GBFSName().withText(""))
59+
)
60+
),
61+
argumentSet(
62+
"Station name list contains null language",
63+
validStation()
64+
.withName(
65+
List.of(new GBFSName().withText(TEST_STATION_NAME), new GBFSName().withLanguage(null))
66+
)
67+
),
68+
argumentSet(
69+
"Station name list contains empty language",
70+
validStation()
71+
.withName(
72+
List.of(new GBFSName().withText(TEST_STATION_NAME), new GBFSName().withLanguage(""))
73+
)
74+
)
75+
);
76+
}
77+
}

application/src/ext/java/org/opentripplanner/ext/debugrastertiles/WheelchairEdgeRenderer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public Optional<EdgeVisualAttributes> renderEdge(Edge e) {
5252

5353
@Override
5454
public Optional<VertexVisualAttributes> renderVertex(Vertex v) {
55-
if (v instanceof TransitStopVertex) {
56-
var accessibility = ((TransitStopVertex) v).getStop().getWheelchairAccessibility();
55+
if (v instanceof TransitStopVertex tsv) {
56+
var accessibility = tsv.getWheelchairAccessibility();
5757
var color =
5858
switch (accessibility) {
5959
case NO_INFORMATION -> NO_WHEELCHAIR_INFORMATION_COLOR;

application/src/ext/java/org/opentripplanner/ext/flex/AreaStopsToVerticesMapper.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.opentripplanner.graph_builder.model.GraphBuilderModule;
1111
import org.opentripplanner.routing.graph.Graph;
1212
import org.opentripplanner.street.model.vertex.StreetVertex;
13+
import org.opentripplanner.transit.model.framework.FeedScopedId;
1314
import org.opentripplanner.transit.model.site.AreaStop;
1415
import org.opentripplanner.transit.service.TimetableRepository;
1516
import org.opentripplanner.utils.logging.ProgressTracker;
@@ -58,11 +59,12 @@ public void buildGraph() {
5859
return matchedVertices;
5960
});
6061

61-
ImmutableMultimap<StreetVertex, AreaStop> mappedResults = results.collect(
62-
ImmutableListMultimap.<MatchResult, StreetVertex, AreaStop>flatteningToImmutableListMultimap(
63-
MatchResult::vertex,
64-
mr -> Stream.of(mr.stop())
65-
)
62+
ImmutableMultimap<StreetVertex, FeedScopedId> mappedResults = results.collect(
63+
ImmutableListMultimap.<
64+
MatchResult,
65+
StreetVertex,
66+
FeedScopedId
67+
>flatteningToImmutableListMultimap(MatchResult::vertex, mr -> Stream.of(mr.stop().getId()))
6668
);
6769

6870
mappedResults

0 commit comments

Comments
 (0)