Skip to content

Commit

Permalink
refactor: rename CanalTP to hove-io
Browse files Browse the repository at this point in the history
  • Loading branch information
woshilapin committed May 23, 2023
1 parent 54d2260 commit 88c901a
Show file tree
Hide file tree
Showing 34 changed files with 122 additions and 122 deletions.
2 changes: 1 addition & 1 deletion fixtures/ed/ntfs/contributors.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
contributor_id,contributor_name,contributor_website,contributor_license
C1,C1,http://www.canaltp.fr,LICENSE
C1,C1,http://www.hove.com,LICENSE
2 changes: 1 addition & 1 deletion fixtures/ed/ntfs/feed_infos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ feed_end_date,20150826
feed_creation_date,20150415
feed_creation_time,15:32:34
feed_publisher_name,Ile de France open data
feed_publisher_url,http://www.canaltp.fr
feed_publisher_url,http://www.hove.com
feed_license,ODBL
fusio_url,
fusio_version,
2 changes: 1 addition & 1 deletion fixtures/ed/ntfs_v5/feed_infos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ feed_end_date,20150826
feed_creation_date,20150415
feed_creation_time,15:32:34
feed_publisher_name,Ile de France open data
feed_publisher_url,http://www.canaltp.fr
feed_publisher_url,http://www.hove.com
feed_license,ODBL
fusio_url,
fusio_version,
4 changes: 2 additions & 2 deletions source/autocomplete/tests/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1774,8 +1774,8 @@ BOOST_AUTO_TEST_CASE(synonyms_with_non_ascii) {
autocomplete_map synonyms{{"fac", "université"}, {"faculté", "université"}, {"embarcadère", "gare maritime"}};

Autocomplete<unsigned int> ac;
ac.add_string("université de canaltp", 0, ghostwords, synonyms);
ac.add_string("gare maritime de canaltp", 1, ghostwords, synonyms);
ac.add_string("université de hove", 0, ghostwords, synonyms);
ac.add_string("gare maritime de hove", 1, ghostwords, synonyms);
ac.build();

auto res0 = ac.find_complete(
Expand Down
2 changes: 1 addition & 1 deletion source/ed/build_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ builder::builder(const std::string& date,
data->loaded = true;
data->meta->instance_name = "builder";
data->meta->publisher_name = publisher_name;
data->meta->publisher_url = "www.canaltp.fr";
data->meta->publisher_url = "www.hove.com";
data->meta->license = "ODBL";

// for the moment we can only have one timezone per dataset
Expand Down
2 changes: 1 addition & 1 deletion source/ed/build_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ struct builder {
builder(const std::string& date,
std::function<void(builder&)> builder_callback = make_builder,
bool no_dummy = false,
const std::string& publisher_name = "canal tp",
const std::string& publisher_name = "hove",
const std::string& timezone_name = "UTC",
navitia::type::TimeZoneHandler::dst_periods timezone = {});

Expand Down
2 changes: 1 addition & 1 deletion source/ed/docker_tests/ed_integration_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ BOOST_FIXTURE_TEST_CASE(fusio_test, ArgsFixture) {

BOOST_REQUIRE_EQUAL(data.pt_data->contributors.size(), 1);
BOOST_REQUIRE_EQUAL(data.pt_data->contributors[0]->license, "LICENSE");
BOOST_REQUIRE_EQUAL(data.pt_data->contributors[0]->website, "http://www.canaltp.fr");
BOOST_REQUIRE_EQUAL(data.pt_data->contributors[0]->website, "http://www.hove.com");

// Here we check trip_short_name as well as headsign of some vjs
const nt::HeadsignHandler& headsigns = data.pt_data->headsign_handler;
Expand Down
8 changes: 4 additions & 4 deletions source/ed/tests/fusioparser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(parse_small_ntfs_dataset) {

// Check website, license of contributor
BOOST_REQUIRE_EQUAL(data.contributors.size(), 1);
BOOST_REQUIRE_EQUAL(data.contributors[0]->website, "http://www.canaltp.fr");
BOOST_REQUIRE_EQUAL(data.contributors[0]->website, "http://www.hove.com");
BOOST_REQUIRE_EQUAL(data.contributors[0]->license, "LICENSE");

// Check datasets
Expand Down Expand Up @@ -206,7 +206,7 @@ BOOST_AUTO_TEST_CASE(parse_small_ntfs_dataset) {
std::map<std::string, std::string> feed_info_test = {{"feed_start_date", "20150325"},
{"feed_end_date", "20150826"},
{"feed_publisher_name", "Ile de France open data"},
{"feed_publisher_url", "http://www.canaltp.fr"},
{"feed_publisher_url", "http://www.hove.com"},
{"feed_license", "ODBL"},
{"feed_creation_datetime", "20150415T153234"}};
BOOST_CHECK_EQUAL_COLLECTIONS(data.feed_infos.begin(), data.feed_infos.end(), feed_info_test.begin(),
Expand Down Expand Up @@ -369,7 +369,7 @@ BOOST_AUTO_TEST_CASE(ntfs_with_feed_start_end_date_1) {
std::map<std::string, std::string> feed_info_test = {{"feed_start_date", "20150325"},
{"feed_end_date", "20150826"},
{"feed_publisher_name", "Ile de France open data"},
{"feed_publisher_url", "http://www.canaltp.fr"},
{"feed_publisher_url", "http://www.hove.com"},
{"feed_license", "ODBL"},
{"feed_creation_datetime", "20150415T153234"}};
BOOST_CHECK_EQUAL_COLLECTIONS(data.feed_infos.begin(), data.feed_infos.end(), feed_info_test.begin(),
Expand Down Expand Up @@ -401,7 +401,7 @@ BOOST_AUTO_TEST_CASE(ntfs_with_feed_start_end_date_2) {
std::map<std::string, std::string> feed_info_test = {{"feed_start_date", "20150325"},
{"feed_end_date", "20150826"},
{"feed_publisher_name", "Ile de France open data"},
{"feed_publisher_url", "http://www.canaltp.fr"},
{"feed_publisher_url", "http://www.hove.com"},
{"feed_license", "ODBL"},
{"feed_creation_datetime", "20150415T153234"}};
BOOST_CHECK_EQUAL_COLLECTIONS(data.feed_infos.begin(), data.feed_infos.end(), feed_info_test.begin(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def multi_proxy_creation_test():
"timezone": "Europe/Paris",
"service_url": "https://clever_age.com",
"timeout": 1,
"service_args": {"X-Keolis-Api-Version": "1.0", "X-Keolis-Api-Key": "KISIO_2021"},
"service_args": {"X-Keolis-Api-Version": "1.0", "X-Keolis-Api-Key": "HOVE_2021"},
},
},
{
Expand All @@ -202,7 +202,7 @@ def mock_get_realtime_proxies_from_db():
'service_url': 'https://clever_age.come',
'timeout': 1,
"timezone": "Europe/Paris",
"service_args": {"X-Keolis-Api-Version": "1.0", "X-Keolis-Api-Key": "KISIO_2021"},
"service_args": {"X-Keolis-Api-Version": "1.0", "X-Keolis-Api-Key": "HOVE_2021"},
},
}
rt_proxies["clever_age_TBC"] = ExternalService(id='clever_age_TBC', json=json)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"arrivalDate": "2017-12-25T08:25:36+01:00",
"duration": 1057,
"distance": 12650,
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=KISIO&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D4bcd0b9d-2c9d-42a2-8ffb-4508c952f4fb",
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=HOVE&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D4bcd0b9d-2c9d-42a2-8ffb-4508c952f4fb",
"paths": [
{
"mode": "RIDESHARINGAD",
Expand Down Expand Up @@ -112,7 +112,7 @@
"arrivalDate": "2017-12-25T08:53:09+01:00",
"duration": 1047,
"distance": 11686,
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=KISIO&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D05223c04-834d-4710-905f-aa3796da5837",
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=HOVE&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D05223c04-834d-4710-905f-aa3796da5837",
"paths": [
{
"mode": "RIDESHARINGAD",
Expand Down Expand Up @@ -163,7 +163,7 @@
]
}
],
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=KISIO&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResults%26networkId%3D33%26from%3D48.109377%252C-1.682103%26to%3D48.020335%252C-1.743929%26multimodal%3Dfalse%26departureDate%3D2017-12-25T08%253A00%253A00%252B01%253A00"
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=HOVE&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResults%26networkId%3D33%26from%3D48.109377%252C-1.682103%26to%3D48.020335%252C-1.743929%26multimodal%3Dfalse%26departureDate%3D2017-12-25T08%253A00%253A00%252B01%253A00"
}
"""
Expand Down Expand Up @@ -264,7 +264,7 @@ def instant_system_test():
assert ridesharing_journeys[0].metadata.rating_scale_max == 10
assert (
ridesharing_journeys[0].ridesharing_ad
== 'https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=KISIO&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D4bcd0b9d-2c9d-42a2-8ffb-4508c952f4fb'
== 'https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=HOVE&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D4bcd0b9d-2c9d-42a2-8ffb-4508c952f4fb'
)

assert ridesharing_journeys[0].pickup_place.addr == "" # address is not provided in mock
Expand Down Expand Up @@ -306,7 +306,7 @@ def instant_system_test():
assert ridesharing_journeys[1].shape
assert (
ridesharing_journeys[1].ridesharing_ad
== "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=KISIO&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D05223c04-834d-4710-905f-aa3796da5837"
== "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=HOVE&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D05223c04-834d-4710-905f-aa3796da5837"
)

assert ridesharing_journeys[1].pickup_place.addr == ""
Expand Down
10 changes: 5 additions & 5 deletions source/jormungandr/jormungandr/tests/planner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

def check_basic_journeys_request(journeys_req):
assert len(journeys_req.origin) == 1
assert journeys_req.origin[0].place == "Kisio Digital"
assert journeys_req.origin[0].place == "Hove"
assert journeys_req.origin[0].access_duration == 42

assert len(journeys_req.destination) == 1
Expand Down Expand Up @@ -76,7 +76,7 @@ def check_graphical_isochrones_request(isochrone_request):


def create_journeys_request_test():
origin = {"Kisio Digital": 42}
origin = {"Hove": 42}
destination = {"Somewhere": 666}
journey_parameters = JourneyParameters()
datetime = str_to_time_stamp("20120614T080000")
Expand All @@ -90,7 +90,7 @@ def create_journeys_request_test():


def test_journey_request_current_time():
origin = {"Kisio Digital": 42}
origin = {"Hove": 42}
destination = {"Somewhere": 666}
datetime = str_to_time_stamp("20120614T080000")
journey_parameters = JourneyParameters(current_datetime=123456789)
Expand All @@ -100,7 +100,7 @@ def test_journey_request_current_time():


def create_graphical_isochrones_request_test():
origin = {"Kisio Digital": 42}
origin = {"Hove": 42}
destination = {"Somewhere": 666}
graphical_isochrones_parameters = GraphicalIsochronesParameters()
datetime = str_to_time_stamp("20120614T080000")
Expand All @@ -114,7 +114,7 @@ def create_graphical_isochrones_request_test():


def test_journey_request_tranfer_penalties():
origin = {"Kisio Digital": 42}
origin = {"Hove": 42}
destination = {"Somewhere": 666}
journey_parameters = JourneyParameters(arrival_transfer_penalty=60, walking_transfer_penalty=240)
datetime = str_to_time_stamp("20120614T080000")
Expand Down
2 changes: 1 addition & 1 deletion source/jormungandr/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
setup(
name='jormungandr',
description='webservice d\'exposition en http de kraken',
author='Kisio Digital',
author='Hove',
author_email='[email protected]',
url='www.navitia.io',
packages=find_packages(),
Expand Down
4 changes: 2 additions & 2 deletions source/jormungandr/tests/here_distributed_routing_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_feed_publishers(self):
assert feeds[0].get('id') == 'builder'
assert feeds[0].get('name') == 'routing api data'
assert feeds[0].get('license') == 'ODBL'
assert feeds[0].get('url') == 'www.canaltp.fr'
assert feeds[0].get('url') == 'www.hove.com'

assert feeds[1].get('id') == 'here'
assert feeds[1].get('name') == 'here'
Expand All @@ -107,7 +107,7 @@ def test_feed_publishers(self):
assert feeds[0].get('id') == 'builder'
assert feeds[0].get('name') == 'routing api data'
assert feeds[0].get('license') == 'ODBL'
assert feeds[0].get('url') == 'www.canaltp.fr'
assert feeds[0].get('url') == 'www.hove.com'

assert feeds[1].get('id') == 'here'
assert feeds[1].get('name') == 'here'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"arrivalDate": "2017-12-25T08:25:36+01:00",
"duration": 55,
"distance": 224,
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=KISIO&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D4bcd0b9d-2c9d-42a2-8ffb-4508c952f4fb",
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=HOVE&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResultDetail%26networkId%3D33%26journeyId%3D4bcd0b9d-2c9d-42a2-8ffb-4508c952f4fb",
"paths": [
{
"mode": "RIDESHARINGAD",
Expand All @@ -94,7 +94,7 @@
],
}
],
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=KISIO&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResults%26networkId%3D33%26from%3D48.109377%252C-1.682103%26to%3D48.020335%252C-1.743929%26multimodal%3Dfalse%26departureDate%3D2017-12-25T08%253A00%253A00%252B01%253A00",
"url": "https://jky8k.app.goo.gl/?efr=1&apn=com.is.android.rennes&ibi=&isi=&utm_campaign=HOVE&link=https%3A%2F%2Fwww.star.fr%2Fsearch%2F%3FfeatureName%3DsearchResults%26networkId%3D33%26from%3D48.109377%252C-1.682103%26to%3D48.020335%252C-1.743929%26multimodal%3Dfalse%26departureDate%3D2017-12-25T08%253A00%253A00%252B01%253A00",
}


Expand Down
4 changes: 2 additions & 2 deletions source/jormungandr/tests/journey_common_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_journeys(self):
assert feed_publisher["id"] == "builder"
assert feed_publisher["name"] == 'routing api data'
assert feed_publisher["license"] == "ODBL"
assert feed_publisher["url"] == "www.canaltp.fr"
assert feed_publisher["url"] == "www.hove.com"

self.check_context(response)

Expand Down Expand Up @@ -1511,7 +1511,7 @@ def test_novalidjourney_on_first_call(self):
feed_publisher = next(f for f in feed_publishers if f['id'] == "base_contributor")
assert feed_publisher["name"] == "base contributor"
assert feed_publisher["license"] == "L-contributor"
assert feed_publisher["url"] == "www.canaltp.fr"
assert feed_publisher["url"] == "www.hove.com"

osm = next(f for f in feed_publishers if f['id'] == "osm")
assert osm["name"] == "openstreetmap"
Expand Down
4 changes: 2 additions & 2 deletions source/jormungandr/tests/parking_places_provider_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def test_journey_sections_from_to_poi_with_stands(self):
'id': 'builder',
'name': 'routing api data',
'license': 'ODBL',
'url': 'www.canaltp.fr',
'url': 'www.hove.com',
}
# we check that the feedpublisher of the bss provider has been added
bss_provider = next(f for f in feeds if f['name'] == 'mock bss provider')
Expand Down Expand Up @@ -489,7 +489,7 @@ def test_journey_sections_with_different_providers(self):
'id': 'builder',
'name': 'routing api data',
'license': 'ODBL',
'url': 'www.canaltp.fr',
'url': 'www.hove.com',
}
# we check that the feedpublisher of the bss providers has been added
bss_provider_1 = next(f for f in feeds if f['name'] == 'provider 1')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@

MOCKED_PROXY_CONF = [
{
"object_id_tag": "Kisio数字",
"id": "Kisio数字",
"object_id_tag": "Hove数字",
"id": "Hove数字",
"class": "jormungandr.realtime_schedule.cleverage.Cleverage",
"args": {
"destination_id_tag": "Kisio数字",
"destination_id_tag": "Hove数字",
"timezone": "UTC",
"service_url": "http://XXXX",
"timeout": 15,
Expand Down Expand Up @@ -71,7 +71,7 @@ def test_stop_schedule_with_realtime_only(self):
[
{
"name": "Lianes 5",
"code": "Kisio数字 A",
"code": "Hove数字 A",
"type": "Bus",
"schedules": [
{
Expand Down Expand Up @@ -152,7 +152,7 @@ def test_stop_schedule_with_theoric_and_realtime(self):
[
{
"name": "Lianes 5",
"code": "Kisio数字 A",
"code": "Hove数字 A",
"type": "Bus",
"schedules": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@

MOCKED_PROXY_CONF = [
{
"object_id_tag": "Kisio数字",
"id": "Kisio数字",
"object_id_tag": "Hove数字",
"id": "Hove数字",
"class": "jormungandr.realtime_schedule.siri_lite.SiriLite",
"args": {
"destination_id_tag": "Kisio数字",
"destination_id_tag": "Hove数字",
"timezone": "Europe/Paris",
"service_url": "http://siri.com?apikey=bob",
"timeout": 15,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

MOCKED_PROXY_CONF = [
{
"object_id_tag": "Kisio数字",
"id": "Kisio数字",
"object_id_tag": "Hove数字",
"id": "Hove数字",
"class": "jormungandr.realtime_schedule.synthese.Synthese",
"args": {"timezone": "UTC", "service_url": "http://bob.com", "timeout": 15},
}
Expand Down
Loading

0 comments on commit 88c901a

Please sign in to comment.