-
Notifications
You must be signed in to change notification settings - Fork 122
Validate STAC links for single dict #1205
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
Comments
Hey @m-mohr, Does the For example: import pystac
catalog_file = r"https://raw.githubusercontent.com/stac-utils/pystac/main/tests/data-files/catalogs/label_catalog-v0.8.1/catalog.json"
catalog = pystac.Catalog.from_file(catalog_file) catalog.validate_all()
>>> 62 catalog.validate_all(recursive=False)
>>> 0 |
I don't think so. The question is not related to recursion, more to be able to check whether link hrefs actually exist. |
In Lines 1058 to 1069 in 9c323c4
So |
But the issue is about validate, not validate_all. |
😕 I think we currently allow all the possible cases via
Is there another behavior that I'm missing? |
Oh, I see. You were saying I should use validate_all(recursive=False) instead of validate. Will try... |
Specifically: - add `validate_all_dict` function for validating objects as dicts (i.e., rename original `validate_all` function) - deprecate support for passing dict objects to `validate_all` (use new `validate_all_dict` function instead) - add support for passing `STACObject` to `validate_all` (and prohibit passing a value for `href` when passing a `STACObject`) Fixes stac-utils#1205
Specifically: - add `validate_all_dict` function for validating objects as dicts (i.e., rename original `validate_all` function) - deprecate support for passing dict objects to `validate_all` (use new `validate_all_dict` function instead) - add support for passing `STACObject` to `validate_all` (and prohibit passing a value for `href` when passing a `STACObject`) Fixes stac-utils#1205
Specifically: - add `validate_all_dict` function for validating objects as dicts (i.e., rename original `validate_all` function) - deprecate support for passing dict objects to `validate_all` (use new `validate_all_dict` function instead) - add support for passing `STACObject` to `validate_all` (and prohibit passing a value for `href` when passing a `STACObject`) Fixes stac-utils#1205
Specifically: - add `validate_all_dict` function for validating objects as dicts (i.e., rename original `validate_all` function) - deprecate support for passing dict objects to `validate_all` (use new `validate_all_dict` function instead) - add support for passing `STACObject` to `validate_all` (and prohibit passing a value for `href` when passing a `STACObject`) Fixes stac-utils#1205
Specifically: - add `validate_all_dict` function for validating objects as dicts (i.e., rename original `validate_all` function) - deprecate support for passing dict objects to `validate_all` (use new `validate_all_dict` function instead) - add support for passing `STACObject` to `validate_all` (and prohibit passing a value for `href` when passing a `STACObject`) Fixes stac-utils#1205
Specifically: - add `validate_all_dict` function for validating objects as dicts (i.e., rename original `validate_all` function) - deprecate support for passing dict objects to `validate_all` (use new `validate_all_dict` function instead) - add support for passing `STACObject` to `validate_all` (and prohibit passing a value for `href` when passing a `STACObject`) Fixes stac-utils#1205
* Add support to validate_all for STACObject Specifically: - add `validate_all_dict` function for validating objects as dicts (i.e., rename original `validate_all` function) - deprecate support for passing dict objects to `validate_all` (use new `validate_all_dict` function instead) - add support for passing `STACObject` to `validate_all` (and prohibit passing a value for `href` when passing a `STACObject`) Fixes #1205 * Update tests/validation/test_validate.py * Update tests/validation/test_validate.py * Update tests/validation/test_validate.py --------- Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
As far as I understand, validate_all implicitly validates whether the STAC links (item, child) are valid (i.e. the href exists).
It would be great if this small feature would also be available (via a flag/parameter) in the validation for a single object/dict.
The text was updated successfully, but these errors were encountered: