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

max_items change #258

Closed
TomAugspurger opened this issue Jul 8, 2022 · 1 comment
Closed

max_items change #258

TomAugspurger opened this issue Jul 8, 2022 · 1 comment

Comments

@TomAugspurger
Copy link
Collaborator

pystac-client 0.4.0 changed the default max_items:

import pystac_client

catalog = pystac_client.Client.open("https://planetarycomputer.microsoft.com/api/stac/v1")
search = catalog.search(collections=["goes-cmi"], query={"goes:image-type": {"eq": "FULL DISK"}, "platform": {"eq": "GOES-16"}}, datetime="2022-06-27/2022-06-29")
print(len(list(search.get_all_items())))

With pystac-client=0.3.5 that prints 430. With pystac-client=0.4.0 it prints 100.

A couple things:

  1. Does pystac-client have a versioning / deprecation policy? IMO this is a pretty major change (since it affects the results) and should have gone through a deprecation first.
  2. What behavior do we actually want?

I think that by default pystac-client should return the full result set, and that limiting the results should be done explicitly (the 0.3.5 behavior). By consuming the result iterator with list(), you're asking for everything.

@TomAugspurger
Copy link
Collaborator Author

Sorry, just saw @gadomski's comment at #237 (comment) which discusses max_items.

I'll close this and we can include this discussion over there.

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

No branches or pull requests

1 participant