-
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
compatibility with pystac-client #371
Comments
I also tried installing unrelased versions, but can't import pystac_client:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-442652a99a3a> in <module>
----> 1 import pystac_client
2 #print(pystac_client.__version__)
/srv/conda/envs/notebook/lib/python3.8/site-packages/pystac_client/__init__.py in <module>
1 # flake8: noqa
----> 2 from pystac import STAC_IO
3 import pystac.extensions.base
4
5 from pystac_client.version import __version__
ImportError: cannot import name 'STAC_IO' from 'pystac' (/srv/conda/envs/notebook/lib/python3.8/site-packages/pystac/__init__.py) |
Thanks for reporting this @scottyhq. @matthewhanson Based on this, I'm thinking it would be good to get your work on the stripped down ItemCollection into the 1.0 release. Do you want to put in a PR from https://github.com/stac-utils/pystac/blob/mah/itemcollection, or do you feel like there's more work that needs to be done on that? |
@duckontheweb Agree, I'll get a PR up this coming week (holiday Monday here in the states, but will push on that Tuesday) |
The issue with this scenario is that We can discuss in detail at the STAC Ecosystem call, but even regardless of what we decide we may want to hold off adding it here and keeping it in pystac-client until that's been fully tested and working. Then we can port it over in a future version. |
Thanks for the reminder on that issue @matthewhanson, I had forgotten some of the details of that discussion and where we landed. Here are my thoughts on this...
I agree in general. However, other libraries that use PySTAC (e.g. It seems like the path to resolving this is:
|
We had a productive conversation about how to handle ItemCollections on a STAC call this morning and were able to come up with a path forward. We will add support for ItemCollections in PySTAC as simple GeoJSON FeatureCollection containers for Items. Here's my proposal for the initial PySTAC implementation:
We should also add methods for converting to/from Catalogs and Collections, but I don't think we should try to include that in the 1.0 PySTAC release. It's going to require some more careful consideration of how we handle things like @scottyhq @matthewhanson Does this sound like a good start and will it meet your immediate needs? |
This all makes sense to me, here's the latest item_collection.py in pystac-client we can pull over. Needs to be updated to include typing where missing, docstrings, and tests. |
I expect released pystac-client and pystac versions to work well together, and am currently encountering a
KeyError: 'id'
when opening saved search results from pystac-client with pystac.Related issue #256, #302 and stac-utils/pystac-client#1
The text was updated successfully, but these errors were encountered: