OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
444 stars 40 forks source link

Add output table to the simulation result #7855

Closed anisometropie closed 2 months ago

anisometropie commented 3 months ago

closes #7757 closes #7758

codecov-commenter commented 3 months ago

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

Codecov Report

Attention: Patch coverage is 19.74742% with 699 lines in your changes missing coverage. Please review.

Project coverage is 28.50%. Comparing base (e741331) to head (81b5d46).

Files Patch % Lines
...rc/modules/timesStops/hooks/useTimeStopsColumns.ts 0.00% 131 Missing and 1 partial :warning:
...src/modules/timesStops/hooks/useOutputTableData.ts 0.00% 108 Missing and 1 partial :warning:
front/src/modules/timesStops/TimesStopsInput.tsx 0.00% 88 Missing and 1 partial :warning:
front/src/modules/timesStops/TimesStopsOutput.tsx 0.00% 75 Missing and 1 partial :warning:
front/src/modules/timesStops/helpers/utils.ts 37.25% 54 Missing and 10 partials :warning:
front/src/modules/timesStops/TimesStops.tsx 0.00% 49 Missing :warning:
...les/trainschedule/useFormattedOperationalPoints.ts 0.00% 48 Missing and 1 partial :warning:
...perationalStudies/views/v2/SimulationResultsV2.tsx 0.00% 48 Missing :warning:
...c/modules/timesStops/helpers/formatScheduleData.ts 0.00% 22 Missing and 1 partial :warning:
...t/src/modules/timesStops/helpers/computeMargins.ts 82.66% 3 Missing and 10 partials :warning:
... and 10 more

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #7855 +/- ## ============================================ + Coverage 28.45% 28.50% +0.04% Complexity 2123 2123 ============================================ Files 1301 1309 +8 Lines 157770 158353 +583 Branches 3213 3243 +30 ============================================ + Hits 44897 45135 +238 - Misses 110935 111251 +316 - Partials 1938 1967 +29 ``` | [Flag](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7855/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [core](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7855/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `75.43% <ø> (ø)` | | | [editoast](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7855/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `70.38% <ø> (-0.03%)` | :arrow_down: | | [front](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7855/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `10.38% <19.74%> (+0.16%)` | :arrow_up: | | [gateway](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7855/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `2.03% <ø> (ø)` | | | [railjson_generator](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7855/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `87.49% <ø> (ø)` | | | [tests](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7855/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `73.18% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

anisometropie commented 3 months ago

needs a margin between the table and the slopes compoent

image

fixed

Yohh commented 2 months ago

in SimulationResultsV2.tsx, still this block that seems useless


      {/* SIMULATION: TIMELINE — TEMPORARILY DISABLED
      {simulation.trains.length && (
      {simulation.trains.length && (
        <TimeLine
        <TimeLine
          timeScaleDomain={timeScaleDomain}
          timeScaleDomain={timeScaleDomain}
          selectedTrainId={selectedTrain?.id || simulation.trains[0].id}
          selectedTrainId={selectedTrain?.id || simulation.trains[0].id}
          trains={simulation.trains as SimulationReport[]}
          trains={simulation.trains as SimulationReport[]}
          onTimeScaleDomainChange={setTimeScaleDomain}
          onTimeScaleDomainChange={setTimeScaleDomain}
        />
        />
      )}
      */}
anisometropie commented 2 months ago

nice, I spotted many times where you forget the type prefix, I just commented one but you have the same issue in TimeStopsColumns.tsx and TimesStops.tsx

I reviewed all the imports, I think the other spots were also for this enum, I think the rest of imports are ok

flomonster commented 2 months ago

Column titles in English doesn't fit:

image