-
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
Pydantic v2 Overhaul [DNM yet] #321
Open
Lnaden
wants to merge
22
commits into
MolSSI:master
Choose a base branch
from
Lnaden:Pydanticv2Overhaul
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
4777b4b
Start migrating to Pydantic v2 still very much a WIP
Lnaden 538a62f
Finish initial pass converting to v2 pydantic API. Have not done any …
Lnaden 5bd215b
More headway, starting on tests. have to be careful with serializers …
Lnaden 76b565b
Why does nested serialization behavior change between versions? WHY!?
Lnaden 248676d
Finally have all tests passing. Huzzah! Still need to cleanup
Lnaden a2e3501
Handled CI and Lint. All tests pass locally.
Lnaden 86d88f9
This is the dumbest dependency tree resolution. Autodoc-pydantic requ…
Lnaden e7f4549
fix black
Lnaden 4b4c977
and apparently isort
Lnaden 541beb0
So apparently I made a fun problem where black and isort undid each o…
Lnaden e32570b
Types from typing before Python 3.10 didn't have a `__name__` attribu…
Lnaden 6201290
A found an even more frustrating bug with Numpy NDArray from numpy.ty…
Lnaden ad7d43b
One last doc bug and black
Lnaden a4d0ed2
Fixed a serialization problem in Datum because you cannot chain seria…
Lnaden 37fcc09
Fixed serialization of complex ndarrays in Datum
Lnaden 31f0b7c
Dont cast listified complex or ndarray to string on jsonify of data
Lnaden ad3b633
black
Lnaden 6af962b
Fixed NumPy native types being unknown on how to serialize by Pydantic
Lnaden 01f19ae
Debugging more of the JSON serializing
Lnaden f2b5989
Fixed typo in Array serialization to JSON where flatten was not calle…
Lnaden 2ca4b14
Removed leftover debugging lines
Lnaden 75e6aee
For serializing models, just try dumping them with model_dump_json wh…
Lnaden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" | |
|
||
[tool.poetry] | ||
name = "qcelemental" | ||
version = "0.26.0" | ||
version = "0.27.0" | ||
description = "Core data structures for Quantum Chemistry." | ||
authors = ["The QCArchive Development Team <[email protected]>"] | ||
license = "BSD-3-Clause" | ||
|
@@ -29,9 +29,10 @@ numpy = [ | |
{ version = ">=1.12.0", python = "3.8" }, | ||
{ version = ">=1.24.1", python = ">=3.9" }, | ||
] | ||
python = "^3.7" | ||
python = "^3.7.1" | ||
pint = ">=0.10.0" | ||
pydantic = ">=1.8.2" | ||
pydantic = "^2.1.0" | ||
pydantic-settings = "*" # Maybe remove when Fractal merges next? | ||
nglview = { version = "^3.0.3", optional = true } | ||
ipykernel = { version = "<6.0.0", optional = true } | ||
importlib-metadata = { version = ">=4.8", python = "<3.8" } | ||
|
@@ -62,7 +63,7 @@ docutils = "<0.19" | |
sphinx = "<6.0.0" | ||
sphinxcontrib-napoleon = "^0.7" | ||
sphinx-rtd-theme = "^1.2.0" | ||
autodoc-pydantic = "^1.8.0" | ||
autodoc-pydantic = "^2.0.0" | ||
sphinx-automodapi = "^0.15.0" | ||
sphinx-autodoc-typehints = "^1.22" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to leave this line in for now to help the CI lanes "Required" labels cope.