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

Adapt Infra to ModelV2 #6975

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Adapt Infra to ModelV2 #6975

merged 3 commits into from
Mar 28, 2024

Conversation

leovalais
Copy link
Contributor

@leovalais leovalais commented Mar 25, 2024

closes #6033

Tip

Review each commit individually.

Infra-related changes

  • Adapt Infra to ModelV2
  • Migration to add the expected default values to the infra table
  • Use Changeset<Infra> instead of InfraForm where it makes sense
  • Better mutability tracking

Test changes

  • Replace test_infra_and_delete by test_infra_transaction
  • Some light TestFixture<T: Model> enhancements

ModelV2 changes

  • Make Patch<M>.changeset field public

@leovalais leovalais requested a review from a team as a code owner March 25, 2024 16:22
@leovalais leovalais marked this pull request as draft March 25, 2024 16:23
@leovalais leovalais mentioned this pull request Mar 25, 2024
20 tasks
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 82.88889% with 77 lines in your changes are missing coverage. Please review.

Project coverage is 28.99%. Comparing base (ce98262) to head (8d4fdbe).
Report is 1 commits behind head on dev.

Files Patch % Lines
editoast/src/modelsv2/infra.rs 76.84% 44 Missing ⚠️
editoast/src/views/timetable/import.rs 0.00% 8 Missing ⚠️
editoast/src/views/infra/mod.rs 91.54% 6 Missing ⚠️
editoast/src/views/infra/routes.rs 50.00% 5 Missing ⚠️
editoast/src/views/train_schedule/mod.rs 0.00% 5 Missing ⚠️
editoast/src/views/infra/pathfinding.rs 0.00% 3 Missing ⚠️
editoast/src/views/infra/lines.rs 0.00% 2 Missing ⚠️
editoast/src/views/infra/edition.rs 91.66% 1 Missing ⚠️
editoast/src/views/pathfinding/mod.rs 85.71% 1 Missing ⚠️
editoast/src/views/v2/path.rs 80.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #6975      +/-   ##
============================================
- Coverage     29.04%   28.99%   -0.06%     
  Complexity     2244     2244              
============================================
  Files          1070     1070              
  Lines        132780   132723      -57     
  Branches       2708     2713       +5     
============================================
- Hits          38570    38477      -93     
- Misses        92634    92669      +35     
- Partials       1576     1577       +1     
Flag Coverage Δ
core 79.81% <ø> (+<0.01%) ⬆️
editoast 74.66% <82.88%> (-0.21%) ⬇️
front 9.29% <ø> (ø)
gateway 2.45% <ø> (ø)
railjson_generator 87.15% <ø> (ø)
tests 83.07% <ø> (ø)

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.

@leovalais leovalais added the area:editoast Work on Editoast Service label Mar 26, 2024
@leovalais leovalais marked this pull request as ready for review March 26, 2024 09:06
@leovalais leovalais marked this pull request as draft March 26, 2024 13:42
@leovalais leovalais marked this pull request as ready for review March 27, 2024 13:22
Copy link
Contributor

@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.

Great PR. Thanks 👏 (review + tested)

@leovalais leovalais added this pull request to the merge queue Mar 28, 2024
Merged via the queue into dev with commit 2d363f1 Mar 28, 2024
22 checks passed
@leovalais leovalais deleted the lva/modelv2-infra branch March 28, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[meta] Move editoast model to V2
2 participants