Skip to content

Report line, column and location of manifest errors - #156

Open
ioan-alexandra wants to merge 1 commit into
iterorganization:developfrom
ioan-alexandra:fix/manifest-check-error-locations
Open

ioan-alexandra wants to merge 1 commit into
iterorganization:developfrom
ioan-alexandra:fix/manifest-check-error-locations

Conversation

@ioan-alexandra

@ioan-alexandra ioan-alexandra commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #142

simdb manifest check (and simulation ingest) now report where a manifest is wrong:

Error: invalid manifest test.yaml (2 errors):
  test.yaml:5:5: outputs[0].uri: URL scheme should be 'file' or 'imas'
  test.yaml:6:1: bogus: Extra inputs are not permitted
  • YAML syntax errors keep the parser's reason and line/column instead of badly formatted manifest.
  • Validation errors are mapped back to the source line of the offending key or list item, sorted in file order, without pydantic's type/url noise.
  • Metadata entries are validated individually, so errors name the entry (metadata[1]).
  • load_from_file raises a new InvalidManifestError(ValueError) instead of pydantic's ValidationError.

Follow-ups: "No files found matching path" has no line number.

@prasad-sawantdesai

Copy link
Copy Markdown
Contributor

Seems fine

$ simdb manifest create valid.yaml
$ simdb manifest check valid.yaml
Error: invalid manifest valid.yaml (1 error):
  valid.yaml: No files found matching path /home/user/path/to/a/file1

@prasad-sawantdesai prasad-sawantdesai left a comment

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.

LGTM..

$ simdb manifest check manifest_1210250004.yaml         
ok

@ioan-alexandra
ioan-alexandra marked this pull request as ready for review October 26, 2026 13:37
@ioan-alexandra ioan-alexandra self-assigned this Oct 27, 2026

@olivhoenen olivhoenen left a comment

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.

It looks good @ioan-alexandra, but could you also check against duplicates URIs (file or imas) between inputs and outputs sections?

@ioan-alexandra
ioan-alexandra force-pushed the fix/manifest-check-error-locations branch from a0b2bd3 to 9d1b219 Compare October 29, 2026 09:35
@ioan-alexandra
ioan-alexandra force-pushed the fix/manifest-check-error-locations branch from 9d1b219 to 9769377 Compare October 29, 2026 09:43
@ioan-alexandra

Copy link
Copy Markdown
Collaborator Author

It looks good @ioan-alexandra, but could you also check against duplicates URIs (file or imas) between inputs and outputs sections?

added now. one note is because of how pydantic validates a model (first the field and then the model validations) the duplication error is only going to show when there's no other field error

This branch has not been deployed

No deployments
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.

simdb manifest check is not verbose enough

3 participants