Repository navigation
Configure each transit feed properties individually - #4399
Conversation
Codecov Report
@@ Coverage Diff @@
## dev-2.x #4399 +/- ##
=============================================
+ Coverage 58.09% 58.15% +0.06%
- Complexity 11070 11138 +68
=============================================
Files 1454 1468 +14
Lines 58760 58955 +195
Branches 6771 6760 -11
=============================================
+ Hits 34138 34287 +149
- Misses 22586 22631 +45
- Partials 2036 2037 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
optionsome
left a comment
There was a problem hiding this comment.
I read through the code and didn't find any real issues. I tried testing this but the documentation is not there yet and I tried with roughly what was defined in #4263 but the structure of my config was probably wrong somehow and it complained that some of the defined config parameters were unused and the params were not taken into use based on testing:
12:34:35.578 WARN (NodeAdapter.java:492) Unexpected config parameter: 'osm.[1].timezone:"Europe/Helsinki"' in 'build-config.json'. Is the spelling correct?
12:34:35.579 WARN (NodeAdapter.java:492) Unexpected config parameter: 'transitFeeds.[1].feedId:"hsl-test"' in 'build-config.json'. Is the spelling correct?
12:34:35.579 WARN (NodeAdapter.java:492) Unexpected config parameter: 'transitFeeds.[1].source:"HSL-gtfs.zip"' in 'build-config.json'. Is the spelling correct?
12:34:35.579 WARN (NodeAdapter.java:492) Unexpected config parameter: 'transitFeeds.[2].source:"HSLlautta-gtfs.zip"' in 'build-config.json'. Is the spelling correct?
This was how I defined the data sources in the build-config.json
"osm": [
{
"source": "hsl.pbf",
"osmWayPropertySet": "finland",
"timezone": "Europe/Helsinki"
}
],
"dem" : [
{
"source": "hsl.tif",
"elevationUnitMultiplier": 0.1
}
],
"transitFeeds": [
{
"type": "gtfs",
"feedId": "hsl-test",
"source": "HSL-gtfs.zip"
},
{
"type": "gtfs",
"source": "HSLlautta-gtfs.zip"
}
]
|
I always thought that the name osmWayPropertySet is a strange name that doesn't tell you what it does. Would you be open to renaming it to locationProfile (just in JSON)? |
…tractConfigBuilder.java Co-authored-by: Joel Lappalainen <lappalj8@gmail.com>
…tractConfig.java Co-authored-by: Joel Lappalainen <lappalj8@gmail.com>
Your configuration is correct. There are 2 issues here: there is a bug that causes a parameter to be mistakenly reported as unused even if it is properly read. |
Sure, this can be done in the following PR that will implement property overriding for the OSM extracts. |
OK, I got confused when it crashed the build when I tried to define a relative path from where I was running the OTP from instead of a relative path from the build-config file which didn't crash the build. |
|
@optionsome now this should work also when the source parameter is relative to the base directory. |
hannesj
left a comment
There was a problem hiding this comment.
The code itself looks good, but the entur example should be updated to match the new behaviour. Same with Configuration.md, BuildConfiguration.md and GoogleCloudStorage.md
|
Entur example, Configuration.md, BuildConfiguration.md and GoogleCloudStorage.md |
| | `writeCachedElevations` | If true, writes the calculated elevation data. | boolean | false | see [Elevation Data Calculation Optimizations](#elevation-data-calculation-optimizations) | | ||
|
|
||
| This list of parameters in defined in | ||
| | `buildReportDir` | Path to directory where the build issue report will be written. | uri | null | | |
There was a problem hiding this comment.
Should these be moved to keep alphabetical order?
optionsome
left a comment
There was a problem hiding this comment.
Should we also update the OTP2-MigrationGuide.md here?
| | `blockBasedInterlining` | Whether to automatically insert an in-seat transfer between two trips with the same block id. | boolean | true | Consider using using [transfer types 4 and 5](https://github.com/google/transit/pull/303) | | ||
| | `boardingLocationTags` | The OSM tags to extract a stop's boarding location from. | list | `["ref"]` | [Detailed documentation](./BoardingLocations.md) | | ||
| | `dataImportReport` | Generate nice HTML report of Graph errors/warnings | boolean | false | | | ||
| | `dem` | Configure access to elevation data. | array | null | | |
There was a problem hiding this comment.
Maybe we should link the appropriate chapter in this file from these new descriptions as otherwise it can be confusing to understand what type of an array you need to provide.
| . | ||
|
|
||
| ## Storage | ||
| ## Transit Feeds |
There was a problem hiding this comment.
Should we explain here if it is possible to define custom configuration for one data set while not defining other data sets in the transitFeeds and just trust on the default scanning?
|
The OTP2-MigrationGuide.md should have one line saying that the feed configuration is changed. |
Summary
Extend the build-config JSON format to support per-feed configuration for OSM extracts, DEM extracts, NeTEx feeds and GTFS feeds.
This PR updates the format of the build-config.json file in order to support custom properties for OSM extracts, DEM extracts, NeTEx feeds and GTFS feeds.
It also makes use of these new properties for NeTEx feeds and GTFS feeds (overriding of feedId and file patterns)
Subsequent PRs will implement property overriding for OSM and DEM extracts.
Issue
Implements #4262 and #4263
Unit tests
✅
Documentation
Entur example, Configuration.md, BuildConfiguration.md and GoogleCloudStorage.md
and speed test configuration updated.