Skip to content

Conversation

@hamz2a
Copy link
Contributor

@hamz2a hamz2a commented Dec 19, 2025

closes #14229

Changes

  • Add database migration
  • Add local_track_name string field to OperationalPointPart schema
  • Update Rust schemas in editoast
  • Update OpenAPI specification and generated TypeScript client
  • Update Python schemas in osrd_schemas and railjson_generator
  • Update RawInfraRJSParser and path_properties core endpoint

@hamz2a hamz2a requested a review from a team as a code owner December 19, 2025 09:08
@github-actions github-actions bot added area:railjson Work on Proposed Unified Rail Assets Data Exchange Format area:front Work on Standard OSRD Interface modules area:editoast Work on Editoast Service kind:api-change labels Dec 19, 2025
@github-actions
Copy link
Contributor

⚠️ API changes

This Pull Request introduces some changes in the API:

  • please own it: notify or even prepare dedicated PR(s) to consumer projects

Changes in Schemas

Dear @hamz2a, please ensure the following:

@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch from ac27cd3 to 73606b2 Compare December 19, 2025 09:11
@hamz2a hamz2a marked this pull request as draft December 19, 2025 09:30
@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch from 73606b2 to ac86618 Compare December 19, 2025 09:36
@github-actions github-actions bot added the area:integration-tests Work on Integration test, by nature related to different services label Dec 19, 2025
@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch 2 times, most recently from 9bbc80d to aca5389 Compare December 19, 2025 11:01
Copy link
Member

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

LGTM, just need to make small changes with the railjson version.

@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch 3 times, most recently from 670a44d to edce075 Compare December 19, 2025 14:21
@github-actions github-actions bot added the area:core Work on Core Service label Dec 19, 2025
@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch from edce075 to 162540d Compare December 19, 2025 14:35
@hamz2a hamz2a marked this pull request as ready for review December 19, 2025 14:37
@hamz2a hamz2a requested review from a team as code owners December 19, 2025 14:37
@hamz2a hamz2a requested a review from eckter December 19, 2025 14:37
@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch 7 times, most recently from 2ff4d92 to 41eea92 Compare December 23, 2025 13:27
@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch 3 times, most recently from acc3540 to 8689614 Compare December 23, 2025 14:44
#[schema(inline)]
pub track: Identifier,
pub position: f64,
pub local_track_name: String,
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be an Option<NonBlankString>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

props["weight"] = weight
}
if (opPart.extensions?.sncf != null) props["kp"] = opPart.extensions!!.sncf!!.kp
if (opPart.localTrackName != null && opPart.localTrackName.isNotEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The isNotEmpty check should generate an infra loading warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OperationalPointPartResponse(
trackSectionName,
opPartTrackSectionOffset.meters,
opPartProps["local_track_name"] ?: "",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be null instead of empty string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

part: OperationalPointPart {
track: Identifier("T1".to_string()),
position: 0.0,
local_track_name: "".to_string(),
Copy link
Contributor

Choose a reason for hiding this comment

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

None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@SuppressFBWarnings({"URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"})
public class RJSOperationalPointPart extends RJSTrackObject {
@Json(name = "local_track_name")
public String localTrackName;
Copy link
Contributor

Choose a reason for hiding this comment

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

@Nullable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

},
},
part: { track: location.track, position: location.offset },
part: { track: location.track, position: location.offset, local_track_name: '' },
Copy link
Contributor

Choose a reason for hiding this comment

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

null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

},
},
part: { track: '', position: 0 },
part: { track: '', position: 0, local_track_name: '' },
Copy link
Contributor

Choose a reason for hiding this comment

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

null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

part: matchedOp.parts.at(0) || {
track: '',
position: 0,
local_track_name: '',
Copy link
Contributor

Choose a reason for hiding this comment

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

null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


def add_part(self, track, offset):
op_part = OperationalPointPart(self, offset)
def add_part(self, track, offset, local_track_name):
Copy link
Contributor

Choose a reason for hiding this comment

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

local_track_name=None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

class OperationalPointPart:
operational_point: OperationalPoint
position: float
local_track_name: str
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional[str]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch 3 times, most recently from 7190e1c to c4fb6a1 Compare December 24, 2025 10:38
@hamz2a hamz2a requested review from Khoyo and shenriotpro December 24, 2025 11:09
Copy link
Contributor

@achrafmohye achrafmohye left a comment

Choose a reason for hiding this comment

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

the front LGTM :)

"""

pass
local_track_name: Optional[str] = Field(
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's supposed to be optional

Copy link
Contributor

Choose a reason for hiding this comment

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

also you should probably use Identifier, so we get reasonable lengths

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's supposed to be optional

@Khoyo wdyt ?

neutral_sections: List[NeutralSection] = field(default_factory=list)

VERSION = "3.4.13"
VERSION = "3.4.14"
Copy link
Contributor

Choose a reason for hiding this comment

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

you probably should update the packages version as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks, same for osrd_schemas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch from c4fb6a1 to d319802 Compare December 24, 2025 14:22
Signed-off-by: hamz2a <atrari.hamza@gmail.com>
@hamz2a hamz2a force-pushed the hai/editoast-add-local-track-name-to-operational-point-part branch from d319802 to 291b59c Compare December 24, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core Work on Core Service area:editoast Work on Editoast Service area:front Work on Standard OSRD Interface modules area:integration-tests Work on Integration test, by nature related to different services area:railjson Work on Proposed Unified Rail Assets Data Exchange Format kind:api-change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display the GOV track in the correct order and with the local track names

6 participants