From 29d1c0aa4488e03987ab0eb0ec73795b5e30deab Mon Sep 17 00:00:00 2001 From: Edouard de Labareyre Date: Wed, 21 Jun 2017 13:39:38 +0200 Subject: [PATCH] Update README with latest news --- Gemfile.lock | 5 ++++- Makefile | 6 +++++- README.md | 44 ++++++++++++++++++++++++++++++++++---------- 3 files changed, 43 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5cd5cb1c..89629d3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - minitest (5.6.0) + minitest (5.6.1) stringex (2.5.2) PLATFORMS @@ -10,3 +10,6 @@ PLATFORMS DEPENDENCIES minitest (~> 5.6.0) stringex (~> 2.5.2) + +BUNDLED WITH + 1.14.3 diff --git a/Makefile b/Makefile index e1d4b1c1..46f14db4 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ -# Run the tests +.PHONY: install test + +install: + bundle install + test: ruby test_data.rb diff --git a/README.md b/README.md index 37cdb548..dc5367fe 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,18 @@ Data come from the following sources: All these sources were released under ODbL or compatible licences. +## Tests + +If you're going to modify the file, don't forget to run the automated tests to ensure consistency of the information provided. This script is used in the build triggered by merge requests. + +```bash +make install +make test +``` + ## The Data -The file `stations.csv` contains all our data representing train stations. The file is UTF-8 encoded text file and Comma Separated Value (CSV) formatted – although a semi-colon `;` is used to delimitate fields. +The file `stations.csv` contains all our data representing train stations and cities. The file is UTF-8 encoded text file and Comma Separated Value (CSV) formatted – although a semi-colon `;` is used to delimitate fields. Boolean flags are represented with t/f (true/false) values. ### Columns @@ -37,17 +46,19 @@ Column Name | Notes `longitude` | Coordinates as decimal value. `latitude` | Coordinates as decimal value. `parent_station_id` | A station can belong to a _meta station_ whose `id` is this value, i.e. _Paris Gare d’Austerlitz_ belongs to the metastation _Paris_. -`is_city` | This value is unreliable. `country` | 2 letters, [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) -`is_main_station` | This value is unreliable. `time_zone` | [Continent/Country ISO codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). -`is_suggestable` | Can the user input this station. +`is_city` | This value is unreliable. +`is_main_station` | This value is unreliable. +`is_airport` | Specify if the station is related to an airport. +`is_suggestable` | Specify if the user can input this station. +`country_hint` | Specify if the country should be displayed to disambiguate the station's name. `sncf_self_service_machine` | Presence of a SNCF self-service machine at the station. `same_as` | Some systems allow stations to be split in two, with two `id` values. If provided, the station identified by the given value should be considered as the actual station. #### Operator Specific -Operator specific columns contain identifiers and values specific to the operator. Columns are prefixed with a name unique to the operator. +Operator specific columns contain identifiers and values specific to the operator. Columns are prefixed with a name unique to the operator. `rt*` columns are about ids used in realtime APIs. Column Name | Notes ----------- | ----- @@ -63,12 +74,24 @@ Column Name | Notes `hkx_is_enabled` | `busbud_id` | `busbud_is_enabled` | +`flixbus_id` | +`flixbus_is_enabled` | `ouigo_id` | `ouigo_is_enabled` | `trenitalia_id` | `trenitalia_is_enabled` | +`trenitalia_rtvt_id` | `ntv_id` | `ntv_is_enabled` | +`ntv_rtiv_id` | +`hkx_id` | +`hkx_is_enabled` | +`renfe_id` | +`renfe_is_enabled` | +`atoc_id` | +`atoc_is_enabled` | +`benerail_id` | +`benerail_is_enabled` | #### Internationalisation @@ -82,9 +105,10 @@ Column Name | Notes `info:de` | `info:it` | -## Tests +## Productivity tools -```bash -bundle install -ruby test_data.rb -``` +#### For internationalisation + +To facilitate the internationalisation of city names, we use and maintain a script querying [Geonames API](http://www.geonames.org/) to look for city name translations. + +The project is hosted [on Github](https://github.com/mgalibert/geonames) and contains its own documentation.