Add support for QCSchema v2 and test on Python 3.14 - #2238
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
| return qcel.models.Molecule.from_data(schema_dict, validate=True) | ||
| try: | ||
| return qcel.models.v2.Molecule.from_data(schema_dict, validate=True) | ||
| except AttributeError: # other errors to capture here? |
There was a problem hiding this comment.
This could be tightened up with something hasattr(qcel.models, "v2") instead.
j-wags
left a comment
There was a problem hiding this comment.
These changes break qcsubmit by changing the return type of to_qcschema [1]. So we have some options:
- Release this and downpin QCSubmit's toolkit version range
- Modify
to_qcschemain this PR to add a kwarg returning v1 or v2 qcelemental molecules, and default to v1.- Or add the kwarg but have it default to v2, and update qcsubmit to request v1
- Add a deprecation warning?
- Coordinate this release with an update of QCSubmit to expect v2 models (I think this may be impossible as qcportal doesn't yet accept v2 models)
This all assumes that these changes are required for testing python 3.14. I haven't wrapped my head around that yet.
[1] In a dev environment from qcsubmit main and this branch of the Toolkit:
pytest -v openff/qcsubmit/_tests/test_submissions.py -k "test_basic_submissions_single_spec"
yields
...
FAILED openff/qcsubmit/_tests/test_submissions.py::test_basic_submissions_single_spec[RDKit UFF gradient] - pydantic.v1.error_wrappers.ValidationError: 18 validation errors for DatasetEntry
...
while this passes using openff-toolkit main
|
After some thought, I think a good path forward could be
|
|
Update: There is no way to have the OFF Toolkit install with python 3.14 and NOT output v2 qcelemental models. So versions of QCSubmit which can not accept v2 qcel models (all current ones) need to pin to older openff toolkits. Given that, we should just update openff toolkit to always output v2 qcel models (in this PR, that means we should remove the fallback to v1 models if v2 can't be made). Then we can remove the pin once we make a version of qcsubmit that can accept v2 models. |
j-wags
left a comment
There was a problem hiding this comment.
Thanks for working through the options on this with me @mattwthompson!
Closes #2130