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

Uses typing_extensions.TypedDict in all instances used in pydantic models AND fixes with migration of rest_ordering #6770

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Nov 19, 2024

What do these changes do?

All TypedDict used in pydantic models for python <3.12 should use the backport library typing_extensions

SEE https://docs.pydantic.dev/latest/api/standard_library_types/#typeddict

NOTE that we should not always import from the backport library typing_extensions but only those TypedDict used inside models.


Related issue/s

How to test

Dev-ops checklist

@pcrespov pcrespov self-assigned this Nov 19, 2024
@pcrespov pcrespov changed the title Fix/import dicttype Uses typing_extensions.TypedDict in all instances used in pydantic models Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.44%. Comparing base (c50d79c) to head (3116c7a).
Report is 1 commits behind head on pydantic_v2_migration_do_not_squash_updates.

Additional details and impacted files
@@                               Coverage Diff                               @@
##           pydantic_v2_migration_do_not_squash_updates    #6770      +/-   ##
===============================================================================
- Coverage                                        86.97%   85.44%   -1.54%     
===============================================================================
  Files                                             1364     1480     +116     
  Lines                                            54887    59876    +4989     
  Branches                                          1296     1833     +537     
===============================================================================
+ Hits                                             47740    51162    +3422     
- Misses                                            6955     8410    +1455     
- Partials                                           192      304     +112     
Flag Coverage Δ
integrationtests 53.47% <90.90%> (-11.30%) ⬇️
unittests 84.36% <87.50%> (-0.26%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.24% <87.50%> (+0.13%) ⬆️
pkg_notifications_library 84.57% <ø> (ø)
pkg_postgres_database 87.31% <100.00%> (ø)
pkg_service_integration 70.00% <ø> (ø)
pkg_service_library 76.30% <50.00%> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.36% <ø> (ø)
agent 97.01% <ø> (ø)
api_server 89.72% <ø> (ø)
autoscaling 95.21% <ø> (ø)
catalog 90.57% <ø> (ø)
clusters_keeper 98.73% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.17% <ø> (ø)
director 75.99% <ø> (∅)
director_v2 91.03% <100.00%> (+0.01%) ⬆️
dynamic_scheduler 96.59% <ø> (ø)
dynamic_sidecar 89.79% <ø> (+0.03%) ⬆️
efs_guardian 90.12% <ø> (ø)
invitations 93.49% <ø> (ø)
osparc_gateway_server 85.49% <ø> (ø)
payments 92.77% <ø> (ø)
resource_usage_tracker 90.79% <ø> (ø)
storage 89.66% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 79.33% <100.00%> (-1.19%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c50d79c...3116c7a. Read the comment docs.

---- 🚨 Try these New Features:

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

👍

@pcrespov pcrespov changed the title Uses typing_extensions.TypedDict in all instances used in pydantic models Uses typing_extensions.TypedDict in all instances used in pydantic models AND wrong exception in validator Nov 19, 2024
@pcrespov pcrespov changed the title Uses typing_extensions.TypedDict in all instances used in pydantic models AND wrong exception in validator Uses typing_extensions.TypedDict in all instances used in pydantic models AND fixes with migration of rest_ordering Nov 19, 2024
Copy link

sonarcloud bot commented Nov 19, 2024

@pcrespov pcrespov merged commit 0aea337 into ITISFoundation:pydantic_v2_migration_do_not_squash_updates Nov 19, 2024
78 of 86 checks passed
@pcrespov pcrespov deleted the fix/import-dicttype branch November 19, 2024 19:02
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.

2 participants