Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
4989fea
Map pass through points
leonardehrenfried Jun 27, 2024
c16be7b
Update implementation after rebase
leonardehrenfried Jul 9, 2024
c81a38b
Add test for pass-through points
leonardehrenfried Jul 9, 2024
d8e288a
Add test for failure cases
leonardehrenfried Jul 9, 2024
905f1e5
Make general input for via and pass-through routing
leonardehrenfried Jul 12, 2024
a5b2674
Re-order schema elements
leonardehrenfried Jul 12, 2024
2d5ecc8
Regenerate code
leonardehrenfried Jul 24, 2024
ab706e7
Update to newest schema
leonardehrenfried Jul 24, 2024
a877bd0
Fix tests
leonardehrenfried Jul 24, 2024
8556f55
Use correct stop ids
leonardehrenfried Jul 24, 2024
3ea7524
Update formatting
leonardehrenfried Jul 24, 2024
bb83e0c
Reformat schema
leonardehrenfried Sep 9, 2024
a09793b
Regenerate APIs, update tests
leonardehrenfried Sep 9, 2024
dab0b59
Take into account the newest schema
leonardehrenfried Sep 10, 2024
66ccaa6
Copy latest API change from via point PR
leonardehrenfried Sep 26, 2024
dfe1f12
Merge remote-tracking branch 'entur/via' into gtfs-pass-through-thomas
leonardehrenfried Sep 26, 2024
47e49c1
Adapt to new API
leonardehrenfried Sep 26, 2024
f2eaf3c
Add test for via location mapper
leonardehrenfried Sep 27, 2024
06b64cd
Merge remote-tracking branch 'upstream/dev-2.x' into gtfs-pass-throug…
leonardehrenfried Oct 11, 2024
dfe5de3
Merge remote-tracking branch 'upstream/dev-2.x' into gtfs-pass-throug…
leonardehrenfried Oct 11, 2024
e267b63
Merge remote-tracking branch 'upstream/dev-2.x' into gtfs-pass-throug…
leonardehrenfried Oct 11, 2024
bf7c368
Fix path for performance tests
leonardehrenfried Oct 11, 2024
f143bd8
Move to use proper GraphQL types
leonardehrenfried Oct 13, 2024
da8a0e4
Improve testing
leonardehrenfried Oct 13, 2024
9c92b2e
Obey configured tag mapping in walkable area processing
vesameskanen Oct 11, 2024
aaf304d
Do not allow cycling on public transit platforms
vesameskanen Oct 14, 2024
2fde06a
Update permission docs
vesameskanen Oct 14, 2024
1dc168a
Extend mappers from default mapper
vesameskanen Oct 14, 2024
7c452db
Remove unnecessary interface
vesameskanen Oct 15, 2024
7ffca9b
Update OSM tag mapping related tests
vesameskanen Oct 15, 2024
3417952
Update OSM tag mapping docs
vesameskanen Oct 15, 2024
c2d7b33
Merge branch 'area-permissions' into refactor-osm
vesameskanen Oct 15, 2024
c6e74f3
Add unit tests for area permissions of Finland mapper
vesameskanen Oct 16, 2024
c5bb551
Test biking on platforms in Germany
vesameskanen Oct 16, 2024
a247756
Remove unused logger
vesameskanen Oct 16, 2024
03ef955
Fix formatting
vesameskanen Oct 16, 2024
336fb13
vector tiles: add no-thru traffic layers
flaktack Oct 11, 2024
0bde655
Mark BestMatchSpecifier as deprecated
vesameskanen Oct 22, 2024
36c1006
Use ExactMatchSpecifier for the problematic footway area biking rule
vesameskanen Oct 23, 2024
1a58ab8
add stopIndex in Stoptime
miklcct Oct 29, 2024
36381e8
Deprecate old style translated alert fields and add language param to…
optionsome Nov 2, 2024
c4379fc
Merge remote-tracking branch 'otp/dev-2.x' into area-permissions
vesameskanen Nov 4, 2024
3d754a5
Use convenient notation for cycling area ExactMatchSpecifier
vesameskanen Nov 4, 2024
5fad281
Merge remote-tracking branch 'upstream/dev-2.x' into gtfs-pass-trough
leonardehrenfried Nov 4, 2024
31e0640
Use raw types
leonardehrenfried Nov 4, 2024
1930b78
Re-enable tests
leonardehrenfried Nov 4, 2024
c398d54
Add test case
leonardehrenfried Nov 4, 2024
fc12da0
Merge remote-tracking branch 'upstream/dev-2.x' into gtfs-pass-trough
leonardehrenfried Nov 4, 2024
ff02dd4
Add test case
leonardehrenfried Nov 4, 2024
f900796
Fix imports
leonardehrenfried Nov 5, 2024
4b8dda8
Merge branch 'dev-2.x' into index-in-stoptime-in-pattern
miklcct Nov 5, 2024
b7d0dbe
rename stopIndex to stopPositionInPattern
miklcct Nov 5, 2024
d92a7fe
fix: Return empty list if there is no siriUrls in situations[]/infoLi…
t2gran Nov 6, 2024
f492446
Ignore situation alerts without url or siri uris
t2gran Nov 6, 2024
d956df6
Fix parsing of parking capcity for wheelchair users
leonardehrenfried Nov 5, 2024
8068b01
Remove no-op
leonardehrenfried Nov 5, 2024
5cbc9d3
Add test for parking processor
leonardehrenfried Nov 5, 2024
642ae33
Update documentation
leonardehrenfried Nov 5, 2024
79221b6
Add no-op for parsing
leonardehrenfried Nov 5, 2024
a081ebc
Merge remote-tracking branch 'upstream/dev-2.x' into gtfs-pass-trough
leonardehrenfried Nov 7, 2024
2ead4da
Merge pull request #6232 from entur/otp2_npe_situation_url
t2gran Nov 7, 2024
55cce3f
Add changelog entry for #6232 [ci skip]
Nov 7, 2024
f6c04e0
Merge remote-tracking branch 'upstream/dev-2.x' into feature/layer-gr…
flaktack Nov 7, 2024
14cef7c
vector tile: use ALL for permissions
flaktack Nov 7, 2024
3415473
vector tile: update/restore edge styles
flaktack Nov 7, 2024
8e786c0
debug client: dynamically update interactive layers
flaktack Nov 7, 2024
0b6fcac
debug client: remove obsolete comment
flaktack Nov 8, 2024
854b404
Use more common method
leonardehrenfried Nov 8, 2024
3a03f3b
Apply review feedback
leonardehrenfried Nov 8, 2024
2f0cc30
'itinerary' instead of 'trip'
leonardehrenfried Nov 8, 2024
d2f4108
Make stopLocationIds nullable again
leonardehrenfried Nov 8, 2024
69b7bab
Document the need to use graphQL alias for leg id when querying id an…
vesameskanen Nov 8, 2024
32eae05
Update application/src/main/resources/org/opentripplanner/apis/gtfs/s…
vesameskanen Nov 8, 2024
e6d383b
Rename function newArea as addArea
vesameskanen Nov 8, 2024
bdf60e0
Update application/src/main/resources/org/opentripplanner/apis/gtfs/s…
vesameskanen Nov 8, 2024
20b7888
Merge pull request #6243 from HSLdevcom/legid-alias-docs
vesameskanen Nov 8, 2024
f5466e8
Merge pull request #6164 from HSLdevcom/area-permissions
vesameskanen Nov 8, 2024
25b2671
Add changelog entry for #6164 [ci skip]
Nov 8, 2024
cda3595
Merge pull request #5958 from ibi-group/gtfs-pass-trough
leonardehrenfried Nov 8, 2024
da95e7a
Add changelog entry for #5958 [ci skip]
Nov 8, 2024
bb653bc
add integration test for stopPositionInPattern
miklcct Nov 8, 2024
570cdb5
Update micrometer.version to v1.13.7
renovate[bot] Nov 11, 2024
14333d1
Merge pull request #6235 from opentripplanner/renovate/micrometer.ver…
leonardehrenfried Nov 12, 2024
3d5d504
Merge pull request #6146 from realCity/feature/layer-groups
flaktack Nov 12, 2024
e655812
Upgrade debug client to version 2024/11/2024-11-12T09:26
Nov 12, 2024
115b4d4
Merge pull request #6216 from HSLdevcom/deprecate-alert-translations
optionsome Nov 12, 2024
237cf26
Add changelog entry for #6216 [ci skip]
Nov 12, 2024
18e2d37
Merge remote-tracking branch 'upstream/dev-2.x' into wheelchair-debug
leonardehrenfried Nov 12, 2024
a1289a6
Remove unused method
leonardehrenfried Nov 12, 2024
9812c5b
Remove duplicate permissions layer definition
leonardehrenfried Nov 12, 2024
2f0ccd8
Remove legacy bike access mapping
leonardehrenfried Nov 12, 2024
26a654f
Revert "Remove legacy bike access mapping"
leonardehrenfried Nov 12, 2024
73f67b0
Merge pull request #6204 from Jnction/index-in-stoptime-in-pattern
leonardehrenfried Nov 12, 2024
a0bd2b6
Add changelog entry for #6204 [ci skip]
Nov 12, 2024
7b4d240
Merge pull request #6229 from ibi-group/wheelchair-debug
leonardehrenfried Nov 12, 2024
e116213
Add changelog entry for #6229 [ci skip]
Nov 12, 2024
3d633b9
Upgrade debug client to version 2024/11/2024-11-12T14:16
Nov 12, 2024
a1df3a2
Merge remote-tracking branch 'upstream/dev-2.x' into upstream-merge-2…
leonardehrenfried Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions application/src/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/img/otp-logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OTP Debug Client</title>
<script type="module" crossorigin src="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2024/11/2024-11-04T12:49/assets/index-DPdUtdaa.js"></script>
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2024/11/2024-11-04T12:49/assets/index-CaBThmWm.css">
<script type="module" crossorigin src="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2024/11/2024-11-12T14:16/assets/index-D5yznI0k.js"></script>
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2024/11/2024-11-12T14:16/assets/index-CaBThmWm.css">
</head>
<body>
<div id="root"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.opentripplanner.apis.gtfs.model.StopOnRouteModel;
import org.opentripplanner.apis.gtfs.model.StopOnTripModel;
import org.opentripplanner.apis.gtfs.model.UnknownModel;
import org.opentripplanner.framework.graphql.GraphQLUtils;
import org.opentripplanner.framework.i18n.I18NString;
import org.opentripplanner.framework.i18n.TranslatedString;
import org.opentripplanner.routing.alertpatch.EntitySelector;
Expand Down Expand Up @@ -65,11 +66,11 @@ public DataFetcher<GraphQLTypes.GraphQLAlertCauseType> alertCause() {
public DataFetcher<String> alertDescriptionText() {
return environment -> {
var alert = getSource(environment);
return alert
.descriptionText()
.or(alert::headerText)
.map(t -> t.toString(environment.getLocale()))
.orElse(FALLBACK_EMPTY_STRING);
var descriptionText = GraphQLUtils.getTranslation(
alert.descriptionText().or(alert::headerText).orElse(null),
environment
);
return descriptionText != null ? descriptionText : FALLBACK_EMPTY_STRING;
};
}

Expand Down Expand Up @@ -103,11 +104,11 @@ public DataFetcher<Integer> alertHash() {
public DataFetcher<String> alertHeaderText() {
return environment -> {
var alert = getSource(environment);
return alert
.headerText()
.or(alert::descriptionText)
.map(h -> h.toString(environment.getLocale()))
.orElse(FALLBACK_EMPTY_STRING);
var headerText = GraphQLUtils.getTranslation(
alert.headerText().or(alert::descriptionText).orElse(null),
environment
);
return headerText != null ? headerText : FALLBACK_EMPTY_STRING;
};
}

Expand All @@ -125,7 +126,7 @@ public DataFetcher<GraphQLAlertSeverityLevelType> alertSeverityLevel() {
@Override
public DataFetcher<String> alertUrl() {
return environment ->
getSource(environment).url().map(u -> u.toString(environment.getLocale())).orElse(null);
GraphQLUtils.getTranslation(getSource(environment).url().orElse(null), environment);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ public DataFetcher<Integer> stopPosition() {
return environment -> getSource(environment).getGtfsSequence();
}

@Override
public DataFetcher<Integer> stopPositionInPattern() {
return environment -> getSource(environment).getStopIndex();
}

@Override
public DataFetcher<Long> serviceDay() {
return environment -> getSource(environment).getServiceDayMidnight();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,8 @@ public interface GraphQLStoptime {

public DataFetcher<Integer> stopPosition();

public DataFetcher<Integer> stopPositionInPattern();

public DataFetcher<Boolean> timepoint();

public DataFetcher<Trip> trip();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,63 @@ public enum GraphQLAgencyAlertType {
ROUTE_TYPES,
}

public static class GraphQLAlertAlertDescriptionTextArgs {

private String language;

public GraphQLAlertAlertDescriptionTextArgs(Map<String, Object> args) {
if (args != null) {
this.language = (String) args.get("language");
}
}

public String getGraphQLLanguage() {
return this.language;
}

public void setGraphQLLanguage(String language) {
this.language = language;
}
}

public static class GraphQLAlertAlertHeaderTextArgs {

private String language;

public GraphQLAlertAlertHeaderTextArgs(Map<String, Object> args) {
if (args != null) {
this.language = (String) args.get("language");
}
}

public String getGraphQLLanguage() {
return this.language;
}

public void setGraphQLLanguage(String language) {
this.language = language;
}
}

public static class GraphQLAlertAlertUrlArgs {

private String language;

public GraphQLAlertAlertUrlArgs(Map<String, Object> args) {
if (args != null) {
this.language = (String) args.get("language");
}
}

public String getGraphQLLanguage() {
return this.language;
}

public void setGraphQLLanguage(String language) {
this.language = language;
}
}

/** Cause of a alert */
public enum GraphQLAlertCauseType {
ACCIDENT,
Expand Down Expand Up @@ -1815,6 +1872,35 @@ public void setGraphQLTransitOnly(Boolean transitOnly) {
}
}

public static class GraphQLPlanPassThroughViaLocationInput {

private String label;
private List<String> stopLocationIds;

public GraphQLPlanPassThroughViaLocationInput(Map<String, Object> args) {
if (args != null) {
this.label = (String) args.get("label");
this.stopLocationIds = (List<String>) args.get("stopLocationIds");
}
}

public String getGraphQLLabel() {
return this.label;
}

public List<String> getGraphQLStopLocationIds() {
return this.stopLocationIds;
}

public void setGraphQLLabel(String label) {
this.label = label;
}

public void setGraphQLStopLocationIds(List<String> stopLocationIds) {
this.stopLocationIds = stopLocationIds;
}
}

public static class GraphQLPlanPreferencesInput {

private GraphQLAccessibilityPreferencesInput accessibility;
Expand Down Expand Up @@ -2048,6 +2134,75 @@ public void setGraphQLTransit(List<GraphQLPlanTransitModePreferenceInput> transi
}
}

public static class GraphQLPlanViaLocationInput {

private GraphQLPlanPassThroughViaLocationInput passThrough;
private GraphQLPlanVisitViaLocationInput visit;

public GraphQLPlanViaLocationInput(Map<String, Object> args) {
if (args != null) {
this.passThrough =
new GraphQLPlanPassThroughViaLocationInput((Map<String, Object>) args.get("passThrough"));
this.visit = new GraphQLPlanVisitViaLocationInput((Map<String, Object>) args.get("visit"));
}
}

public GraphQLPlanPassThroughViaLocationInput getGraphQLPassThrough() {
return this.passThrough;
}

public GraphQLPlanVisitViaLocationInput getGraphQLVisit() {
return this.visit;
}

public void setGraphQLPassThrough(GraphQLPlanPassThroughViaLocationInput passThrough) {
this.passThrough = passThrough;
}

public void setGraphQLVisit(GraphQLPlanVisitViaLocationInput visit) {
this.visit = visit;
}
}

public static class GraphQLPlanVisitViaLocationInput {

private String label;
private java.time.Duration minimumWaitTime;
private List<String> stopLocationIds;

public GraphQLPlanVisitViaLocationInput(Map<String, Object> args) {
if (args != null) {
this.label = (String) args.get("label");
this.minimumWaitTime = (java.time.Duration) args.get("minimumWaitTime");
this.stopLocationIds = (List<String>) args.get("stopLocationIds");
}
}

public String getGraphQLLabel() {
return this.label;
}

public java.time.Duration getGraphQLMinimumWaitTime() {
return this.minimumWaitTime;
}

public List<String> getGraphQLStopLocationIds() {
return this.stopLocationIds;
}

public void setGraphQLLabel(String label) {
this.label = label;
}

public void setGraphQLMinimumWaitTime(java.time.Duration minimumWaitTime) {
this.minimumWaitTime = minimumWaitTime;
}

public void setGraphQLStopLocationIds(List<String> stopLocationIds) {
this.stopLocationIds = stopLocationIds;
}
}

public enum GraphQLPropulsionType {
COMBUSTION,
COMBUSTION_DIESEL,
Expand Down Expand Up @@ -2745,6 +2900,7 @@ public static class GraphQLQueryTypePlanArgs {
private List<GraphQLTransportModeInput> transportModes;
private GraphQLInputTriangleInput triangle;
private GraphQLInputUnpreferredInput unpreferred;
private List<GraphQLPlanViaLocationInput> via;
private Double waitAtBeginningFactor;
private Double waitReluctance;
private Integer walkBoardCost;
Expand Down Expand Up @@ -2826,6 +2982,9 @@ public GraphQLQueryTypePlanArgs(Map<String, Object> args) {
this.triangle = new GraphQLInputTriangleInput((Map<String, Object>) args.get("triangle"));
this.unpreferred =
new GraphQLInputUnpreferredInput((Map<String, Object>) args.get("unpreferred"));
if (args.get("via") != null) {
this.via = (List<GraphQLPlanViaLocationInput>) args.get("via");
}
this.waitAtBeginningFactor = (Double) args.get("waitAtBeginningFactor");
this.waitReluctance = (Double) args.get("waitReluctance");
this.walkBoardCost = (Integer) args.get("walkBoardCost");
Expand Down Expand Up @@ -3057,6 +3216,10 @@ public GraphQLInputUnpreferredInput getGraphQLUnpreferred() {
return this.unpreferred;
}

public List<GraphQLPlanViaLocationInput> getGraphQLVia() {
return this.via;
}

public Double getGraphQLWaitAtBeginningFactor() {
return this.waitAtBeginningFactor;
}
Expand Down Expand Up @@ -3315,6 +3478,10 @@ public void setGraphQLUnpreferred(GraphQLInputUnpreferredInput unpreferred) {
this.unpreferred = unpreferred;
}

public void setGraphQLVia(List<GraphQLPlanViaLocationInput> via) {
this.via = via;
}

public void setGraphQLWaitAtBeginningFactor(Double waitAtBeginningFactor) {
this.waitAtBeginningFactor = waitAtBeginningFactor;
}
Expand Down Expand Up @@ -3362,6 +3529,7 @@ public static class GraphQLQueryTypePlanConnectionArgs {
private GraphQLPlanLabeledLocationInput origin;
private GraphQLPlanPreferencesInput preferences;
private java.time.Duration searchWindow;
private List<GraphQLPlanViaLocationInput> via;

public GraphQLQueryTypePlanConnectionArgs(Map<String, Object> args) {
if (args != null) {
Expand All @@ -3380,6 +3548,9 @@ public GraphQLQueryTypePlanConnectionArgs(Map<String, Object> args) {
this.preferences =
new GraphQLPlanPreferencesInput((Map<String, Object>) args.get("preferences"));
this.searchWindow = (java.time.Duration) args.get("searchWindow");
if (args.get("via") != null) {
this.via = (List<GraphQLPlanViaLocationInput>) args.get("via");
}
}
}

Expand Down Expand Up @@ -3431,6 +3602,10 @@ public java.time.Duration getGraphQLSearchWindow() {
return this.searchWindow;
}

public List<GraphQLPlanViaLocationInput> getGraphQLVia() {
return this.via;
}

public void setGraphQLAfter(String after) {
this.after = after;
}
Expand Down Expand Up @@ -3478,6 +3653,10 @@ public void setGraphQLPreferences(GraphQLPlanPreferencesInput preferences) {
public void setGraphQLSearchWindow(java.time.Duration searchWindow) {
this.searchWindow = searchWindow;
}

public void setGraphQLVia(List<GraphQLPlanViaLocationInput> via) {
this.via = via;
}
}

public static class GraphQLQueryTypeRentalVehicleArgs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public static RouteRequest toRouteRequest(
callWith.argument("from", (Map<String, Object> v) -> request.setFrom(toGenericLocation(v)));
callWith.argument("to", (Map<String, Object> v) -> request.setTo(toGenericLocation(v)));

mapViaLocations(request, environment);

request.setDateTime(
environment.getArgument("date"),
environment.getArgument("time"),
Expand Down Expand Up @@ -255,6 +257,12 @@ public static RouteRequest toRouteRequest(
return request;
}

static void mapViaLocations(RouteRequest request, DataFetchingEnvironment env) {
var args = env.getArgument("via");
var locs = ViaLocationMapper.mapToViaLocations((List<Map<String, Map<String, Object>>>) args);
request.setViaLocations(locs);
}

private static <T> boolean hasArgument(Map<String, T> m, String name) {
return m.containsKey(name) && m.get(name) != null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

import graphql.schema.DataFetchingEnvironment;
import java.time.Instant;
import java.util.List;
import java.util.Map;
import org.opentripplanner.apis.gtfs.GraphQLRequestContext;
import org.opentripplanner.apis.gtfs.generated.GraphQLTypes;
import org.opentripplanner.framework.graphql.GraphQLUtils;
Expand Down Expand Up @@ -63,6 +65,8 @@ public static RouteRequest toRouteRequest(

setModes(request.journey(), args.getGraphQLModes(), environment);

// sadly we need to use the raw collection because it is cast to the wrong type
mapViaPoints(request, environment.getArgument("via"));
return request;
}

Expand Down Expand Up @@ -178,4 +182,8 @@ private static GenericLocation parseGenericLocation(
coordinate.getGraphQLLongitude()
);
}

static void mapViaPoints(RouteRequest request, List<Map<String, Map<String, Object>>> via) {
request.setViaLocations(ViaLocationMapper.mapToViaLocations(via));
}
}
Loading
Loading