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

🐛 Enforces regex constraints in some fields #6021

Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Jul 1, 2024

What do these changes do?

  • replaces Field(... re=...) by ConstraintedStr to avoid this error
ValueError: On field "integration_version" the following field constraints are set but not enforced: regex.

 For more details see https://pydantic-docs.helpmanual.io/usage/schema/#unenforced-field-constraints

Related issue/s

maintenance

How to test

cd packages/models_library
make install-dev
make tests

@pcrespov pcrespov self-assigned this Jul 1, 2024
@pcrespov pcrespov added this to the South Island Iced Tea milestone Jul 1, 2024
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.0%. Comparing base (cafbf96) to head (1261349).
Report is 318 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6021      +/-   ##
=========================================
- Coverage    84.5%   82.0%    -2.6%     
=========================================
  Files          10    1166    +1156     
  Lines         214   50795   +50581     
  Branches       25     562     +537     
=========================================
+ Hits          181   41664   +41483     
- Misses         23    9012    +8989     
- Partials       10     119     +109     
Flag Coverage Δ
unittests 82.0% <100.0%> (-2.6%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...s/models-library/src/models_library/basic_types.py 98.4% <100.0%> (ø)
...s/models-library/src/models_library/services_io.py 82.8% <100.0%> (ø)
.../src/models_library/services_metadata_published.py 100.0% <100.0%> (ø)

... and 1156 files with indirect coverage changes

@pcrespov pcrespov force-pushed the is5964/model-recursive-config branch from 8a13621 to 1261349 Compare July 4, 2024 10:20
@pcrespov pcrespov changed the title WIP: 🎨 Is5964/model recursive config 🐛 Enforces regex constraints in some fields Jul 4, 2024
@pcrespov pcrespov marked this pull request as ready for review July 4, 2024 10:24
@pcrespov pcrespov requested a review from bisgaard-itis July 4, 2024 10:24
@pcrespov pcrespov enabled auto-merge (squash) July 4, 2024 10:25
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 e494952 into ITISFoundation:master Jul 4, 2024
55 of 56 checks passed
@pcrespov pcrespov deleted the is5964/model-recursive-config branch July 4, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants