Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Jun 24, 2025

What do these changes do?

This PR continues the migration of legacy Pydantic model definitions to use Annotated types for better clarity and future compatibility.

Another goal of this PR is to share some experiences and hints on using prompts.

Workflow

  • Performed a targeted search for = Field( across files in the packages directory.
  • Used Copilot to assist with conversion:
    • Prompted using /pydantic-annotated-fields on all files within the #searchResults.
    • image
  • Reviewed the first batch of Copilot-generated changes:
    • ⚠️ Noted a decline in quality with each successive prompt iteration.
    • Refined the prompt based on recurring issues.

Notes:

⚠️ Use caution when using this prompt — it can introduce subtle errors. Always review the output thoroughly before committing changes.

Related issue/s

How to test

in place

Dev-ops

None

@pcrespov pcrespov self-assigned this Jun 24, 2025
@pcrespov pcrespov added the t:maintenance Some planned maintenance work label Jun 24, 2025
@codecov
Copy link

codecov bot commented Jun 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.52%. Comparing base (b109758) to head (6d35581).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7965      +/-   ##
==========================================
+ Coverage   87.89%   89.52%   +1.63%     
==========================================
  Files        1841     1655     -186     
  Lines       71044    64677    -6367     
  Branches     1227      780     -447     
==========================================
- Hits        62442    57905    -4537     
+ Misses       8248     6569    -1679     
+ Partials      354      203     -151     
Flag Coverage Δ
integrationtests 64.29% <ø> (+0.06%) ⬆️
unittests 87.98% <100.00%> (+1.48%) ⬆️
Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library 93.93% <100.00%> (+<0.01%) ⬆️
pkg_celery_library ∅ <ø> (∅)
pkg_dask_task_models_library 79.62% <100.00%> (ø)
pkg_models_library 93.28% <100.00%> (+<0.01%) ⬆️
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.19% <100.00%> (+<0.01%) ⬆️
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library 90.64% <100.00%> (-0.27%) ⬇️
pkg_simcore_sdk 85.05% <ø> (+0.05%) ⬆️
agent 96.29% <ø> (ø)
api_server 92.64% <ø> (ø)
autoscaling 96.03% <ø> (ø)
catalog 92.29% <ø> (ø)
clusters_keeper 99.13% <ø> (ø)
dask_sidecar 92.35% <ø> (+0.56%) ⬆️
datcore_adapter 97.94% <ø> (ø)
director 76.73% <ø> (ø)
director_v2 91.11% <ø> (+0.04%) ⬆️
dynamic_scheduler 96.69% <ø> (ø)
dynamic_sidecar 90.09% <ø> (ø)
efs_guardian 89.65% <ø> (ø)
invitations 93.60% <ø> (ø)
payments 92.57% <ø> (ø)
resource_usage_tracker 89.05% <ø> (+0.05%) ⬆️
storage 86.52% <ø> (-0.09%) ⬇️
webclient ∅ <ø> (∅)
webserver 87.70% <ø> (+0.05%) ⬆️

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 b109758...6d35581. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcrespov pcrespov changed the title WIP: ♻️ Mai/annotated models ♻️ Maintenance: Migrate more Pydantic models to Annotated types Jun 25, 2025
@pcrespov pcrespov added this to the Engage milestone Jun 25, 2025
@pcrespov pcrespov force-pushed the mai/annotated-models branch from 21ad278 to f3fec65 Compare June 25, 2025 07:41
@pcrespov pcrespov marked this pull request as ready for review June 25, 2025 07:41
Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

👍 👍 cool

@pcrespov pcrespov requested a review from bisgaard-itis June 25, 2025 07:57
@pcrespov pcrespov enabled auto-merge (squash) June 25, 2025 07:57
@pcrespov pcrespov added the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 26, 2025
@pcrespov
Copy link
Member Author

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Jun 26, 2025

queue

🛑 The pull request has been merged manually

The pull request has been merged manually at 64695c3

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.

Cool!
Thanks

@sonarqubecloud
Copy link

@pcrespov pcrespov merged commit 64695c3 into ITISFoundation:master Jun 26, 2025
97 of 98 checks passed
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants