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

Editoast Model derive macros 🚀 #3475

Merged
merged 2 commits into from
Mar 15, 2023
Merged

Editoast Model derive macros 🚀 #3475

merged 2 commits into from
Mar 15, 2023

Conversation

flomonster
Copy link
Contributor

@flomonster flomonster commented Mar 9, 2023

What is done here:

  • Rename Model macro into InfraModel
  • Add Model macro that implement useful functions (create)
  • Use the new macro for Document using three implementation retrieve, create, delete.

@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #3475 (0c097ed) into dev (320dcc3) will decrease coverage by 0.17%.
The diff coverage is 61.61%.

❗ Current head 0c097ed differs from pull request most recent head 6001b2e. Consider uploading reports for the commit 6001b2e to get more accurate results

@@             Coverage Diff              @@
##                dev    #3475      +/-   ##
============================================
- Coverage     68.30%   68.13%   -0.17%     
  Complexity     1896     1896              
============================================
  Files           415      414       -1     
  Lines         20629    20533      -96     
  Branches       1519     1519              
============================================
- Hits          14090    13991      -99     
- Misses         5838     5841       +3     
  Partials        701      701              
Flag Coverage Δ
editoast 74.23% <61.61%> (-0.75%) ⬇️

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

Impacted Files Coverage Δ
editoast/src/error.rs 35.41% <0.00%> (-4.12%) ⬇️
editoast/src/main.rs 6.92% <ø> (ø)
editoast/src/models/mod.rs 0.00% <0.00%> (ø)
editoast/src/schema/buffer_stop.rs 80.00% <ø> (ø)
editoast/src/schema/catenary.rs 100.00% <ø> (ø)
editoast/src/schema/detector.rs 100.00% <ø> (ø)
editoast/src/schema/operational_point.rs 78.57% <ø> (ø)
editoast/src/schema/route.rs 98.27% <ø> (ø)
editoast/src/schema/signal.rs 80.00% <ø> (ø)
editoast/src/schema/speed_section.rs 75.00% <ø> (ø)
... and 22 more

... and 6 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@flomonster flomonster marked this pull request as draft March 10, 2023 16:08
@flomonster flomonster linked an issue Mar 14, 2023 that may be closed by this pull request
2 tasks
@flomonster flomonster force-pushed the fam/model-macros branch 2 times, most recently from f3f8e75 to 028f017 Compare March 14, 2023 16:29
@flomonster flomonster marked this pull request as ready for review March 14, 2023 16:29
@flomonster flomonster force-pushed the fam/model-macros branch 2 times, most recently from d47aa15 to 7a1d093 Compare March 14, 2023 16:48
Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

Looks great!

editoast/editoast_derive/src/lib.rs Outdated Show resolved Hide resolved
editoast/editoast_derive/src/model.rs Outdated Show resolved Hide resolved
editoast/editoast_derive/src/model.rs Show resolved Hide resolved
leovalais
leovalais previously approved these changes Mar 15, 2023
Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

GG! 🚀

@flomonster flomonster enabled auto-merge (rebase) March 15, 2023 15:59
@flomonster flomonster merged commit 442b218 into dev Mar 15, 2023
@flomonster flomonster deleted the fam/model-macros branch March 15, 2023 16:00
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.

Refactor editoast models using abstraction
3 participants