Repository navigation
Conversation
Stations now default to Wikidata's railway stations worldwide, fetched at build time from the Offware places dataset (CC0), instead of Trainline's European list. People who used the app before keep Trainline unless they switch in Settings, so their saved station ids stay valid. Landmarks come from the same dataset: the 10,000 best-known sights, UNESCO sites excluded.
The places repository becomes Offware's shared data repository, with one folder per dataset: stations/railways.json and places/landmarks.json.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: railway stations came from Trainline's open database, which covers Europe only. Landmarks were a small hand-seeded list.
After: new users get railway stations worldwide from Wikidata by default, and landmarks are the 10,000 best-known sights (museums, monuments, castles, palaces, parks). Both come from Offware's shared data repository (https://github.com/offware-apps/data), which is CC0 and keeps every record's Wikidata id as its source. Trainline and None stay selectable in Settings.
People who used the app before and never picked a source keep Trainline, so the station ids already saved in their visits keep matching.
How:
scripts/fetch-places.mjsdownloadsstations/railways.jsonandplaces/landmarks.jsonat build time, checks their shape, licence and coordinates, and writespublic/reference/railways-wikidata.jsonandlandmarks.json. The Pages and Android workflows run it before the build, and Pages also rebuilds weekly to pick up data updates. The worldwide stations file is runtime-cached rather than precached, since it can outgrow the precache size limit. Provenance (Settings and PROVENANCE.md) names the new sources. Spec inspecs/022-shared-places/.Merge once the shared data is live at https://offware-apps.github.io/data/v1/catalog.json: until then the fetch step fails on purpose, because a build without any stations file would leave new users with no stations.
Checks: typecheck and all 704 unit tests pass locally.