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

Remove pydantic dependency #337

Merged
merged 20 commits into from
Sep 27, 2024
Merged

Remove pydantic dependency #337

merged 20 commits into from
Sep 27, 2024

Conversation

inglesp
Copy link
Contributor

@inglesp inglesp commented Sep 26, 2024

The dependency on pydantic has caused several issues. This PR removes the dependency. We still perform all custom validation (eg that output paths are unique), and I have attempted to approximately replicate the type-based validation that pydantic does.

All existing tests pass, with minimal modifications, and there are new tests to cover the type-based validation.

Fixes opensafely-core/job-server#4557.

pipeline/exceptions.py Outdated Show resolved Hide resolved
@sebbacon
Copy link

sebbacon commented Sep 26, 2024

You've missed updating the README (i.e. it mentions pydantic)

(sorry for a very random driveby not-a-review!)

Copy link
Contributor

@evansd evansd left a comment

Choose a reason for hiding this comment

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

Excellent, thanks for taking this on.

@inglesp inglesp merged commit 162b2d0 into main Sep 27, 2024
16 checks passed
@inglesp inglesp deleted the remove-pydantic branch September 27, 2024 13:04
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.

Solve the problem of upgrading to Pydantic v2
3 participants