Skip to content

Use Pydantic for Manifest valdiation#90

Open
Yannicked wants to merge 20 commits into
iterorganization:developfrom
Yannicked:feature/pydantic-manifest
Open

Use Pydantic for Manifest valdiation#90
Yannicked wants to merge 20 commits into
iterorganization:developfrom
Yannicked:feature/pydantic-manifest

Conversation

@Yannicked

Copy link
Copy Markdown
Collaborator

Switched Manifest validation logic to Pydantic models and replaced the custom URI class with pydantic.AnyUrl

@olivhoenen

olivhoenen commented Jul 1, 2026

Copy link
Copy Markdown
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.

@Yannicked

Copy link
Copy Markdown
Collaborator Author

@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.

V1 manifests should now be automatically converted to V2 and display a deprecation warning

Comment thread src/simdb/cli/manifest.py
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"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have ever used and defined a simdb URI scheme , this can be dropped

Comment thread src/simdb/cli/manifest.py
if getattr(ds, "Conventions", None) == "IMAS":
return DataType.IMAS
return DataType.FILE
elif uri.scheme == "simdb":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, code about simdb URI scheme can be dropped

Comment thread src/simdb/cli/manifest.py
"""
Validator for the manifest inputs list.
"""
elif v.scheme == "simdb":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants