openforcefield / openff-toolkit

The Open Forcefield Toolkit provides implementations of the SMIRNOFF format, parameterization engine, and other tools. Documentation available at http://open-forcefield-toolkit.readthedocs.io
http://openforcefield.org
MIT License
309 stars 90 forks source link

Allow Pydantic v2 in test environments #1684

Open mattwthompson opened 1 year ago

mattwthompson commented 1 year ago
codecov[bot] commented 1 year ago

Codecov Report

Merging #1684 (8b16da3) into main (d8e1d7a) will not change coverage. The diff coverage is n/a.

Additional details and impacted files
mattwthompson commented 1 year ago

Will wait to finish this until openff-nagl 0.3.0 is released

mattwthompson commented 1 year ago

Seems to be working, modulo QCArchive allowing records to be pulled down

mattwthompson commented 1 year ago

The toolkit does not use Pydantic at all; the objective here is to ensure tests pass with both v1 and v2. No code changes (here) are needed to allow users to install v2.

The main complexity added here is working around QCArchive not supporting v2. I don't take dropping QCArchive interoperability or limiting Pydantic compatibility to be workable options, and as long as v1 is still supported at installation time it's something that should be tested. So the final matrix will look a little more complex, with maybe a couple of combinations stripped out.

j-wags commented 1 year ago

Gotcha. Ok, it's great to know that OFFTK is ready for pydantic v2. I'd like to leave this open until the pydantic v2-compatible QCF packages are out. If we merge it sooner, we have no choice but to expand the cost/complexity of our CI matrix, and then make a second round of changes once the new QCF packages come out.

If we want to allow pydantic=2 in our conda packages before then, I'd approve a PR/patch to do so!

mattwthompson commented 1 year ago

Seems like we already do https://prefix.dev/channels/conda-forge/packages/openff-toolkit-base