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

Add "public" Catalog.stac_io property #675

Open
duckontheweb opened this issue Nov 30, 2021 · 0 comments
Open

Add "public" Catalog.stac_io property #675

duckontheweb opened this issue Nov 30, 2021 · 0 comments
Labels
discussion An issue to capture a discussion enhancement
Milestone

Comments

@duckontheweb
Copy link
Contributor

Accessing the StacIO instance associated with a Catalog is currently only possible using the _stac_io attribute. Using the underscore convention indicates that this property is for internal library use only and not something that should be manipulated by downstream libraries. However, there are a few places in pystac-client where it is necessary to manipulate this attribute, and in stac-utils/pystac-client#126(comment) this came up as possible being a bad pattern/code smell.

In #590 we considered adding a "public" Catalog.stac_io attribute that could be used by downstream libraries to manipulate the _stac_io attribute of a Catalog, but ultimately decided it was not necessary as part of that PR. I would like to revisit that decision given that we now have some additional use-cases for manipulating the attribute outside of PySTAC.

The purpose of this issue is to discuss whether we should add a "public" Catalog.stac_io property that allows users to manipulate with the underlying Catalog._stac_io attribute. Given that downstream libraries are using the "private" Catalog._stac_io attribute we should probably retain that attribute until the next major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion An issue to capture a discussion enhancement
Projects
None yet
Development

No branches or pull requests

2 participants