Skip to content

Commit

Permalink
Merge pull request #957 from hove-io/tech/adapt_to_ntfs_v0.16.1
Browse files Browse the repository at this point in the history
[tech] Adaptation to ntfs v0.16.1
  • Loading branch information
ArnaudOggy authored Aug 28, 2024
2 parents d197b8c + 08e29cd commit 9cf5c47
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Hove <[email protected]>", "Guillaume Pinot <[email protected]>"]
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"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
8 changes: 4 additions & 4 deletions src/ntfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1105,23 +1105,23 @@ 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 {
id: "odt:2".to_string(),
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 {
id: "odt:3".to_string(),
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()),
},
])
Expand Down
6 changes: 3 additions & 3 deletions src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1469,8 +1469,8 @@ pub struct ODTReservation {
pub url: Option<String>,
#[serde(rename = "odt_reservation_phone")]
pub phone: Option<String>,
#[serde(rename = "odt_reservation_conditions")]
pub conditions: Option<String>,
#[serde(rename = "odt_reservation_condition")]
pub condition: Option<String>,
#[serde(rename = "odt_reservation_deeplink")]
pub deeplink: Option<String>,
}
Expand All @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/gtfs2ntfs/full_output/feed_infos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/fixtures/gtfs2ntfs/minimal/output/feed_infos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/fixtures/ntfs/odt_reservations.txt
Original file line number Diff line number Diff line change
@@ -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,,
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions tests/read_ntfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
);
Expand All @@ -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}"
)),
Expand All @@ -310,7 +310,7 @@ fn ntfs() {
name: None,
url: Some(String::from("https://odtreservation2.com")),
phone: None,
conditions: None,
condition: None,
deeplink: None,
}
);
Expand Down

0 comments on commit 9cf5c47

Please sign in to comment.