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

core: remove the middle green signals in the STD #9906

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Khoyo
Copy link
Contributor

@Khoyo Khoyo commented Nov 29, 2024

Currently, VL (green) blocks only have a meaning before the train, and the meaning is "I require this signal to be open to keep to my schedule".
After/during the train, the meaning would be "I don't constrain this signal" which is actually what blank means. So let's keep those cases blank.

Case appears when diverging from the projected path, stopping on closed signal, then converging (stop in the same station, but different track)
Before:
image
After this PR:
image

Relates to 1 part of https://github.com/osrd-project/osrd-confidential/issues/886

@Khoyo Khoyo requested a review from a team as a code owner November 29, 2024 16:17
@Khoyo Khoyo requested a review from Erashin November 29, 2024 16:17
@github-actions github-actions bot added the area:core Work on Core Service label Nov 29, 2024
@Khoyo Khoyo force-pushed the yk/no-middle-green branch from 97bdd73 to 62a8094 Compare November 29, 2024 16:18
@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.17%. Comparing base (782fe85) to head (1d3b9f7).
Report is 5 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9906      +/-   ##
==========================================
- Coverage   38.20%   38.17%   -0.03%     
==========================================
  Files         998      998              
  Lines       92193    92197       +4     
  Branches     1192     1192              
==========================================
- Hits        35220    35200      -20     
- Misses      56517    56541      +24     
  Partials      456      456              
Flag Coverage Δ
editoast 73.32% <ø> (-0.07%) ⬇️
front 20.16% <ø> (-0.01%) ⬇️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 87.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@bougue-pe bougue-pe left a comment

Choose a reason for hiding this comment

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

(completed the main description)

It doesn't work from my test.
Maybe be should also shorten the first free block? 🤔

@Khoyo Khoyo force-pushed the yk/no-middle-green branch from 62a8094 to d3dbf31 Compare November 30, 2024 19:45
@Khoyo
Copy link
Contributor Author

Khoyo commented Nov 30, 2024

(completed the main description)

It doesn't work from my test. Maybe be should also shorten the first free block? 🤔

Nah, we should do it in the right file.

image

So... I also removed the old signal projection logic and adapted the v1 signal projection endpoint

@Khoyo Khoyo force-pushed the yk/no-middle-green branch from d3dbf31 to 1d3b9f7 Compare November 30, 2024 19:59
Copy link
Contributor

@bougue-pe bougue-pe left a comment

Choose a reason for hiding this comment

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

I'm not sure I understand what you did on the SignalProjectionEndpoint (v1): why can't we completely remove it?
If we keep it like this, we probably need a clear todo to accelerate future cleanup work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we put it in a kt dir?
Or should we just not care and add a deprecated comment right away?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The kotlin directory is not necessary anymore since at least Kotlin 1.0. I believe we should probably just merge the kotlin and java dirs

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. Personal opinion: I'd rather not merge the directories, since the end goal is probably just to have the whole thing in kotlin, it makes a clear distinction between what we have to keep and what we have to migrate.
For that reason as well, as long as we separate them, I'd rather have the kotlin files in the kotlin directory (especially since it already exists).

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'd rather not merge the directories, since the end goal is probably just to have the whole thing in kotlin, it makes a clear distinction between what we have to keep and what we have to migrate.

I really don't get that. If it's about the kotlin/java migration, just find -name '*.java'?

If it's about the obsolete v1 APIs, this is an obsolete v1 api file :p

@bougue-pe bougue-pe dismissed their stale review December 4, 2024 09:19

This is working now (even though there are other questions).

@Khoyo
Copy link
Contributor Author

Khoyo commented Dec 4, 2024

I'm not sure I understand what you did on the SignalProjectionEndpoint (v1): why can't we completely remove it?

We're keeping the TSv1 endpoints for a few more months (I believe until some time in January). But there is not reason to keep the old logic if we can avoid it.

Copy link
Contributor

@Erashin Erashin left a comment

Choose a reason for hiding this comment

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

This looks like it's working as intended.
Give me your opinion on the kotlin/java module question.
I'd love a unit test on this case as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. Personal opinion: I'd rather not merge the directories, since the end goal is probably just to have the whole thing in kotlin, it makes a clear distinction between what we have to keep and what we have to migrate.
For that reason as well, as long as we separate them, I'd rather have the kotlin files in the kotlin directory (especially since it already exists).

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants