pydantic / pydantic-extra-types

Extra Pydantic types.
MIT License
181 stars 48 forks source link

Add semantic version type #199

Closed jbkroner closed 1 month ago

jbkroner commented 1 month ago

Adding a semantic version type as requested in #2506 in the pydantic repo.

The implementation here is just the example from the python-semver docs + some additional tests.

When this PR gets a thumbs up I will update the docs in python-semver.

Any feedback appreciated, cheers.

edit: tracking on coverage and 3.8 compatibility issues, will try to get that covered early this week before marking as ready for review.

Selected Reviewer: @yezz123

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (e186814) to head (563284f). Report is 38 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #199 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 11 17 +6 Lines 685 960 +275 Branches 169 232 +63 ========================================== + Hits 685 960 +275 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jbkroner commented 1 month ago

please review

jbkroner commented 1 month ago

@yezz123 fixes applied. apologies for the extra commits - didn't click that I could run the linter / pre-commit stuff locally (duh) following the instructions in the main pydantic repo.

yezz123 commented 1 month ago

@yezz123 fixes applied. apologies for the extra commits - didn't click that I could run the linter / pre-commit stuff locally (duh) following the instructions in the main pydantic repo.

No Problem now we have it ready we can merge it, Thanks for the great work @jbkroner 🚀