From 0b1f5b9a8e6147c9c414f40bec262cd8f4caaf5c Mon Sep 17 00:00:00 2001 From: ArnaudOggy Date: Tue, 27 Aug 2024 18:02:10 +0200 Subject: [PATCH 1/3] Struct ODTReservation - rename odt_reservation_condition --- src/ntfs/mod.rs | 6 +++--- src/objects.rs | 6 +++--- tests/fixtures/ntfs/odt_reservations.txt | 2 +- tests/read_ntfs.rs | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ntfs/mod.rs b/src/ntfs/mod.rs index 13e196240..4e0f6e8fa 100644 --- a/src/ntfs/mod.rs +++ b/src/ntfs/mod.rs @@ -1105,7 +1105,7 @@ mod tests { name: Some("name:1".to_string()), url: Some("https://reservation1".to_string()), phone: Some("01 02 03 04 01".to_string()), - conditions: Some("lundi au vendredi de 9h à 18h".to_string()), + condition: Some("lundi au vendredi de 9h à 18h".to_string()), deeplink: Some("https://deeplink1".to_string()), }, ODTReservation { @@ -1113,7 +1113,7 @@ mod tests { name: None, url: Some("https://reservation2".to_string()), phone: Some("01 02 03 04 02".to_string()), - conditions: Some("lundi au samedi de 8h à 15h".to_string()), + condition: Some("lundi au samedi de 8h à 15h".to_string()), deeplink: Some("https://deeplink2".to_string()), }, ODTReservation { @@ -1121,7 +1121,7 @@ mod tests { name: Some("name:3".to_string()), url: Some("https://reservation3".to_string()), phone: Some("01 02 03 04 03".to_string()), - conditions: Some("lundi au mardi de 9h à 10h".to_string()), + condition: Some("lundi au mardi de 9h à 10h".to_string()), deeplink: Some("https://deeplink3".to_string()), }, ]) diff --git a/src/objects.rs b/src/objects.rs index 13a3e9a06..39b1b4cee 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -1469,8 +1469,8 @@ pub struct ODTReservation { pub url: Option, #[serde(rename = "odt_reservation_phone")] pub phone: Option, - #[serde(rename = "odt_reservation_conditions")] - pub conditions: Option, + #[serde(rename = "odt_reservation_condition")] + pub condition: Option, #[serde(rename = "odt_reservation_deeplink")] pub deeplink: Option, } @@ -1480,7 +1480,7 @@ impl ODTReservation { self.name == other.name && self.url == other.url && self.phone == other.phone - && self.conditions == other.conditions + && self.condition == other.condition && self.deeplink == other.deeplink } } diff --git a/tests/fixtures/ntfs/odt_reservations.txt b/tests/fixtures/ntfs/odt_reservations.txt index b19d240f5..0b3cf5dae 100644 --- a/tests/fixtures/ntfs/odt_reservations.txt +++ b/tests/fixtures/ntfs/odt_reservations.txt @@ -1,4 +1,4 @@ -odt_reservation_id,odt_reservation_name,odt_reservation_url,odt_reservation_phone,odt_reservation_conditions,odt_reservation_deeplink +odt_reservation_id,odt_reservation_name,odt_reservation_url,odt_reservation_phone,odt_reservation_condition,odt_reservation_deeplink odtres1,odtres1,,01 02 03 04 99,lundi au samedi de 12h à 18h,https://deeplink1/search?departure-address={from_name} odtres2,,https://odtreservation2.com,,, odtres3,odtres3,https://odtreservation3.com,01 02 03 04 03,, diff --git a/tests/read_ntfs.rs b/tests/read_ntfs.rs index bcfcb39c4..332071522 100644 --- a/tests/read_ntfs.rs +++ b/tests/read_ntfs.rs @@ -266,7 +266,7 @@ fn ntfs() { name: Some(String::from("odtres3")), url: Some(String::from("https://odtreservation3.com")), phone: Some(String::from("01 02 03 04 03")), - conditions: None, + condition: None, deeplink: None, } ); @@ -287,7 +287,7 @@ fn ntfs() { name: Some(String::from("odtres1")), url: None, phone: Some(String::from("01 02 03 04 99")), - conditions: Some(String::from("lundi au samedi de 12h à 18h")), + condition: Some(String::from("lundi au samedi de 12h à 18h")), deeplink: Some(String::from( "https://deeplink1/search?departure-address={from_name}" )), @@ -310,7 +310,7 @@ fn ntfs() { name: None, url: Some(String::from("https://odtreservation2.com")), phone: None, - conditions: None, + condition: None, deeplink: None, } ); From c45844a3b0ba695be90b4a447499d0f43cd3a7a2 Mon Sep 17 00:00:00 2001 From: ArnaudOggy Date: Tue, 27 Aug 2024 18:10:47 +0200 Subject: [PATCH 2/3] Use ntfs v0.16.1 --- src/lib.rs | 2 +- src/ntfs/mod.rs | 2 +- tests/fixtures/gtfs2ntfs/full_output/feed_infos.txt | 2 +- tests/fixtures/gtfs2ntfs/minimal/output/feed_infos.txt | 2 +- tests/fixtures/gtfs2ntfs/routes_comments/output/feed_infos.txt | 2 +- .../gtfs2ntfs/routes_comments/output_as_lines/feed_infos.txt | 2 +- tests/fixtures/restrict-validity-period/output/feed_infos.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c1e29296c..b520620de 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -82,7 +82,7 @@ pub mod vptranslator; pub(crate) const STOP_TIMES_INIT_CAPACITY: usize = 50; /// Current version of the NTFS format -pub const NTFS_VERSION: &str = "0.16.0"; +pub const NTFS_VERSION: &str = "0.16.1"; /// The max distance in meters to compute the transfer pub const TRANSFER_MAX_DISTANCE: &str = "300"; diff --git a/src/ntfs/mod.rs b/src/ntfs/mod.rs index 4e0f6e8fa..a460dcd25 100644 --- a/src/ntfs/mod.rs +++ b/src/ntfs/mod.rs @@ -533,7 +533,7 @@ mod tests { ("feed_end_date".to_string(), "20180131".to_string()), ("feed_publisher_name".to_string(), "Nicaragua".to_string()), ("feed_start_date".to_string(), "20180130".to_string()), - ("ntfs_version".to_string(), "0.16.0".to_string()), + ("ntfs_version".to_string(), "0.16.1".to_string()), ("tartare_platform".to_string(), "dev".to_string()), ], collections diff --git a/tests/fixtures/gtfs2ntfs/full_output/feed_infos.txt b/tests/fixtures/gtfs2ntfs/full_output/feed_infos.txt index d014923c7..f06572077 100644 --- a/tests/fixtures/gtfs2ntfs/full_output/feed_infos.txt +++ b/tests/fixtures/gtfs2ntfs/full_output/feed_infos.txt @@ -7,6 +7,6 @@ feed_license,DefaultDatasourceLicense feed_license_url,http://www.default-datasource-website.com feed_publisher_name,DefaultContributorName feed_start_date,20180101 -ntfs_version,0.16.0 +ntfs_version,0.16.1 tartare_contributor_id,DefaultContributorId tartare_platform,dev diff --git a/tests/fixtures/gtfs2ntfs/minimal/output/feed_infos.txt b/tests/fixtures/gtfs2ntfs/minimal/output/feed_infos.txt index 80a307091..c358367a7 100644 --- a/tests/fixtures/gtfs2ntfs/minimal/output/feed_infos.txt +++ b/tests/fixtures/gtfs2ntfs/minimal/output/feed_infos.txt @@ -4,4 +4,4 @@ feed_creation_time,17:19:00 feed_creation_datetime,2019-04-03T17:19:00+00:00 feed_end_date,20180106 feed_start_date,20180101 -ntfs_version,0.16.0 +ntfs_version,0.16.1 diff --git a/tests/fixtures/gtfs2ntfs/routes_comments/output/feed_infos.txt b/tests/fixtures/gtfs2ntfs/routes_comments/output/feed_infos.txt index 80a307091..c358367a7 100644 --- a/tests/fixtures/gtfs2ntfs/routes_comments/output/feed_infos.txt +++ b/tests/fixtures/gtfs2ntfs/routes_comments/output/feed_infos.txt @@ -4,4 +4,4 @@ feed_creation_time,17:19:00 feed_creation_datetime,2019-04-03T17:19:00+00:00 feed_end_date,20180106 feed_start_date,20180101 -ntfs_version,0.16.0 +ntfs_version,0.16.1 diff --git a/tests/fixtures/gtfs2ntfs/routes_comments/output_as_lines/feed_infos.txt b/tests/fixtures/gtfs2ntfs/routes_comments/output_as_lines/feed_infos.txt index 80a307091..c358367a7 100644 --- a/tests/fixtures/gtfs2ntfs/routes_comments/output_as_lines/feed_infos.txt +++ b/tests/fixtures/gtfs2ntfs/routes_comments/output_as_lines/feed_infos.txt @@ -4,4 +4,4 @@ feed_creation_time,17:19:00 feed_creation_datetime,2019-04-03T17:19:00+00:00 feed_end_date,20180106 feed_start_date,20180101 -ntfs_version,0.16.0 +ntfs_version,0.16.1 diff --git a/tests/fixtures/restrict-validity-period/output/feed_infos.txt b/tests/fixtures/restrict-validity-period/output/feed_infos.txt index ba6f4a074..313f9edbd 100644 --- a/tests/fixtures/restrict-validity-period/output/feed_infos.txt +++ b/tests/fixtures/restrict-validity-period/output/feed_infos.txt @@ -4,4 +4,4 @@ feed_creation_time,17:19:00 feed_creation_datetime,2019-04-03T17:19:00+00:00 feed_end_date,20180805 feed_start_date,20180501 -ntfs_version,0.16.0 +ntfs_version,0.16.1 From 08e29cde00dd1d337846786a3eff2858217a7512 Mon Sep 17 00:00:00 2001 From: ArnaudOggy Date: Tue, 27 Aug 2024 18:12:13 +0200 Subject: [PATCH 3/3] Bump to 0.65.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 780015019..d8a4f9631 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["Hove ", "Guillaume Pinot "] name = "transit_model" -version = "0.64.1" +version = "0.65.0" license = "AGPL-3.0-only" description = "Transit data management" repository = "https://github.com/hove-io/transit_model"