minotor 7.0.2 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/.cspell.json +11 -1
  2. package/CHANGELOG.md +8 -3
  3. package/README.md +26 -24
  4. package/dist/cli.mjs +1243 -267
  5. package/dist/cli.mjs.map +1 -1
  6. package/dist/gtfs/transfers.d.ts +13 -4
  7. package/dist/gtfs/trips.d.ts +12 -7
  8. package/dist/parser.cjs.js +494 -71
  9. package/dist/parser.cjs.js.map +1 -1
  10. package/dist/parser.esm.js +494 -71
  11. package/dist/parser.esm.js.map +1 -1
  12. package/dist/router.cjs.js +1 -1
  13. package/dist/router.cjs.js.map +1 -1
  14. package/dist/router.d.ts +2 -2
  15. package/dist/router.esm.js +1 -1
  16. package/dist/router.esm.js.map +1 -1
  17. package/dist/router.umd.js +1 -1
  18. package/dist/router.umd.js.map +1 -1
  19. package/dist/routing/__tests__/plotter.test.d.ts +1 -0
  20. package/dist/routing/plotter.d.ts +42 -3
  21. package/dist/routing/result.d.ts +23 -7
  22. package/dist/routing/route.d.ts +2 -0
  23. package/dist/routing/router.d.ts +78 -19
  24. package/dist/timetable/__tests__/tripId.test.d.ts +1 -0
  25. package/dist/timetable/io.d.ts +4 -2
  26. package/dist/timetable/proto/timetable.d.ts +13 -1
  27. package/dist/timetable/route.d.ts +41 -8
  28. package/dist/timetable/timetable.d.ts +18 -3
  29. package/dist/timetable/tripId.d.ts +15 -0
  30. package/package.json +1 -1
  31. package/src/__e2e__/router.test.ts +114 -105
  32. package/src/__e2e__/timetable/stops.bin +2 -2
  33. package/src/__e2e__/timetable/timetable.bin +2 -2
  34. package/src/cli/repl.ts +259 -1
  35. package/src/gtfs/__tests__/transfers.test.ts +468 -12
  36. package/src/gtfs/__tests__/trips.test.ts +350 -28
  37. package/src/gtfs/parser.ts +16 -4
  38. package/src/gtfs/transfers.ts +61 -18
  39. package/src/gtfs/trips.ts +97 -22
  40. package/src/router.ts +2 -2
  41. package/src/routing/__tests__/plotter.test.ts +230 -0
  42. package/src/routing/__tests__/result.test.ts +486 -125
  43. package/src/routing/__tests__/route.test.ts +7 -3
  44. package/src/routing/__tests__/router.test.ts +378 -172
  45. package/src/routing/plotter.ts +279 -48
  46. package/src/routing/result.ts +114 -34
  47. package/src/routing/route.ts +0 -3
  48. package/src/routing/router.ts +332 -211
  49. package/src/timetable/__tests__/io.test.ts +33 -1
  50. package/src/timetable/__tests__/route.test.ts +10 -3
  51. package/src/timetable/__tests__/timetable.test.ts +225 -57
  52. package/src/timetable/__tests__/tripId.test.ts +27 -0
  53. package/src/timetable/io.ts +71 -10
  54. package/src/timetable/proto/timetable.proto +14 -2
  55. package/src/timetable/proto/timetable.ts +218 -20
  56. package/src/timetable/route.ts +152 -19
  57. package/src/timetable/timetable.ts +45 -6
  58. package/src/timetable/tripId.ts +29 -0
package/.cspell.json CHANGED
@@ -41,7 +41,17 @@
41
41
  "Moritz",
42
42
  "Haut",
43
43
  "Rhin",
44
- "Olten"
44
+ "Olten",
45
+ "graphviz",
46
+ "rankdir",
47
+ "bgcolor",
48
+ "nodesep",
49
+ "ranksep",
50
+ "fontname",
51
+ "dropoff",
52
+ "boardable",
53
+ "alightable",
54
+ "penwidth"
45
55
  ],
46
56
  "flagWords": [],
47
57
  "ignorePaths": [
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
- ## [7.0.2](https://github.com/aubryio/minotor/compare/v7.0.1...v7.0.2) (2025-09-23)
1
+ # [8.0.0](https://github.com/aubryio/minotor/compare/v7.0.2...v8.0.0) (2025-11-15)
2
2
 
3
3
 
4
- ### Performance Improvements
4
+ ### Features
5
5
 
6
- * minor perf improvements ([#28](https://github.com/aubryio/minotor/issues/28)) ([8bd3150](https://github.com/aubryio/minotor/commit/8bd3150669c6d7abee2f2c5759fb0946f3cb509f))
6
+ * support for trip-to-trip in-seat transfers ([#30](https://github.com/aubryio/minotor/issues/30)) ([dc61870](https://github.com/aubryio/minotor/commit/dc6187084c02c0e7211793c146e0dc47c1ace23e))
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * Timetable binary format was updated and is not compatible with the previous one.
package/README.md CHANGED
@@ -134,19 +134,34 @@ Make sure you have a working [node](https://nodejs.org) environment.
134
134
 
135
135
  `protoc` also needs to be available on the build system.
136
136
 
137
- Ubuntu: `sudo apt install -y protobuf-compiler` |
138
- Fedora: `sudo dnf install -y protobuf-compiler` |
137
+ Ubuntu: `apt install -y protobuf-compiler` |
138
+ Fedora: `dnf install -y protobuf-compiler` |
139
139
  MacOS: `brew install protobuf`
140
140
 
141
141
  ### Debugging
142
142
 
143
- It is possible to plot the router graph to debug the algorithm:
143
+ Using the npm script `repl`, or `minotor repl` if the project is installed globally, it is possible to inspect the internals
144
+ of the router.
144
145
 
145
- Using the npm script `repl`, or `minotor repl` if the project is installed globally.
146
+ #### Inspect a stop
147
+
148
+ `minotor> .inspect stop <id|sourceId|name>`
149
+
150
+ #### Inspect a route
151
+
152
+ `minotor> .inspect route <id>`
153
+
154
+ #### Plot the routing graph
155
+
156
+ Make sure you have `graphviz` installed.
157
+
158
+ Ubuntu: `apt install -y graphviz` |
159
+ Fedora: `dnf install -y graphviz` |
160
+ MacOS: `brew install graphviz`
146
161
 
147
162
  `minotor> .plot from <stationId> to <stationId> at <HH:mm> [with <N> transfers] [to <graph.dot>]`
148
163
 
149
- `dot -Ksfdp -Tsvg graph.dot -o graph.svg `
164
+ `dot -Ksfdp -Tsvg graph.dot -o graph.svg`
150
165
 
151
166
  ### Build
152
167
 
@@ -161,6 +176,9 @@ Using the npm script `repl`, or `minotor repl` if the project is installed globa
161
176
  ### End-to-End Tests
162
177
 
163
178
  - `e2e`: runs end-to-end tests, using a real data from a day in the Swiss GTFS dataset
179
+
180
+ ### Performance Tests
181
+
164
182
  - `perf`: runs a basic performance test, using a real data from a day in the Swiss GTFS dataset
165
183
 
166
184
  Note that performance tests are not included in the CI pipeline and must be run manually.
@@ -177,22 +195,6 @@ Note that performance tests are not included in the CI pipeline and must be run
177
195
 
178
196
  Releases are automatically published to npm when merging to the `main` or `beta` (pre-release) branch.
179
197
 
180
- ## Roadmap
181
-
182
- The project is under active development. Here are some of the features that are planned (ordered by priority).
183
- Contact [the author](https://aubry.io/) for feature requests.
184
-
185
- - Route/Trip-based transfer support
186
- - Favor shorter trips with less transfers in case of tie
187
- - Arrive-by support
188
- - Range queries
189
- - Transfer preferences
190
- - Route/Trip metadata support
191
- - Routing filters based on metadata e.g. bicycle support, wheelchair access
192
- - More routing options (slower/faster transfers, etc.)
193
- - Improved stop search (sort by stop importance)
194
- - Real-time timetable support (tripId/routeId mapping)
195
- - Support for exporting a calendar range as opposed to a single day
196
- - Support for GTFS `frequencies.txt`
197
- - Load multiple GTFS archives at once
198
- - NeTEx support
198
+ ## Roadmap and requests
199
+
200
+ The project is under active development, use github issues for reporting bugs and requesting features (make sure to not create duplicates and follow the templates). For custom development, consulting, integrations, or other special requests, feel free to contact [the author](https://aubry.io/).