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

⬆️ upgrades iter_model_examples_in_module to enable all example tests #6632

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Oct 29, 2024

What do these changes do?

This PR resolves the issue where tests validating examples were previously skipped due to an incomplete upgrade of iter_model_examples_in_module.

NOte that most likely your tests on examples will fail due to the following: Pydantic 2 behavior, which now enforces that fields cannot have None as a default unless explicitly declared as nullable (i.e., field: Type | None). This update ensures compatibility with these stricter type requirements.

NOTE: when approved, I will force-merge into the branch so we can review the example tests separately.

Related issue/s

How to test

Dev-ops checklist

@pcrespov pcrespov requested a review from sanderegg as a code owner October 29, 2024 09:46
@pcrespov pcrespov self-assigned this Oct 29, 2024
@pcrespov pcrespov added the t:maintenance Some planned maintenance work label Oct 29, 2024
@pcrespov pcrespov enabled auto-merge (squash) October 29, 2024 09:46
Copy link

Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Thanks a lot 🙏🏻

@pcrespov pcrespov merged commit afa0b3c into ITISFoundation:pydantic_v2_migration_do_not_squash_updates Oct 29, 2024
3 checks passed
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.

thanks. no need to force merge, it is mergeable as is ;)

@pcrespov pcrespov deleted the is4481/pydantic-models-fix branch October 29, 2024 10:20
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.62%. Comparing base (06df37d) to head (aab9599).
Report is 19 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    #6632      +/-   ##
===============================================================================
- Coverage                                        71.32%   70.62%   -0.71%     
===============================================================================
  Files                                             1070     1022      -48     
  Lines                                            48181    46656    -1525     
  Branches                                          1243     1243              
===============================================================================
- Hits                                             34365    32949    -1416     
+ Misses                                           13593    13486     -107     
+ Partials                                           223      221       -2     
Flag Coverage Δ *Carryforward flag
integrationtests 64.73% <ø> (ø) Carriedforward from 06df37d
unittests 80.85% <ø> (-1.03%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library 83.79% <ø> (ø)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 70.00% <ø> (ø)
pkg_service_library 76.63% <ø> (+0.02%) ⬆️
pkg_settings_library 90.72% <ø> (+0.30%) ⬆️
pkg_simcore_sdk 77.44% <ø> (ø)
agent 97.21% <ø> (ø)
api_server ∅ <ø> (∅)
autoscaling 95.25% <ø> (ø)
catalog ∅ <ø> (∅)
clusters_keeper 98.85% <ø> (ø)
dask_sidecar 90.84% <ø> (ø)
datcore_adapter 93.14% <ø> (ø)
director 58.38% <ø> (-0.05%) ⬇️
director_v2 76.20% <ø> (ø)
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 59.66% <ø> (ø)
efs_guardian ∅ <ø> (∅)
invitations 93.44% <ø> (ø)
migration ∅ <ø> (∅)
osparc_gateway_server 85.41% <ø> (ø)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage 89.63% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 59.61% <ø> (ø)

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 06df37d...aab9599. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants