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 #796

Merged
merged 5 commits into from
Feb 8, 2024
Merged

Pydantic 2 #796

merged 5 commits into from
Feb 8, 2024

Conversation

jpn--
Copy link
Member

@jpn-- jpn-- commented Feb 8, 2024

Update ActivitySim to use Pydantic version 2 for settings validation. There are small changes in the pydantic API to accommodate.

It should be a smidge faster, although settings validation is such a small part of overall runtime that it's likely not noticeable (unless we eventually use Pydantic for more). But more importantly, this is the most up-to-date version of Pydantic so compatibility with that tool and others that rely on it will be more robust.

This PR closes #795

Copy link
Contributor

@dhensle dhensle left a comment

Choose a reason for hiding this comment

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

I think we can remove this commented out reference to the old parse_obj() call: https://github.com/camsys/activitysim/blob/pydantic-2/activitysim/core/mp_tasks.py#L890

Other than that, I think it looks good.

@jpn-- jpn-- merged commit 5141945 into ActivitySim:develop Feb 8, 2024
18 checks passed
This was referenced Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants