Skip to content
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

Remove SELF_CONTAINED as a Catalog type #299

Open
matthewhanson opened this issue Apr 5, 2021 · 4 comments
Open

Remove SELF_CONTAINED as a Catalog type #299

matthewhanson opened this issue Apr 5, 2021 · 4 comments
Milestone

Comments

@matthewhanson
Copy link
Member

catalog_type distinguishes between ABSOLUTE_PUBLISHED, RELATIVE_PUBLISHED, and SELF_CONTAINED.

However the only different between RELATIVE_PUBLISHED and SELF_CONTAINED is that there is no self link on the root catalog of a SELF_CONTAINED catalog.

I don't think this is enough of a difference to warrant calling out as a catalog type. For one, the absolute self link at root isn't really used in most (all?) tooling other than for user to know where the root cat lives. I guess stac-browser uses it to display and create the absolute link for it.

You can always just ignore the self link or remove it entirely. Or we could just have an option to save it or now when you save a catalog (include_self_on_root). This is clearer than having a catalog type where it isn't obvious what the practical difference is.

@lossyrob
Copy link
Member

lossyrob commented May 4, 2021

I'd want to see this change in the spec before implementing in PySTAC, so if we were to go this route it would be after 1.0. Perhaps move this to a stac-spec issue?

@gadomski
Copy link
Member

I find SELF_CONTAINED very useful, e.g. when creating example catalogs for stactools-packages: https://github.com/stactools-packages/usda-cdl/blob/688e7f3defe0e2f8dfdb235eb019d07cf2bebe88/scripts/create_examples.py. So I'm 👎🏽 on this change. @matthewhanson this is a pretty old ticket -- do you still agree with your past self?

@matthewhanson
Copy link
Member Author

Yeah, I sorta do still agree with myself, but not super strongly. It just seems like a the wrong place to make such distinction. The spec isn't really clear that these are all different types of Catalogs (first, it's not clear what "Catalog Type" is since it's not defined), and not intuitive that a self contained catalog just means there's no self link at the root.

Seems like an option for including or excluding self should be an explicit option rather than defined by some vague type (overloaded term) which doesn't do anything beyond that.

All that being said, some things you have to learn to live with and it's been a while so if people find it useful then so be it.

@gadomski
Copy link
Member

gadomski commented Mar 24, 2023

I agree with your general sentiment about catalog types, but what pystac has (mostly) aligns with the best practices: https://github.com/radiantearth/stac-spec/blob/master/best-practices.md#self-contained-catalogs. IMO any changes should be made to the best practices document first, then trickle down to pystac?

@gadomski gadomski added this to the 2.0 milestone Jun 26, 2023
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