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

refactor: Metadata handling #3721

Merged
merged 14 commits into from
Sep 15, 2024
Merged

refactor: Metadata handling #3721

merged 14 commits into from
Sep 15, 2024

Conversation

provinzkraut
Copy link
Member

@provinzkraut provinzkraut commented Sep 7, 2024

Make the metadata extraction from type annotations more robust.

  • Remove "duck typing" approach of extracting metadata from arbitrary types if they have attributes that match metadata attributes we're interested in
  • Remove coupling to 3rd party libraries in core code (specifically Pydantic)
  • Fully move metadata extraction responsibilities to plugins

Supersedes #3308.
Fixes #3710.
Fixes #3656.
Fixes #3722.

@github-actions github-actions bot added area/dto This PR involves changes to the DTOs area/plugins This PR involves changes to the plugins area/private-api This PR involves changes to the privatized API size: medium pr/internal labels Sep 7, 2024
@provinzkraut
Copy link
Member Author

@peterschutt If you have the time, a review or even a quick look from you would be greatly appreciated :)

Copy link

codecov bot commented Sep 7, 2024

Codecov Report

Attention: Patch coverage is 99.64413% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.34%. Comparing base (d4e01f9) to head (34658d7).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
litestar/contrib/pydantic/utils.py 99.22% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3721      +/-   ##
==========================================
+ Coverage   98.29%   98.34%   +0.05%     
==========================================
  Files         330      331       +1     
  Lines       15139    15268     +129     
  Branches     2405     2443      +38     
==========================================
+ Hits        14881    15016     +135     
+ Misses        117      112       -5     
+ Partials      141      140       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the area/dependencies This PR involves changes to the dependencies label Sep 7, 2024
@provinzkraut provinzkraut marked this pull request as ready for review September 7, 2024 19:37
@provinzkraut provinzkraut requested review from a team as code owners September 7, 2024 19:37
Copy link
Member

@cofin cofin left a comment

Choose a reason for hiding this comment

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

I don't have anything to add other than nice work. It looks good to me.

@provinzkraut provinzkraut merged commit 0e2ad9a into main Sep 15, 2024
24 checks passed
@provinzkraut provinzkraut deleted the fix/3710 branch September 15, 2024 10:31
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependencies This PR involves changes to the dependencies area/dto This PR involves changes to the DTOs area/plugins This PR involves changes to the plugins area/private-api This PR involves changes to the privatized API pr/internal size: medium
Projects
None yet
2 participants