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

Collection and Catalog inheritance #1082

Closed
matthewhanson opened this issue Apr 5, 2021 · 12 comments · Fixed by #1091
Closed

Collection and Catalog inheritance #1082

matthewhanson opened this issue Apr 5, 2021 · 12 comments · Fixed by #1091
Assignees
Labels
Milestone

Comments

@matthewhanson
Copy link
Collaborator

We recently talked about changing the spec so that Collection does not inherit from Catalog, but I'm having trouble finding where there was wording changes to reflect that. There also doesn't appear to be anything in the CHANGELOG about it.

@pgadomski pointed out where the spec still allows a root link to point to a Collection. But since a Collection is no longer a Catalog, it cannot serve as a root catalog.

@gadomski
Copy link
Collaborator

gadomski commented Apr 5, 2021

I found two other references to collections-as-root.

@m-mohr
Copy link
Collaborator

m-mohr commented Apr 7, 2021

That Collections can't be a root seems also be to be an issue, but more for the API, right? Why should we restrict that?

@matthewhanson
Copy link
Collaborator Author

@m-mohr not sure what you mean, in an API you'd always have a root catalog.
For static catalogs if we want Collections to act as a root then we'd have to change the spec to specify that a Catalog or a Collection can be a root object

@m-mohr
Copy link
Collaborator

m-mohr commented Apr 8, 2021

That's what I meant to express. Root catalogs should be allowed to be Collections. It is allowed since 0.6, why drop this now? I don't see a good reason. (Dropping inheritance for the type field is not a good reason IMHO.)

But since a Collection is no longer a Catalog, it cannot serve as a root catalog.

Why? Is this just because the name is "root catalog" and not "root catalog or collection"?

It feels like the addition of type and removal of inheritance is giving us more issues than it solves problems...
This is a good example of why we should avoid last-minute breaking changes, I think.

@m-mohr m-mohr added the bug label Apr 8, 2021
@m-mohr m-mohr added this to the 1.0.0-rc.3 milestone Apr 8, 2021
@matthewhanson
Copy link
Collaborator Author

Correct a root Catalog is a "Catalog", not a Collection. If we want to define that a Root can be Catalog or Collection that's fine, but as it stands I don't think a Collection can act as a root Catalog because it's not a Catalog.

@cholmes
Copy link
Contributor

cholmes commented Apr 9, 2021 via email

@matthewhanson
Copy link
Collaborator Author

Does it make sense to word this as saying that a Collection can act like a Catalog? Or do we explicitly state that a root object can be a Catalog or Collection?

@cholmes
Copy link
Contributor

cholmes commented Apr 9, 2021

I think we should say both. I do think we should be explicit that a root object can be caalog or collection.

@jisantuc
Copy link
Contributor

jisantuc commented Apr 9, 2021

@matthewhanson can you say more about "a root Catalog is a "Catalog", not a Collection" ? Where is that specified? I think this has more to do with slippage about catalogs vs. Catalogs than it does to do with the type and broken inheritance.

@matthewhanson
Copy link
Collaborator Author

@jisantuc I think you are probably right, a root Catalog has been referred to as a capital-C Catalog, implying that it is a STAC Catalog. Maybe it's just a root catalog, where catalog can be Catalog or Collection. Which is fine, if not a tad confusing

@cholmes
Copy link
Contributor

cholmes commented Apr 15, 2021

Just looked through the occurrences for root and there's definitely room to improve a number of them. I can take on going through and improving, will make a PR

@cholmes cholmes self-assigned this Apr 15, 2021
@m-mohr
Copy link
Collaborator

m-mohr commented Apr 15, 2021

Finds most occurances: /(root|parent)\s+(STAC\s+)?catalog/i ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants