-
Notifications
You must be signed in to change notification settings - Fork 123
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
Fix normalizing hrefs for RELATIVE_UNPUBLISHED catalogs #300
Conversation
Per https://pystac.readthedocs.io/en/latest/api.html#pystac.CatalogType.RELATIVE_PUBLISHED, `RELATIVE_PUBLISHED` catalogs should only have on absolute link, the `self` link on the root catalog. This failing test shows that items have absolute links.
Here's the test case with annotations
Now, on the last check, all links are resolved, so the Link.get_href() will use the target Is it failing the first link it hits? |
When working with relative published catalogs, sub-catalogs and sub-collections should (IMO) inherit the "relative published" from their root. This adds a test to show that they don't, right now. Also improves the message for the normalizing hrefs test.
Nope, the self link. Here's the reporting from the (improved) test output:
I added a test to check this, and at first it seemed fine. But when I added an intermediate collection w/o an explicit catalog type, then all links under that collection were not relative. It seems like you should be able to set catalog type at the root without having to specify it on all sub-catalogs and sub-collections? |
For For |
Closing this as #309 is changing enough that it's not worth updating this (pretty minor) branch. |
Related Issue(s): None
Description: Per https://pystac.readthedocs.io/en/latest/api.html#pystac.CatalogType.RELATIVE_PUBLISHED,
RELATIVE_PUBLISHED
catalogs should only have one absolute link, theself
link on the root catalog. The commit here is a failing test showing that items have absolute hierarchical paths after normalizing hrefs on aRELATIVE_UNPUBLISHED
catalog. Before fixing in this PR, I want to make sure this is unexpected behavior and it's not just me mis-understanding what's going on.PR Checklist:
scripts/format
)scripts/test
)