From ade53b1e219da023a03e5e39632f20f723de4258 Mon Sep 17 00:00:00 2001 From: sharhio Date: Mon, 13 Nov 2023 15:52:13 +0200 Subject: [PATCH 1/6] Emissions.txt is not a requirement --- .../emissions/Co2EmissionsDataReaderTest.java | 15 ++++++ .../emissions/emissions-missing-test-gtfs.zip | Bin 0 -> 323 bytes .../emissions-missing-test-gtfs/feed_info.txt | 2 + .../ext/emissions/Co2EmissionsDataReader.java | 47 ++++++++++-------- 4 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-missing-test-gtfs.zip create mode 100644 src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-missing-test-gtfs/feed_info.txt diff --git a/src/ext-test/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReaderTest.java b/src/ext-test/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReaderTest.java index 235badd9f48..4bb50d0522e 100644 --- a/src/ext-test/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReaderTest.java +++ b/src/ext-test/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReaderTest.java @@ -1,6 +1,7 @@ package org.opentripplanner.ext.emissions; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import java.io.File; import org.junit.jupiter.api.Test; @@ -13,6 +14,8 @@ public class Co2EmissionsDataReaderTest { private static final File CO2_GTFS_ZIP = RES.file("emissions-test-gtfs.zip"); private static final File CO2_GTFS = RES.file("emissions-test-gtfs/"); private static final File INVALID_CO2_GTFS = RES.file("emissions-invalid-test-gtfs/"); + private static final File CO2_MISSING_GTFS_ZIP = RES.file("emissions-missing-test-gtfs.zip"); + private static final File CO2_MISSING_GTFS = RES.file("emissions-missing-test-gtfs"); private Co2EmissionsDataReader co2EmissionsDataReader = new Co2EmissionsDataReader( new DefaultDataImportIssueStore() @@ -35,4 +38,16 @@ void testInvalidCo2EmissionsDataReading() { var emissions = co2EmissionsDataReader.readGtfs(INVALID_CO2_GTFS); assertEquals(0, emissions.size()); } + + @Test + void testMissingCo2EmissionsZipDataReading() { + var emissions = co2EmissionsDataReader.readGtfsZip(CO2_MISSING_GTFS_ZIP); + assertNull(emissions); + } + + @Test + void testMissingCo2EmissionsDataReading() { + var emissions = co2EmissionsDataReader.readGtfs(CO2_MISSING_GTFS); + assertNull(emissions); + } } diff --git a/src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-missing-test-gtfs.zip b/src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-missing-test-gtfs.zip new file mode 100644 index 0000000000000000000000000000000000000000..fe49a6ebc481ef23959de7ac11320c60fcc7f739 GIT binary patch literal 323 zcmWIWW@Zs#-~ht5(1>sbC^!bBc^MQK(o$1X;xqHo^7Tq8NC$rL}+&)-ysD7m;cpV{0`iaJb`-720GJPk`Cvc{@VMf{m99<%rlh((eQ1H4(;K$;kVFd9f-0&y4sK89pN literal 0 HcmV?d00001 diff --git a/src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-missing-test-gtfs/feed_info.txt b/src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-missing-test-gtfs/feed_info.txt new file mode 100644 index 00000000000..612fde11bf5 --- /dev/null +++ b/src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-missing-test-gtfs/feed_info.txt @@ -0,0 +1,2 @@ +feed_publisher_name,feed_publisher_url,feed_lang,feed_start_date,feed_end_date,feed_version,feed_id +emissionstest,http://www.emissionstest.fi/,fi,20230623,20230806,2023-06-23 22:42:09,emissionstest diff --git a/src/ext/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReader.java b/src/ext/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReader.java index 6c733ee0e6a..9286dad0a90 100644 --- a/src/ext/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReader.java +++ b/src/ext/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReader.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; +import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import org.opentripplanner.framework.lang.Sandbox; import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; @@ -38,20 +39,23 @@ public Co2EmissionsDataReader(DataImportIssueStore issueStore) { */ public Map readGtfs(File directory) { String feedId = ""; - Map emissionsData = new HashMap<>(); - try (InputStream feedInfoStream = new FileInputStream(directory + "/feed_info.txt")) { - feedId = readFeedId(feedInfoStream); - } catch (IOException e) { - issueStore.add("InvalidEmissionData", "Reading feed_info.txt failed."); - LOG.error("InvalidEmissionData: reading feed_info.txt failed.", e); - } - try (InputStream stream = new FileInputStream(directory + "/emissions.txt")) { - emissionsData = readEmissions(stream, feedId); - } catch (IOException e) { - issueStore.add("InvalidEmissionData", "Reading emissions.txt failed."); - LOG.error("InvalidEmissionData: reading emissions.txt failed.", e); + File feedFile = new File(directory + "/feed_info.txt"); + File emissionsFile = new File(directory + "/emissions.txt"); + if (feedFile.exists() && emissionsFile.exists()) { + try (InputStream feedInfoStream = new FileInputStream(feedFile)) { + feedId = readFeedId(feedInfoStream); + } catch (IOException e) { + issueStore.add("InvalidEmissionData", "Reading feed_info.txt failed."); + LOG.error("InvalidEmissionData: reading feed_info.txt failed.", e); + } + try (InputStream stream = new FileInputStream(emissionsFile)) { + return readEmissions(stream, feedId); + } catch (IOException e) { + issueStore.add("InvalidEmissionData", "Reading emissions.txt failed."); + LOG.error("InvalidEmissionData: reading emissions.txt failed.", e); + } } - return emissionsData; + return null; } /** @@ -60,13 +64,16 @@ public Map readGtfs(File directory) { * @return emissions data */ public Map readGtfsZip(File file) { - try { - ZipFile zipFile = new ZipFile(file, ZipFile.OPEN_READ); - String feedId = readFeedId(zipFile.getInputStream(zipFile.getEntry("feed_info.txt"))); - InputStream stream = zipFile.getInputStream(zipFile.getEntry("emissions.txt")); - Map emissionsData = readEmissions(stream, feedId); - zipFile.close(); - return emissionsData; + try (ZipFile zipFile = new ZipFile(file, ZipFile.OPEN_READ)) { + ZipEntry feedInfo = zipFile.getEntry("feed_info.txt"); + ZipEntry emissions = zipFile.getEntry("emissions.txt"); + if (emissions != null && feedInfo != null) { + String feedId = readFeedId(zipFile.getInputStream(feedInfo)); + InputStream stream = zipFile.getInputStream(emissions); + Map emissionsData = readEmissions(stream, feedId); + zipFile.close(); + return emissionsData; + } } catch (IOException e) { issueStore.add("InvalidEmissionData", "Reading emissions data failed."); LOG.error("InvalidEmissionData: Reading emissions data failed.", e); From d56542ada031dcefe0abd0faca318962fc81ff7c Mon Sep 17 00:00:00 2001 From: sharhio Date: Tue, 14 Nov 2023 09:47:13 +0200 Subject: [PATCH 2/6] Add emissions instead of replacing --- .../opentripplanner/ext/emissions/EmissionsModule.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java b/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java index 841c5252937..a670b0e1477 100644 --- a/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java +++ b/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java @@ -50,10 +50,14 @@ public void buildGraph() { double carAvgEmissionsPerMeter = carAvgCo2PerKm / 1000 / carAvgOccupancy; for (ConfiguredDataSource gtfsData : dataSources.getGtfsConfiguredDatasource()) { + Map co2Emissions; if (gtfsData.dataSource().name().contains(".zip")) { - emissionsData = co2EmissionsDataReader.readGtfsZip(new File(gtfsData.dataSource().uri())); + co2Emissions = co2EmissionsDataReader.readGtfsZip(new File(gtfsData.dataSource().uri())); } else { - emissionsData = co2EmissionsDataReader.readGtfs(new File(gtfsData.dataSource().uri())); + co2Emissions = co2EmissionsDataReader.readGtfs(new File(gtfsData.dataSource().uri())); + } + if (co2Emissions != null) { + emissionsData.putAll(co2Emissions); } } this.emissionsDataModel.setCo2Emissions(this.emissionsData); From 52b04719124aaaaf6cb913d2483a7b34d8562374 Mon Sep 17 00:00:00 2001 From: sharhio Date: Tue, 14 Nov 2023 11:32:54 +0200 Subject: [PATCH 3/6] Variables fixed --- .../opentripplanner/ext/emissions/EmissionsModule.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java b/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java index a670b0e1477..ecdb329f30a 100644 --- a/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java +++ b/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java @@ -22,10 +22,9 @@ public class EmissionsModule implements GraphBuilderModule { private static final Logger LOG = LoggerFactory.getLogger(EmissionsModule.class); - private BuildConfig config; - private EmissionsDataModel emissionsDataModel; - private GraphBuilderDataSources dataSources; - private Map emissionsData = new HashMap<>(); + private final BuildConfig config; + private final EmissionsDataModel emissionsDataModel; + private final GraphBuilderDataSources dataSources; private final DataImportIssueStore issueStore; @Inject @@ -48,6 +47,7 @@ public void buildGraph() { double carAvgCo2PerKm = config.emissions.getCarAvgCo2PerKm(); double carAvgOccupancy = config.emissions.getCarAvgOccupancy(); double carAvgEmissionsPerMeter = carAvgCo2PerKm / 1000 / carAvgOccupancy; + Map emissionsData = new HashMap<>(); for (ConfiguredDataSource gtfsData : dataSources.getGtfsConfiguredDatasource()) { Map co2Emissions; @@ -60,7 +60,7 @@ public void buildGraph() { emissionsData.putAll(co2Emissions); } } - this.emissionsDataModel.setCo2Emissions(this.emissionsData); + this.emissionsDataModel.setCo2Emissions(emissionsData); this.emissionsDataModel.setCarAvgCo2PerMeter(carAvgEmissionsPerMeter); } } From 1fc3c8e98084f093738e6fd5ca4f46f64603e9f0 Mon Sep 17 00:00:00 2001 From: sharhio Date: Tue, 14 Nov 2023 15:18:47 +0200 Subject: [PATCH 4/6] Emissions module testing --- .../emissions/Co2EmissionsDataReaderTest.java | 6 +- .../ext/emissions/EmissionsModuleTest.java | 75 +++++++++++++++++++ .../emissions-test-gtfs/feed_info.txt | 2 +- .../ext/emissions/Co2EmissionsDataReader.java | 4 +- .../ext/emissions/EmissionsModule.java | 12 +-- .../module/configure/GraphBuilderModules.java | 7 +- 6 files changed, 91 insertions(+), 15 deletions(-) create mode 100644 src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java diff --git a/src/ext-test/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReaderTest.java b/src/ext-test/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReaderTest.java index 4bb50d0522e..4642042629a 100644 --- a/src/ext-test/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReaderTest.java +++ b/src/ext-test/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReaderTest.java @@ -1,7 +1,7 @@ package org.opentripplanner.ext.emissions; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.File; import org.junit.jupiter.api.Test; @@ -42,12 +42,12 @@ void testInvalidCo2EmissionsDataReading() { @Test void testMissingCo2EmissionsZipDataReading() { var emissions = co2EmissionsDataReader.readGtfsZip(CO2_MISSING_GTFS_ZIP); - assertNull(emissions); + assertTrue(emissions.isEmpty()); } @Test void testMissingCo2EmissionsDataReading() { var emissions = co2EmissionsDataReader.readGtfs(CO2_MISSING_GTFS); - assertNull(emissions); + assertTrue(emissions.isEmpty()); } } diff --git a/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java b/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java new file mode 100644 index 00000000000..b17dd1d0a48 --- /dev/null +++ b/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java @@ -0,0 +1,75 @@ +package org.opentripplanner.ext.emissions; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opentripplanner.datastore.api.FileType.GTFS; +import static org.opentripplanner.standalone.config.framework.json.JsonSupport.jsonNodeFromResource; + +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Multimap; +import java.io.File; +import java.util.Optional; +import org.junit.jupiter.api.Test; +import org.opentripplanner.datastore.api.DataSource; +import org.opentripplanner.datastore.api.FileType; +import org.opentripplanner.datastore.file.FileDataSource; +import org.opentripplanner.framework.application.OtpFileNames; +import org.opentripplanner.graph_builder.ConfiguredDataSource; +import org.opentripplanner.gtfs.graphbuilder.GtfsFeedParameters; +import org.opentripplanner.standalone.config.BuildConfig; +import org.opentripplanner.test.support.ResourceLoader; +import org.opentripplanner.transit.model.framework.FeedScopedId; + +public class EmissionsModuleTest { + + private final ResourceLoader RES = ResourceLoader.of( + org.opentripplanner.ext.emissions.Co2EmissionsDataReaderTest.class + ); + private final File CO2_GTFS_ZIP = RES.file("emissions-test-gtfs.zip"); + private final File CO2_GTFS = RES.file("emissions-test-gtfs/"); + private final String CONFIG_PATH = "standalone/config/" + OtpFileNames.BUILD_CONFIG_FILENAME; + private final BuildConfig buildConfig = new BuildConfig( + jsonNodeFromResource(CONFIG_PATH), + CONFIG_PATH, + true + ); + private final Multimap inputData = ArrayListMultimap.create(); + + @Test + void testMultipleGtfsDataReading() { + inputData.put(GTFS, new FileDataSource(CO2_GTFS_ZIP, GTFS)); + inputData.put(GTFS, new FileDataSource(CO2_GTFS, GTFS)); + Iterable> configuredDataSource = getGtfsConfiguredDatasource(); + EmissionsDataModel emissionsDataModel = new EmissionsDataModel(); + EmissionsModule emissionsModule = new EmissionsModule( + configuredDataSource, + buildConfig, + emissionsDataModel, + null + ); + emissionsModule.buildGraph(); + assertEquals( + Optional.of(0.006), + emissionsDataModel.getCO2EmissionsById(new FeedScopedId("emissionstest", "1001")) + ); + assertEquals( + Optional.of(0.041), + emissionsDataModel.getCO2EmissionsById(new FeedScopedId("emissionstest1", "1002")) + ); + } + + private Iterable> getGtfsConfiguredDatasource() { + return inputData + .get(GTFS) + .stream() + .map(it -> new ConfiguredDataSource<>(it, getGtfsFeedConfig(it))) + .toList(); + } + + private GtfsFeedParameters getGtfsFeedConfig(DataSource dataSource) { + return buildConfig.transitFeeds + .gtfsFeeds() + .stream() + .findFirst() + .orElse(buildConfig.gtfsDefaults.copyOf().withSource(dataSource.uri()).build()); + } +} diff --git a/src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-test-gtfs/feed_info.txt b/src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-test-gtfs/feed_info.txt index 612fde11bf5..03e9517c9ec 100644 --- a/src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-test-gtfs/feed_info.txt +++ b/src/ext-test/resources/org/opentripplanner/ext/emissions/emissions-test-gtfs/feed_info.txt @@ -1,2 +1,2 @@ feed_publisher_name,feed_publisher_url,feed_lang,feed_start_date,feed_end_date,feed_version,feed_id -emissionstest,http://www.emissionstest.fi/,fi,20230623,20230806,2023-06-23 22:42:09,emissionstest +emissionstest,http://www.emissionstest.fi/,fi,20230623,20230806,2023-06-23 22:42:09,emissionstest1 diff --git a/src/ext/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReader.java b/src/ext/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReader.java index 9286dad0a90..54abf58e3a7 100644 --- a/src/ext/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReader.java +++ b/src/ext/java/org/opentripplanner/ext/emissions/Co2EmissionsDataReader.java @@ -55,7 +55,7 @@ public Map readGtfs(File directory) { LOG.error("InvalidEmissionData: reading emissions.txt failed.", e); } } - return null; + return Map.of(); } /** @@ -78,7 +78,7 @@ public Map readGtfsZip(File file) { issueStore.add("InvalidEmissionData", "Reading emissions data failed."); LOG.error("InvalidEmissionData: Reading emissions data failed.", e); } - return null; + return Map.of(); } private Map readEmissions(InputStream stream, String feedId) diff --git a/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java b/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java index ecdb329f30a..2da4b091138 100644 --- a/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java +++ b/src/ext/java/org/opentripplanner/ext/emissions/EmissionsModule.java @@ -6,7 +6,6 @@ import java.util.HashMap; import java.util.Map; import org.opentripplanner.graph_builder.ConfiguredDataSource; -import org.opentripplanner.graph_builder.GraphBuilderDataSources; import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.graph_builder.model.GraphBuilderModule; import org.opentripplanner.gtfs.graphbuilder.GtfsFeedParameters; @@ -24,12 +23,12 @@ public class EmissionsModule implements GraphBuilderModule { private static final Logger LOG = LoggerFactory.getLogger(EmissionsModule.class); private final BuildConfig config; private final EmissionsDataModel emissionsDataModel; - private final GraphBuilderDataSources dataSources; + private final Iterable> dataSources; private final DataImportIssueStore issueStore; @Inject public EmissionsModule( - GraphBuilderDataSources dataSources, + Iterable> dataSources, BuildConfig config, EmissionsDataModel emissionsDataModel, DataImportIssueStore issueStore @@ -48,17 +47,14 @@ public void buildGraph() { double carAvgOccupancy = config.emissions.getCarAvgOccupancy(); double carAvgEmissionsPerMeter = carAvgCo2PerKm / 1000 / carAvgOccupancy; Map emissionsData = new HashMap<>(); - - for (ConfiguredDataSource gtfsData : dataSources.getGtfsConfiguredDatasource()) { + for (ConfiguredDataSource gtfsData : dataSources) { Map co2Emissions; if (gtfsData.dataSource().name().contains(".zip")) { co2Emissions = co2EmissionsDataReader.readGtfsZip(new File(gtfsData.dataSource().uri())); } else { co2Emissions = co2EmissionsDataReader.readGtfs(new File(gtfsData.dataSource().uri())); } - if (co2Emissions != null) { - emissionsData.putAll(co2Emissions); - } + emissionsData.putAll(co2Emissions); } this.emissionsDataModel.setCo2Emissions(emissionsData); this.emissionsDataModel.setCarAvgCo2PerMeter(carAvgEmissionsPerMeter); diff --git a/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java b/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java index 755b7725941..73bf7aad310 100644 --- a/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java +++ b/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java @@ -117,7 +117,12 @@ static EmissionsModule provideEmissionsModule( @Nullable EmissionsDataModel emissionsDataModel, DataImportIssueStore issueStore ) { - return new EmissionsModule(dataSources, config, emissionsDataModel, issueStore); + return new EmissionsModule( + dataSources.getGtfsConfiguredDatasource(), + config, + emissionsDataModel, + issueStore + ); } @Provides From f3906fa835cdc62bf0f158418250d7814f2c31bd Mon Sep 17 00:00:00 2001 From: sharhio <113033056+sharhio@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:04:21 +0200 Subject: [PATCH 5/6] Update src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java Co-authored-by: Leonard Ehrenfried --- .../org/opentripplanner/ext/emissions/EmissionsModuleTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java b/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java index b17dd1d0a48..e162cb8f604 100644 --- a/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java +++ b/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java @@ -22,7 +22,7 @@ public class EmissionsModuleTest { private final ResourceLoader RES = ResourceLoader.of( - org.opentripplanner.ext.emissions.Co2EmissionsDataReaderTest.class + EmissionsModuleTest.class ); private final File CO2_GTFS_ZIP = RES.file("emissions-test-gtfs.zip"); private final File CO2_GTFS = RES.file("emissions-test-gtfs/"); From b7a1bd59b34284d1bef35c990f90eba181229657 Mon Sep 17 00:00:00 2001 From: sharhio Date: Tue, 14 Nov 2023 16:50:10 +0200 Subject: [PATCH 6/6] Formatting --- .../opentripplanner/ext/emissions/EmissionsModuleTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java b/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java index e162cb8f604..0594bb2d5af 100644 --- a/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java +++ b/src/ext-test/java/org/opentripplanner/ext/emissions/EmissionsModuleTest.java @@ -21,9 +21,7 @@ public class EmissionsModuleTest { - private final ResourceLoader RES = ResourceLoader.of( - EmissionsModuleTest.class - ); + private final ResourceLoader RES = ResourceLoader.of(EmissionsModuleTest.class); private final File CO2_GTFS_ZIP = RES.file("emissions-test-gtfs.zip"); private final File CO2_GTFS = RES.file("emissions-test-gtfs/"); private final String CONFIG_PATH = "standalone/config/" + OtpFileNames.BUILD_CONFIG_FILENAME;