Closed ml-evs closed 1 year ago
Hi @JPBergsma and @CasperWA, after sorting out #1835 today, I think we're ready to make this 1.0.0 release. I'm pushing for this myself as I now need to use pydantic v2 in some other projects that use OPTIMADE; we can also try to keep the 0.25.x series running as discussed.
Hopefully we can start adding v1.2 features after this 1.0.0 release, and then think about #1847 (namespace packages etc) as a 2.0 release...
(...) If you are using optimade-python-tools primarily as a library, then you may need to make some code changes to support the new version. For example, the underlying API for dealing with the pydantic models has changed (e.g.,
model.dict()
is nowmodel.dump()
) (...)
Typo here (for future reference), it is model.dict()
-> model.model_dump()
.
But yeah, please see the pydantic migration guide as also mentioned by @ml-evs in the OP 😃
optimade-python-tools has reached v1.0.0!
We have decided to make this first major release at this point due to the arduous migration to pydantic v2 between v1.0.0 and v0.25.3. This will allow for improved compatibility with the rest of the ecosystem, plus all of the performance and ergonomics benefits of the new pydantic.
If you are using optimade-python-tools primarily as a library, then you may need to make some code changes to support the new version. For example, the underlying API for dealing with the pydantic models has changed (e.g.,
model.dict()
is nowmodel.model_dump()
) -- a full migration guide can be found in the pydantic docs. Additionally, any cases where the underlying JSON schemas were being modified may need to be updated; internally we are pretty much exclusively operating on the pydantic model objects without needing to modify the raw schemas anymore.Going forward, v1.0.x will be the last series to support v1.1 of the OPTIMADE specification, with future versions of the package v1.x.y adding features from the pre-release of OPTIMADE v1.2.
A branch will be maintained for the v0.25.x series will be maintained for those who are stuck on pydantic v1 and run into bugs. Please make it clear in any bug reports if you are using this version.