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

Pole echange compa #1344

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -70513,3 +70513,4 @@ id;name;slug;uic;uic8_sncf;latitude;longitude;parent_station_id;country;time_zon
74665;Camigliano;camigliano;;;39.54774;16.84898;;IT;Europe/Rome;t;f;f;t;f;f;;;f;;f;;f;;f;ITCIN;t;;f;;f;;f;;f;;f;;f;;;;;f;;f;;f;;f;;f;;f;f;;;;;;;;;;;;;;;;;;;;urn:trainline:public:nloc:csv74665;
74666;Recco Molo di Levante;recco-molo-di-levante;;;44.359234;9.141982;;IT;Europe/Rome;f;f;f;t;f;f;;;f;;f;;f;;f;;f;;f;;f;;f;;f;;f;8314739;t;;;;;f;;f;;f;;f;;f;;f;f;;;;;;;;;;;;;;;;;;;;urn:trainline:public:nloc:csv74666;
74667;Apricena Garganico;apricena-garganico;;;41.779016;15.445426;;IT;Europe/Rome;f;f;f;t;f;f;;;f;;f;;f;;f;;f;;f;;f;;f;;f;;f;8337003;t;;;;;f;;f;;f;;f;;f;;f;f;;;;;;;;;;;;;;;;;;;;urn:trainline:public:nloc:csv74667;
74668;Chartres Pôle d’échanges – Compa;chartres-pole-dechanges-compa;8772636;87726364;48.4464;1.4767;4029;FR;Europe/Paris;f;f;f;f;f;f;FRJMZ;;t;;f;;f;;f;;f;;f;;f;;f;;f;;f;;f;;;;;f;;f;;f;;f;;f;;f;f;;;;;;;;;;;;;;;;;;;;urn:trainline:public:nloc:csv74668;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about the "s", though

14 changes: 13 additions & 1 deletion test_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def test_slugs_with_countries_have_country_hint
end
end

def test_uic
def test_uic_country
STATIONS.each do |row|
if !Constants::UIC_KNOWN_DISCREPANCIES.include?(row["id"]) &&
!row["uic"].nil? &&
Expand All @@ -415,6 +415,18 @@ def test_uic
end
end

def test_uic_unique
uic_list = Set.new

STATIONS.each do |row|
if !row["uic"].nil? && row["same_as"].nil?
assert !uic_list.include?(row["uic"]), "Station #{row["name"]} (#{row["id"]}) has its UIC code (#{row["uic"]}) already in use."

uic_list << row["uic"]
end
end
end

def test_uic8_sncf
STATIONS.each do |row|
uic8_sncf = row["uic8_sncf"] || "#{row["uic"]}x"
Expand Down