Skip to content

Support schema map for validation #1552

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
philvarner opened this issue Apr 21, 2025 · 2 comments
Open

Support schema map for validation #1552

philvarner opened this issue Apr 21, 2025 · 2 comments

Comments

@philvarner
Copy link
Collaborator

Currently, the validation code always retrieves the remove STAC schema URI as advertised in the item. However, this can cause significant performance and transient failure issues when creating and validating items. One fix for this is to (as stac-validator does) allow the caller to supply a map of schema URIs to local files, so it's a local read operation rather than a remote network call. Overall, I think we should attempt to move some of the validation behavior from stac-validator into this package, so that stac-validator can focus more on just being a CLI shell around pystac.

@gadomski
Copy link
Member

Currently, the validation code always retrieves the remove STAC schema URI as advertised in the item.

Not true for the core schemas: https://github.com/stac-utils/pystac/blob/main/pystac/validation/local_validator.py

Overall, I think we should attempt to move some of the validation behavior from stac-validator into this package, so that stac-validator can focus more on just being a CLI shell around pystac.

Agreed.

@jsignell
Copy link
Member

Another option would be to cache the files on the first download. Since extension links point to released versions it seems like you'd never really have to even expire such a cache.

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

No branches or pull requests

3 participants