Skip to content
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

Require valid polygons for AreaStop #5915

Merged
merged 5 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@

import static graphql.Assert.assertTrue;

import gnu.trove.set.hash.TIntHashSet;
import java.io.File;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;
import java.util.Map;
import org.opentripplanner.ConstantsForTests;
import org.opentripplanner.TestOtpModel;
import org.opentripplanner.ext.flex.flexpathcalculator.DirectFlexPathCalculator;
import org.opentripplanner.ext.flex.template.FlexServiceDate;
import org.opentripplanner.framework.application.OTPFeature;
import org.opentripplanner.gtfs.graphbuilder.GtfsBundle;
import org.opentripplanner.gtfs.graphbuilder.GtfsModule;
import org.opentripplanner.model.calendar.ServiceDateInterval;
import org.opentripplanner.routing.graph.Graph;
import org.opentripplanner.test.support.ResourceLoader;
import org.opentripplanner.transit.model.framework.Deduplicator;
import org.opentripplanner.transit.model.timetable.booking.RoutingBookingInfo;
import org.opentripplanner.transit.service.StopModel;
import org.opentripplanner.transit.service.TransitModel;

Expand All @@ -31,19 +26,8 @@ public final class FlexIntegrationTestData {
static final File COBB_BUS_30_GTFS = RES.file("cobblinc-bus-30-only.gtfs.zip");
static final File COBB_FLEX_GTFS = RES.file("cobblinc-scheduled-deviated-flex.gtfs");
private static final File COBB_OSM = RES.file("cobb-county.filtered.osm.pbf");
private static final File LINCOLN_COUNTY_GTFS = RES.file("lincoln-county-flex.gtfs");
static final File MARTA_BUS_856_GTFS = RES.file("marta-bus-856-only.gtfs.zip");

public static final DirectFlexPathCalculator CALCULATOR = new DirectFlexPathCalculator();
private static final LocalDate SERVICE_DATE = LocalDate.of(2021, 4, 11);
private static final int SECONDS_SINCE_MIDNIGHT = LocalTime.of(10, 0).toSecondOfDay();
public static final FlexServiceDate FLEX_DATE = new FlexServiceDate(
SERVICE_DATE,
SECONDS_SINCE_MIDNIGHT,
RoutingBookingInfo.NOT_SET,
new TIntHashSet()
);

public static TestOtpModel aspenGtfs() {
return buildFlexGraph(ASPEN_GTFS);
}
Expand All @@ -52,18 +36,6 @@ public static TestOtpModel cobbFlexGtfs() {
return buildFlexGraph(COBB_FLEX_GTFS);
}

public static TestOtpModel cobbBus30Gtfs() {
return buildFlexGraph(COBB_BUS_30_GTFS);
}

public static TestOtpModel martaBus856Gtfs() {
return buildFlexGraph(MARTA_BUS_856_GTFS);
}

public static TestOtpModel lincolnCountyGtfs() {
return buildFlexGraph(LINCOLN_COUNTY_GTFS);
}

public static TestOtpModel cobbOsm() {
return ConstantsForTests.buildOsmGraph(COBB_OSM);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.opentripplanner.test.support.PolylineAssert.assertThatPolylinesAreEqual;

import java.time.LocalDateTime;
Expand Down Expand Up @@ -188,15 +187,6 @@ void shouldNotInterpolateFlexTimes() {
assertEquals(StopTime.MISSING_VALUE, arrivalTime);
}

/**
* Checks that trips which have continuous pick up/drop off set are parsed correctly.
*/
@Test
void parseContinuousPickup() {
var lincolnGraph = FlexIntegrationTestData.lincolnCountyGtfs();
assertNotNull(lincolnGraph);
}

@BeforeAll
static void setup() {
TestOtpModel model = FlexIntegrationTestData.cobbFlexGtfs();
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading