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

Add model v2 macro to editoast #5033

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Add model v2 macro to editoast #5033

merged 2 commits into from
Nov 30, 2023

Conversation

leovalais
Copy link
Contributor

@leovalais leovalais commented Sep 12, 2023

Part of #4184

  • ModelV2 derive macro
  • Retrieve, Update, Create, Delete, DeleteStatic, Save traits
  • Patch<'a, Model> objects
  • Builder generation
  • Previsional attributes json and geo
  • Partial port of the Document model
    • only the tests use the old model because it would otherwise require two similar but different TestFixture objects

Things left to do:

Schema (may be probably 100% accurate, more or less):

(The red tag means that it's generated by the macro, the export deleted the text 😢)

OSRD Model

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Attention: 92 lines in your changes are missing coverage. Please review.

Comparison is base (459de94) 19.73% compared to head (5a65ca3) 19.83%.
Report is 2 commits behind head on dev.

Files Patch % Lines
editoast/editoast_derive/src/modelv2.rs 78.40% 38 Missing ⚠️
editoast/src/modelsv2/mod.rs 24.32% 28 Missing ⚠️
editoast/src/views/rolling_stocks/mod.rs 0.00% 12 Missing ⚠️
editoast/src/views/projects.rs 0.00% 5 Missing ⚠️
editoast/editoast_derive/src/lib.rs 0.00% 3 Missing ⚠️
editoast/src/models/projects.rs 0.00% 3 Missing ⚠️
editoast/src/models/mod.rs 0.00% 2 Missing ⚠️
editoast/src/views/documents.rs 93.75% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #5033      +/-   ##
============================================
+ Coverage     19.73%   19.83%   +0.09%     
  Complexity     2117     2117              
============================================
  Files           910      912       +2     
  Lines        108673   108904     +231     
  Branches       2663     2663              
============================================
+ Hits          21452    21606     +154     
- Misses        85650    85727      +77     
  Partials       1571     1571              
Flag Coverage Δ
editoast 69.14% <63.92%> (-0.08%) ⬇️

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 marked this pull request as ready for review September 15, 2023 10:07
@leovalais leovalais requested a review from a team as a code owner September 15, 2023 10:07
@leovalais leovalais force-pushed the lva/macro-changeset branch 5 times, most recently from c59c9f6 to c42b92f Compare September 21, 2023 14:00
@leovalais leovalais self-assigned this Oct 4, 2023
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.

Thanks! LGTM.

We could improve the error handling of the macro.

Copy link
Contributor

@Tguisnet Tguisnet left a comment

Choose a reason for hiding this comment

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

LGTM

@flomonster flomonster force-pushed the lva/macro-changeset branch 2 times, most recently from 783146d to ab0928f Compare November 23, 2023 15:53
@flomonster flomonster changed the title editoast: add ModelV2 macro Add model v2 macro to editoast Nov 23, 2023
@flomonster flomonster requested a review from Tguisnet November 30, 2023 15:53
@leovalais
Copy link
Contributor Author

Go 🚀

@flomonster flomonster added this pull request to the merge queue Nov 30, 2023
Merged via the queue into dev with commit 84e37ad Nov 30, 2023
@flomonster flomonster deleted the lva/macro-changeset branch November 30, 2023 16:16
@leovalais leovalais mentioned this pull request Jan 11, 2024
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants