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

editoast: move many items to editoast_schemas::primitives #7297

Merged
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
7 changes: 4 additions & 3 deletions editoast/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions editoast/editoast_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ edition = "2021"
[dependencies]
chrono.workspace = true
geos.workspace = true
iso8601 = "0.6.1"
rand.workspace = true
rangemap.workspace = true
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
thiserror.workspace = true
utoipa.workspace = true
uuid.workspace = true
6 changes: 0 additions & 6 deletions editoast/editoast_common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
pub mod duration;
pub mod geometry;
mod hash_rounded_float;
mod identifier;
mod non_blank_string;
pub mod rangemap_utils;
pub mod schemas;

pub use duration::PositiveDuration;
pub use hash_rounded_float::hash_float;
pub use hash_rounded_float::hash_float_slice;
pub use identifier::Identifier;
pub use non_blank_string::NonBlankString;

schemas! {
geometry::schemas(),
Expand Down
4 changes: 4 additions & 0 deletions editoast/editoast_schemas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ derivative.workspace = true
editoast_common.workspace = true
enum-map.workspace = true
geojson.workspace = true
iso8601 = "0.6.1"
rand.workspace = true
rangemap.workspace = true
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
strum.workspace = true
thiserror.workspace = true
utoipa.workspace = true
uuid.workspace = true
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use derivative::Derivative;
use editoast_common::Identifier;
use serde::Deserialize;
use serde::Serialize;

use super::ApplicableDirections;
use crate::primitives::Identifier;

#[derive(Debug, Derivative, Clone, Deserialize, Serialize, PartialEq)]
#[serde(deny_unknown_fields)]
Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/buffer_stop.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use derivative::Derivative;
use editoast_common::Identifier;
use serde::Deserialize;
use serde::Serialize;

use crate::primitives::Identifier;
use crate::primitives::OSRDIdentified;
use crate::primitives::OSRDTyped;
use crate::primitives::ObjectType;
Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/detector.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use derivative::Derivative;
use editoast_common::Identifier;
use serde::Deserialize;
use serde::Serialize;

use crate::primitives::Identifier;
use crate::primitives::OSRDIdentified;
use crate::primitives::OSRDTyped;
use crate::primitives::ObjectType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use derivative::Derivative;
use editoast_common::Identifier;
use serde::Deserialize;
use serde::Serialize;
use utoipa::ToSchema;

use super::Direction;
use crate::primitives::Identifier;

editoast_common::schemas! {
DirectionalTrackRange,
Expand Down
4 changes: 2 additions & 2 deletions editoast/editoast_schemas/src/infra/electrification.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::primitives::NonBlankString;
use derivative::Derivative;
use editoast_common::Identifier;
use editoast_common::NonBlankString;
use serde::Deserialize;
use serde::Serialize;

use super::ApplicableDirectionsTrackRange;
use crate::primitives::Identifier;
use crate::primitives::OSRDIdentified;
use crate::primitives::OSRDTyped;
use crate::primitives::ObjectType;
Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/neutral_section.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use derivative::Derivative;
use editoast_common::Identifier;
use serde::Deserialize;
use serde::Serialize;

use super::DirectionalTrackRange;
use super::Sign;
use crate::primitives::Identifier;
use crate::primitives::OSRDIdentified;
use crate::primitives::OSRDTyped;
use crate::primitives::ObjectType;
Expand Down
4 changes: 2 additions & 2 deletions editoast/editoast_schemas/src/infra/operational_point.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::primitives::NonBlankString;
use derivative::Derivative;
use editoast_common::Identifier;
use editoast_common::NonBlankString;
use serde::Deserialize;
use serde::Serialize;
use utoipa::ToSchema;

use super::TrackOffset;
use crate::primitives::Identifier;
use crate::primitives::OSRDIdentified;
use crate::primitives::OSRDTyped;
use crate::primitives::ObjectType;
Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/route.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::HashMap;

use crate::primitives::Identifier;
use derivative::Derivative;
use editoast_common::Identifier;
use serde::Deserialize;
use serde::Serialize;

Expand Down
4 changes: 2 additions & 2 deletions editoast/editoast_schemas/src/infra/sign.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::primitives::Identifier;
use crate::primitives::NonBlankString;
use derivative::Derivative;
use editoast_common::Identifier;
use editoast_common::NonBlankString;
use serde::Deserialize;
use serde::Serialize;

Expand Down
4 changes: 2 additions & 2 deletions editoast/editoast_schemas/src/infra/signal.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::collections::HashMap;

use crate::primitives::Identifier;
use crate::primitives::NonBlankString;
use derivative::Derivative;
use editoast_common::Identifier;
use editoast_common::NonBlankString;
use serde::Deserialize;
use serde::Serialize;

Expand Down
4 changes: 2 additions & 2 deletions editoast/editoast_schemas/src/infra/speed_section.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::collections::HashMap;

use crate::primitives::Identifier;
use crate::primitives::NonBlankString;
use derivative::Derivative;
use editoast_common::Identifier;
use editoast_common::NonBlankString;
use serde::Deserialize;
use serde::Serialize;

Expand Down
4 changes: 2 additions & 2 deletions editoast/editoast_schemas/src/infra/switch.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::collections::HashMap;

use crate::primitives::Identifier;
use crate::primitives::NonBlankString;
use derivative::Derivative;
use editoast_common::Identifier;
use editoast_common::NonBlankString;
use serde::Deserialize;
use serde::Serialize;

Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/switch_type.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::HashMap;

use crate::primitives::Identifier;
use derivative::Derivative;
use editoast_common::Identifier;
use serde::Deserialize;
use serde::Serialize;

Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/track_endpoint.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::primitives::Identifier;
use derivative::Derivative;
use editoast_common::Identifier;
use serde::Deserialize;
use serde::Serialize;

Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/track_location.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use editoast_common::Identifier;
use crate::primitives::Identifier;
use serde::Deserialize;
use serde::Serialize;
use utoipa::ToSchema;
Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/track_offset.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use editoast_common::Identifier;
use crate::primitives::Identifier;
use serde::Deserialize;
use serde::Serialize;
use utoipa::ToSchema;
Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/track_range.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::primitives::Identifier;
use derivative::Derivative;
use editoast_common::Identifier;
use serde::Deserialize;
use serde::Serialize;
use utoipa::ToSchema;
Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/track_section.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::primitives::Identifier;
use derivative::Derivative;
use editoast_common::Identifier;
use geojson::Geometry;
use geojson::Value::LineString;
use serde::Deserialize;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::primitives::NonBlankString;
use derivative::Derivative;
use editoast_common::NonBlankString;
use serde::Deserialize;
use serde::Serialize;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::primitives::NonBlankString;
use derivative::Derivative;
use editoast_common::NonBlankString;
use serde::Deserialize;
use serde::Serialize;

Expand Down
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/waypoint.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use editoast_common::Identifier;
use crate::primitives::Identifier;
use serde::Deserialize;
use serde::Serialize;

Expand Down
Loading
Loading