PyBaMM icon indicating copy to clipboard operation
PyBaMM copied to clipboard

pybamm[bpx] migrate to pydantic v2

Open chuckliu1979 opened this issue 10 months ago • 1 comments

Description

the optional dependency 'bpx' 0.4.0 still use pydantic v1, it blocks others which depends on pydantic v2 to use pybamm. I pulls a request for bpx project, and pybamm parameter_values create_from_bpx should be updated as well.

Motivation

i'm waiting https://github.com/FaradayInstitution/BPX/pull/51 review. if approved and merged, create_from_bpx should be updated, accept both bpx <= 0.4.0 and new.

Possible Implementation

check bpx version, determine if need pydantic v2

Additional context

No response

chuckliu1979 avatar Apr 04 '24 05:04 chuckliu1979

I will take a look at updating the version of BPX we use in PyBaMM, however, if pydantic v2 is not even used in BPX yet, then it will not be something you see until a release or two

kratman avatar Apr 04 '24 13:04 kratman

I am going to close this ticket for now. Since Pydantic v2 is not available in BPX yet and there is no new version of BPX, there is nothing that can be done. A new ticket can be opened after BPX gets updated

kratman avatar May 03 '24 20:05 kratman