Use Pydantic for Manifest valdiation#90
Open
Yannicked wants to merge 20 commits into
Open
Conversation
Contributor
|
@Yannicked can you fix the conflicts in this PR? Some of these are coming from the patch from @jholloc w.r.t manifest v1 handling. |
Collaborator
Author
V1 manifests should now be automatically converted to V2 and display a deprecation warning |
olivhoenen
reviewed
Jul 1, 2026
| Simulation data object, either a file, an IDS or an already registered object | ||
| identifiable by the UUID. | ||
| ManifestUrl = Annotated[ | ||
| SimDBUrl, UrlConstraints(allowed_schemes=["file", "imas", "simdb"]) |
Contributor
There was a problem hiding this comment.
I don't think we have ever used and defined a simdb URI scheme , this can be dropped
| if getattr(ds, "Conventions", None) == "IMAS": | ||
| return DataType.IMAS | ||
| return DataType.FILE | ||
| elif uri.scheme == "simdb": |
Contributor
There was a problem hiding this comment.
Same here, code about simdb URI scheme can be dropped
| """ | ||
| Validator for the manifest inputs list. | ||
| """ | ||
| elif v.scheme == "simdb": |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Switched
Manifestvalidation logic to Pydantic models and replaced the custom URI class withpydantic.AnyUrl