Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add normalised code column #788

Merged

Conversation

SimonH
Copy link
Contributor

@SimonH SimonH commented May 3, 2019

This PR builds on #786, which should be merged first. (or ignored if this PR is approved as a single item)
Using the new same_as values to determine the correct value to add for a new normalised_code column.

Currently the column is only set for non-GB locations. The GB locations will be updated separately at a later date.

I have added a unit test to ensure that all rows have the correct value set in the new column.

@julien-duponchelle
Copy link
Contributor

In your PR the normalized code look like: urn:trainline:public:nloc:eu18

I think the normalized code should not include eu in their name to be futur proof if one day we expand outside the European continent.

@SimonH
Copy link
Contributor Author

SimonH commented May 6, 2019

Starting the current normalised identifiers in this file with euXX does not mean that all normalised location identifiers will have the same format. (For example: normalised location identifiers from atoc, which will be going against the GB stations in this file, will be of the form urn:trainline:public:nloc:atocXXX).
When locations from the rest of the world are added, regardless of whether they are added into stations.csv or come from a different source, an appropriate prefix can be assigned at the time to differentiate any numerical clashes.

test_data.rb Outdated Show resolved Hide resolved
test_data.rb Outdated Show resolved Hide resolved
test_data.rb Outdated Show resolved Hide resolved
@julien-duponchelle julien-duponchelle merged commit 7620597 into trainline-eu:master May 7, 2019
@SimonH SimonH deleted the AddNormalisedCodeColumn branch May 7, 2019 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants