-
Notifications
You must be signed in to change notification settings - Fork 245
Update node serialization/deserialization and other Pydantic issues #6990
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
Open
edan-bainglass
wants to merge
120
commits into
aiidateam:main
Choose a base branch
from
edan-bainglass:fix-node-serialization
base: main
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.
+2,897
−1,628
Open
Changes from all commits
Commits
Show all changes
120 commits
Select commit
Hold shift + click to select a range
e88d38c
Pin pydantic to `~=2.12`
edan-bainglass 0c6eaad
Fix ORM pydantic schemas
edan-bainglass c8255e4
Add Kpoints constructor
edan-bainglass 4112f5f
Fix `Node.from_model`
edan-bainglass a81f967
Missed cast
edan-bainglass 81ffee8
Discard direct `orm` import from `cmdline` package
edan-bainglass c98257b
Allow unstored entity (de)serialization
edan-bainglass 182312c
Update tests
edan-bainglass b801dc9
Fix computer type
edan-bainglass 4ca7c08
Fix some typing issues
edan-bainglass 73d2c80
Allow (de)serialization of unstored nodes
edan-bainglass 9a85565
Add guard for unhandled attributes at parent `Data` constructor
edan-bainglass 3592a75
Implement constructors for `KpointsData` and `BandsData`
edan-bainglass 11cf1b2
Fix tests
edan-bainglass 3f7c5ae
Serialize/validate arrays as numpy arrays, not bytes
edan-bainglass a443088
Fix typing
edan-bainglass 595467e
Fix unhandled attributes check
edan-bainglass 48f9978
Add `array_labels` back to `BandsData.Model` without constructor hand…
edan-bainglass 33abe49
Nitpick some classes
edan-bainglass af96bc7
Fix docstring
edan-bainglass cb25d65
Remove user/ctime/mtime default factories from read-only fields
edan-bainglass 481e155
Include attributes in node input model
edan-bainglass f357c64
Remove some unrelated changes
edan-bainglass 81ed275
Make repo content serialization opt-in
edan-bainglass 9384512
Restore array base64 serialization
edan-bainglass 900d57c
Discard explicit quotation for annotations
edan-bainglass 23f91d9
Add field validator to transform computer pk to label
edan-bainglass 675d39c
Fix `orm_to_model` type
edan-bainglass a3f1d5e
Fix types
edan-bainglass 1b49dbc
Mark `InstalledCode.Model.computer` as an attribute
edan-bainglass bab33ff
Fix `_prepare_yaml`
edan-bainglass 8967476
Update regression tests
edan-bainglass d3411f3
Centralize model field collection
edan-bainglass 73b664e
Move unhandled node attributes gate to `Node` class
edan-bainglass 2e6d9a4
Add `attributes` to `Node` constructor
edan-bainglass 1a4b201
Fix code fields
edan-bainglass d930552
Fix centralized model field collection
edan-bainglass 5e8c3fc
Fix tests
edan-bainglass 07a62f0
Enable `ArrayNode` numpy array POST payloads via model validator
edan-bainglass 2da8f1e
Allow arguments in `orm_to_model`
edan-bainglass 483eda7
Fix formatting
edan-bainglass 0b4e86b
Fix `repository_path` default in portable code
edan-bainglass f5c2f72
Fix iterable array posting
edan-bainglass b9a2a06
Fix model inheritance
edan-bainglass 036d335
Fix `from_serialized`
edan-bainglass 0cf52df
Rename `InputModel` and `as_input_model` to `CreateModel` and `as_cre…
edan-bainglass 876b439
Discard `exclude_from_cli`
edan-bainglass bfae063
Exclude `attributes` from ORM
edan-bainglass c8df44c
Discard `unstored` from `from_serialized`
edan-bainglass aacb542
Discard `unstored` serialization parameter
edan-bainglass 2326315
Always pass `kwargs` to `orm_to_model`
edan-bainglass 87678d6
Discard redundant class method in favor of correct model selection
edan-bainglass a6ca204
Use `is_stored` for model selection
edan-bainglass 6239904
Restore serialization of node `extras`
edan-bainglass 41912fd
Avoid using JSON Schema fields in `CreateModel` construction
edan-bainglass 587af36
Fix `readOnly` logic in `MetadataField`
edan-bainglass ea6872f
Cleanup `CreateModel` definition
edan-bainglass 5f48fac
Add serialization for `JsonSerializableProtocol` model field type
edan-bainglass c31ab3c
Use pydantic built-in base64 (de)serialization
edan-bainglass f2acabf
Update QB projection map aliasing
edan-bainglass 5004f48
Add `exclude` parameter to `to_model`
edan-bainglass 91f230e
Fix type hint
edan-bainglass d0d2c60
Fix QB warning
edan-bainglass 7f2e74f
Move node attributes to `AttributesModel`
edan-bainglass ca11332
Draft
edan-bainglass 1469b21
Discard `is_subscriptable`
edan-bainglass 087663c
Discard `is_attribute`
edan-bainglass 6939abd
Remove last period from orm model field descriptions
edan-bainglass eda9190
Discard left over `skip_read_only` parameter
edan-bainglass 09a7aac
Discard write only parameter on `Node.Model` `attributes` and `extras`
edan-bainglass cec7142
FIX: Change CifData Model to AttributesModel
edan-bainglass cef96b1
Implement `OrmModel` as a root for `Entity.Model` and `Node.Attribute…
edan-bainglass c66e828
Sort of working
edan-bainglass 55b7653
Add opt-in mechanism for hiding large fields
edan-bainglass 7a0b533
Fix model tests
edan-bainglass e112b68
Make array and singlefile write-only fields optional
edan-bainglass ba739fb
Remove private prefix from nested helper functions
edan-bainglass 2e84d86
Update array/singlefile handling
edan-bainglass d0856f6
Make `CreateModel` derivation private and idempotent
edan-bainglass 26a1e02
Update tests
edan-bainglass b88ebd8
Fix mypy
edan-bainglass e3cb6ea
Update tests
edan-bainglass 086042c
Fix typing
edan-bainglass 4b5b9c0
Fix code export
edan-bainglass 2f42449
Fix portable orm-to-model mapping
edan-bainglass c248162
Fix code show
edan-bainglass 0c1f9bb
Fix test
edan-bainglass 680d825
Fix default value fetching in model-to-orm conversion
edan-bainglass 63285c0
Minor post-self-review updates
edan-bainglass b56fd34
Make `attributes` optional if `AttributesModel` has no required fields
edan-bainglass 9b789b6
Fix `StructureData` model and constructor
edan-bainglass 307ab65
Fix `Node` subclass model naming
edan-bainglass ca3799e
Also fix default value fetching in orm-to-model conversion
edan-bainglass e439bec
Fix `attributes` optional-status mutation
edan-bainglass 95c88f3
Fix singlefile validation
edan-bainglass 4e0b410
Remove serialization warning
edan-bainglass c996650
Discard `EntityModelType`
edan-bainglass fec8eec
Mark `Group.Model.extras` with `may_be_large=True`
edan-bainglass 2b2b8af
Update node computer field types
edan-bainglass e82b46f
Change `Log.Model.dbnode_id` to `node` and provide constructor logic
edan-bainglass 02d0c68
Update tests
edan-bainglass cd948d4
Discard serialization warning on creation
edan-bainglass 5d8218a
Fix typing
edan-bainglass 2a3bf0d
Use `ConfigDict` in `Dict.AttributesModel`
edan-bainglass b970db4
Correct `AbstractCode` constructor boolean field handling
edan-bainglass 28fa87e
Move installed code computer field to attributes model and mark as wr…
edan-bainglass 885dd45
Update tests
edan-bainglass 2c6b86a
Fix tests
edan-bainglass 31c8853
Discard ad hoc computer loaders and use utility
edan-bainglass a22b650
Add `identity_field` to entities
edan-bainglass ba44c00
Exclude null values when serializing
edan-bainglass 9b0ef7a
Add `collection_type` on entity collections
edan-bainglass cfdc17a
Make UUID serialization explicit
edan-bainglass 25f8cbf
Add examples to entity models
edan-bainglass 968cbce
Fix `Int.AttributesModel` inheritance
edan-bainglass 9544ffb
Fix dynamic model assignment
edan-bainglass 264d4e9
Update tests
edan-bainglass f386fc4
Fix mypy
edan-bainglass b3dc49e
Fix mypy
edan-bainglass e3769eb
Fix tests
edan-bainglass 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
edan-bainglass marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.