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

schemas: add from_dict to RollingResistance and Gamma #8865

Closed
wants to merge 1 commit into from

Conversation

elise-chin
Copy link

To simplify the process of creating instances from a dictionary, instead of manually extracting each attribute and passing them to the class constructor.

@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 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 37.02%. Comparing base (66adf79) to head (d1c804f).
Report is 1 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    #8865      +/-   ##
============================================
- Coverage     37.02%   37.02%   -0.01%     
  Complexity     2211     2211              
============================================
  Files          1255     1255              
  Lines        114227   114227              
  Branches       3182     3182              
============================================
- Hits          42297    42292       -5     
- Misses        70039    70044       +5     
  Partials       1891     1891              
Flag Coverage Δ
core 74.84% <ø> (ø)
editoast 72.44% <ø> (-0.02%) ⬇️
front 14.89% <ø> (ø)
gateway 2.20% <ø> (ø)
osrdyne 2.71% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.37% <ø> (ø)

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

@Castavo Castavo left a comment

Choose a reason for hiding this comment

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

That's already something you can achieve with pydantic models using <class>.model_validate(your_dict)

@elise-chin
Copy link
Author

That's already something you can achieve with pydantic models using <class>.model_validate(your_dict)

Thanks! I didn't know. Since we don't need to change anything, I will close the PR.

@elise-chin elise-chin closed this Sep 16, 2024
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