adapt for QCSchema v2 and Python v3.14#170
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #170 +/- ##
==========================================
+ Coverage 65.84% 66.01% +0.17%
==========================================
Files 34 34
Lines 4793 4841 +48
Branches 1670 1670
==========================================
+ Hits 3156 3196 +40
- Misses 683 691 +8
Partials 954 954 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
awvwgk
left a comment
There was a problem hiding this comment.
Thanks for updating the qcschema support. I tested it locally but found that I could not get it to work with Python 3.14 and an older qcelemental version (which seems to install just fine together).
This PR adds a lot of code duplication and stray imports, which will make this very hard to maintain. I started to do some cleanup, but I think it will probably need more work.
Right in that Python 3.14 can work only with QCSchema v2, and QCSchema v2 is only available from QCElemental >=0.50.0rc3, which one can get from pypi or
Yes, there's a lot of code duplication in the tests. I factored out molecule and some other large chunks, and I could rearrange for less duplication — I wasn't sure what balance between dupl. and lines with only whitespace change was best. I'm not quite following "stray imports," as the below was the only import change in the qcschema.py file. I rebased this locally after the changes to Thanks for the review and comments! |
|
I did a preliminary cleanup of the version, please verify that it works as you intended and then I think it is good to merge. |
|
Excluding pyscf for py314 should help that lane. I'm working on local testing ... |
|
Ok, CI is passing again and py314 is being tested. I've tested the new versions of the schema files against a local QCEngine and Psi4 with py313. So I think this is good to go. Thanks for the cleanup. I'll follow this pattern for xtb rather than the dftd4 pattern, if that sounds good. |
Co-authored-by: Sebastian Ehlert <[email protected]>
For tblite and xtb that would be preferable. Maybe it would also be good to refactor the dftd4 one to be consistent. |
Here's an adaptation for QCSchema v2 and Python 3.14. This and dftd4/dftd4#341 are counterparts. Please let me know of any changes you'd like.
-c conda-forge/label/qcelemental_dev, dftd3-python can run QCSchema v1 or v2 for all Pythons, except 3.14, where Pydantic retired the v1 API. Pydantic >=2.11 will be required (2.12 for Py 3.14). This can be seen in the test_qcschema patterns where 312 runs QCSchema v1 and skips 2, 313 runs both, and 314 runs 2 and skips v1, as illustrated in the dftd4 PR..convert_v(2)on them to submit torun_qcschema. The diff is a little easier to read with whitespace tracking off.