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

[DOP-13337] Add Pydantic v2 support #14

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Conversation

dolfinus
Copy link
Member

@dolfinus dolfinus commented Mar 5, 2024

Change Summary

Allow using horizon-hwm-store with both Pydantic v1 and v2 (thanks to etl-entities 2.3 release). Because Horizon client is inherited from pydantic.BaseModel and not pydantic.v1.BaseModel, this introduced few quirks to validation.

Added tests for both Pydantic versions to CI workflow.

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@dolfinus dolfinus self-assigned this Mar 5, 2024
@dolfinus dolfinus force-pushed the feature/DOP-13337 branch from 80904ea to 95d1c5b Compare March 5, 2024 15:16
@dolfinus dolfinus force-pushed the feature/DOP-13337 branch from 95d1c5b to f05c058 Compare March 5, 2024 15:29
@dolfinus dolfinus force-pushed the feature/DOP-13337 branch from f05c058 to a095d80 Compare March 5, 2024 15:35
@dolfinus dolfinus force-pushed the feature/DOP-13337 branch from a095d80 to 9ed592b Compare March 5, 2024 15:39
@dolfinus dolfinus force-pushed the feature/DOP-13337 branch from 9ed592b to a66f9d9 Compare March 5, 2024 15:40
@dolfinus dolfinus force-pushed the feature/DOP-13337 branch from a66f9d9 to 5d04b0f Compare March 5, 2024 15:43
@dolfinus dolfinus force-pushed the feature/DOP-13337 branch from 5d04b0f to caf2673 Compare March 5, 2024 15:49
@dolfinus dolfinus force-pushed the feature/DOP-13337 branch from caf2673 to 45453ae Compare March 5, 2024 15:57
@dolfinus dolfinus force-pushed the feature/DOP-13337 branch from 45453ae to f86a4fc Compare March 5, 2024 16:23
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 88.57143% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 93.51%. Comparing base (e29a0c1) to head (ef574e7).

Files Patch % Lines
horizon_hwm_store/horizon_hwm_store.py 88.23% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #14      +/-   ##
===========================================
- Coverage    96.62%   93.51%   -3.12%     
===========================================
  Files            3        3              
  Lines           89      108      +19     
  Branches         8       16       +8     
===========================================
+ Hits            86      101      +15     
- Misses           3        5       +2     
- Partials         0        2       +2     

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

@dolfinus dolfinus merged commit 15d114d into develop Mar 6, 2024
12 of 14 checks passed
@dolfinus dolfinus deleted the feature/DOP-13337 branch March 6, 2024 12:30
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