-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSA: Pydantic v1/v2 and the QCArchive + Psi4 stack #323
Comments
Thanks to the Center for Scientific Software Engineering at Georgia Tech, I'm going to be able to tackle this pydantic v1/v2 problem. General strategy is:
|
Hi @loriab thanks for doing this work. I built out the models from the |
Hi @coltonbh, yes, we've been sadly slow at proceeding on this, and I'm glad you've got a working relative of QCSchema so as to not impede research. I'll reach out further in a couple weeks to make sure I understand some of your design decisions. I think you're right that the layout (flat) that makes a convenient API interface doesn't necessarily make compact and descriptive models for schema. |
Just so I understand correctly, the |
Correct, the |
_2
, v1.8.2EDIT 19 Jun 2024: The plan is to update schema v2 and pydantic v2 at the same time at 0.70
Fall 2024
QCSchema v2
Planned version targets for QCElemental and QCEngine:
Relevant PRs (accumulating into
next2024
branches of QCElemental and QCEngine) for Pydantic v2 APImodels
tomodels.v1
models.v2
to pydantic v2 API (Levi's Pydantic v2 Overhaul [DNM yet] #321). (needs 346)Datum
) to pydantic v2 API. (needs 347)qcelemental/models/*py
so it issues a warning if you try to import from files, rather than properly frommodels
ormodels.v1
ormodels.v2
. Run withPYTHONWARNINGS=all
to see warnings. (needs 348)FailedOperation
) learned aconvert_v()
function to return alternate versions of QCSchema. QCSchema v1 models learnedmodel_dump
etc. so easier to write unified code. (needs 349)qcengine.compute
andqcengine.compute_procedure
into the former and add areturn_version={1, 2, -1}
argument, where the default-1
returns the input version (v1 if it can't be determined).Relevant PRs (accumulating into
next2024
branches of QCElemental and QCEngine) for data layout rearrangementResults.error
field, enforce.success
field.FailedOp.input_data
object where possible (needs qcel 357)AtomicResult.input_data
field (needs qcel 357)Footnotes
"v1 only" describes the state of the code. conda packages may not be constrained to only solve with pydantic v1. ↩
psi4 before v1.6 didn't use pydantic directly ↩
The text was updated successfully, but these errors were encountered: