Skip to content

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