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

Pagination improvements #278

Merged
merged 9 commits into from
Sep 13, 2021
Merged

Pagination improvements #278

merged 9 commits into from
Sep 13, 2021

Conversation

JWCook
Copy link
Member

@JWCook JWCook commented Sep 13, 2021

Updates #276

  • Exclude most pagination params from controller method signatures, in favor of using Paginator instead
  • Update Paginator to support request positional args
  • Fix ID-based pagination; total_results is only accurate for first page, since subsequent pages have decreasing total_results due to id_above param
  • Move paginate_autocomplete() to places module, since that's the only place it's used
  • Handle special pagination for get_observation_fields() within that function instead of trying to handle it generically in Paginator
  • Remove paginate_all() support for V0 observations.json
  • Update remaining API request functions to call paginate_all() instead of (harder to follow) @add_paginate_all decorator
  • Move request estimating to separate Paginator.count() method instead of automagically doing it with total_results property

@JWCook JWCook added the enhancement New feature or request label Sep 13, 2021
@JWCook JWCook added this to the v1.0 milestone Sep 13, 2021
@JWCook JWCook marked this pull request as ready for review September 13, 2021 21:34
@JWCook JWCook merged commit 5c6c407 into pyinat:main Sep 13, 2021
@JWCook JWCook deleted the paginator branch September 13, 2021 21:35
@JWCook JWCook modified the milestones: v1.0, v1.1 Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant