-
Notifications
You must be signed in to change notification settings - Fork 51
deprecate get_all_items_as_dict and get_all_items, add get_items_as_dicts #206
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #206 +/- ##
==========================================
- Coverage 83.93% 83.72% -0.22%
==========================================
Files 9 9
Lines 660 676 +16
==========================================
+ Hits 554 566 +12
- Misses 106 110 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One top-level thought -- in Rust, the convention is to use iter_*
for methods that return iterators. Here, this would mean that get_itemcollections
would be renamed to iter_itemcollections
(same with iter_items
). Does that scan any better to you @philvarner? Just a thought as I was musing about our discussion on whether to include all
in the method name.
Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
Few thoughts. I like that convention, but it's not one used in Python, so I'd avoid it. Though, I also hate methods prefixed with "get" since that's the old (entirely unncecessary) OO convention for accessor methods. I also don't like using |
Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
Yup fair.
Agreed.
Agreed, though since they can be I don't think I feel strongly enough to think a change is necessary now, but happy to support a change too with others' input. |
Well, we default to POST, so... 🤣
oh, so apparently the get prefix was added by in v0.2.0, from the changelog:
(though i think the second msg should say Search.items() renamed @matthewhanson any thoughts on this? |
PySTAC Client has renamed `ItemSearch.get_items()` to `ItemSearch.items()` in stac-utils/pystac-client#206, see also https://github.com/stac-utils/pystac-client/blob/v0.7.1/CHANGELOG.md#deprecated-1.
* ✨ PySTACAPIItemLister to list STAC Items matching STAC API search An iterable-style DataPipe to list STAC Items matching a STAC API search query! Calls pystac_client.ItemSearch.items() to yield pystac.Item instances. Included a doctest and a unit test that produces a list of STAC Items from a STAC API search that can be iterated over. Added a new section in the API docs too. * 🚑 Fix typo on docs/api.md Should be referencing `zen3geo.datapipes.pystac_client.PySTACAPIItemListerIterDataPipe` * 📝 Use non-deprecated .items() in object-detection-boxes tutorial PySTAC Client has renamed `ItemSearch.get_items()` to `ItemSearch.items()` in stac-utils/pystac-client#206, see also https://github.com/stac-utils/pystac-client/blob/v0.7.1/CHANGELOG.md#deprecated-1. * 📝 Intersphinx link to pystac.STACObject in PySTACItemReader docs Properly linking to https://pystac.readthedocs.io/en/1.0/api/pystac.html#pystac.STACObject in the docstring of PySTACItemReaderIterDataPipe.
The `.get_items()` method has been deprecated since stac-utils/pystac-client#206, use `.items()` instead.
Related Issue(s): #187
Description:
PR Checklist: