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

Pydantic 2 #210

Merged
merged 9 commits into from
Dec 12, 2023
Merged

Pydantic 2 #210

merged 9 commits into from
Dec 12, 2023

Conversation

northwestwitch
Copy link
Member

@northwestwitch northwestwitch commented Dec 11, 2023

This PR adds | fixes:

  • Upgrade Fastapi and Pydantic libs to the latest available (closes Switch to pydantic2 #165 )
  • Modify code to support Pydantic 2 validations

How to test:

  • Automatic tests should pass
  • Launch locally and make sure docs for the endpoints are served

Review:

  • Code approved by HS
  • Tests executed by GitHub actions & CR

This version is a:

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2023

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (0e7ab7e) 95.14% compared to head (77ed08b) 96.46%.
Report is 386 commits behind head on main.

Files Patch % Lines
src/chanjo2/meta/handle_report_contents.py 89.06% 14 Missing ⚠️
src/chanjo2/crud/samples.py 83.33% 3 Missing ⚠️
src/chanjo2/models/pydantic_models.py 98.03% 2 Missing ⚠️
src/chanjo2/dbutil.py 66.66% 1 Missing ⚠️
src/chanjo2/endpoints/coverage.py 96.29% 1 Missing ⚠️
tests/src/chanjo2/crud/test_crud_intervals.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #210      +/-   ##
==========================================
+ Coverage   95.14%   96.46%   +1.31%     
==========================================
  Files          25       34       +9     
  Lines        1462     1951     +489     
==========================================
+ Hits         1391     1882     +491     
+ Misses         71       69       -2     
Flag Coverage Δ
unittests 96.46% <96.98%> (+1.31%) ⬆️

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

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

@northwestwitch
Copy link
Member Author

This is ready for review now!

@northwestwitch northwestwitch marked this pull request as ready for review December 12, 2023 07:42
@northwestwitch
Copy link
Member Author

Tested OK locally:

image

@northwestwitch northwestwitch added Enhancement New feature or request dependencies Pull requests that update a dependency file labels Dec 12, 2023
Copy link
Contributor

@henrikstranneheim henrikstranneheim left a comment

Choose a reason for hiding this comment

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

Nice 👍

@northwestwitch
Copy link
Member Author

Nice 👍

Thanks for the review! 🙏🏻 Before merging I'd like to merge this PR and create a new release of schug so I can update its version in the requirements of chanjo2.

Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@northwestwitch northwestwitch merged commit 4f809f6 into main Dec 12, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to pydantic2
3 participants