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

Set _stac_io on constructed object if root passed into from_dict #589

Closed
matthewhanson opened this issue Jul 29, 2021 · 1 comment · Fixed by #633
Closed

Set _stac_io on constructed object if root passed into from_dict #589

matthewhanson opened this issue Jul 29, 2021 · 1 comment · Fixed by #633
Assignees
Labels
bug Things which are broken
Milestone

Comments

@matthewhanson
Copy link
Member

The from_dict functions can now take in a root catalog. If provided, the resulting object should set it's _stac_io object to that of the root.

As it stands now, if you get Collections from a root catalog, those collections will switch back to using the DefaultStacIO class.

@matthewhanson matthewhanson added the bug Things which are broken label Jul 29, 2021
@duckontheweb duckontheweb self-assigned this Jul 30, 2021
@duckontheweb duckontheweb added this to the 1.2.0 milestone Jul 30, 2021
duckontheweb pushed a commit to duckontheweb/pystac that referenced this issue Aug 23, 2021
@matthewhanson
Copy link
Member Author

@duckontheweb This was changed in #590, however now I see that this initial ticket I created is flawed. A couple weeks @lossyrob and I talked briefly about this and now that I've dug into this again I see he's correct.

The issue was due to pystac-client incorrectly accessing self._stac_io when it should be accessing the root Catalog's _stac_io. For some reason I implemented the CollectionClient.assert_conforms_to referencing the instances _stac_io attribute...but no other class in PySTAC does this. Resolving STAC objects happens through the entities root _stac_io attribute, and CollectionClient.assert_conforms_to should do the same.

I'm implementing this now in pystac-client, and will remove the from_dict workaround I had to set the CollectionClient _stac_io attribute and test with PySTAC main, and will report back.

I apologize for requesting this change, but I think it should be reverted.

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

Successfully merging a pull request may close this issue.

2 participants