This repository was archived by the owner on Apr 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Feat/tr/pagination #123
Merged
Merged
Feat/tr/pagination #123
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…agination tests: creating incomplete test to start testing pagination
… feat: replacing token in url if new token is provided tests: continue to updae test to validate additional pieces of the limit/token expected functionality, still breaking on limit check feat: removing use or Orders type and going with tuple instead
… object if we are returned a token. tests: created simple test implementation to abstract out token handling and generation
…t: use include_query_params instead of parsing query param string ourselves
…r bad token tests: reworking pagination tests tests: adding handle to max limit in test implemented backend
theodorehreuter
commented
Jan 8, 2025
theodorehreuter
commented
Jan 8, 2025
theodorehreuter
commented
Jan 8, 2025
theodorehreuter
commented
Jan 8, 2025
theodorehreuter
commented
Jan 8, 2025
theodorehreuter
commented
Jan 8, 2025
theodorehreuter
commented
Jan 8, 2025
theodorehreuter
commented
Jan 8, 2025
jkeifer
reviewed
Jan 8, 2025
…getting records until no more are available ftests: added separate test to get 404 back with no orders and using a token
…y features after token lookup tests: separating empty orders check to separate test
…re not being torn down for every test
… issue with in memory DB by adding missing __init__ to class. tests: added multiple orders to create_order fixture and passed this fixture to other tests using previously existing create_order_allowed_paylaods tests: added setup_pagination fixture that is now necessary again after fixing the in memory db init issue
philvarner
reviewed
Jan 27, 2025
philvarner
reviewed
Jan 27, 2025
philvarner
reviewed
Jan 27, 2025
philvarner
reviewed
Jan 27, 2025
philvarner
reviewed
Jan 27, 2025
philvarner
reviewed
Jan 27, 2025
philvarner
reviewed
Jan 27, 2025
philvarner
reviewed
Jan 27, 2025
Contributor
|
Done leaving comments. |
…ethods to clean up endpoint business logic. tests: small tweaks to test based on PR feedback
philvarner
reviewed
Jan 28, 2025
philvarner
reviewed
Jan 28, 2025
tests/conftest.py
Outdated
| while next_url: | ||
| url = next_url | ||
| if method == "POST": | ||
| next_url = next( |
Contributor
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.
next is being extracted here to be used as a parameter -- it's supposed to be part of the POST body.
Contributor
Author
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.
fixed so its extracting the body.
… next/limit must be passed as key/value pairs in the POST body. These are also now returned in the POST body in the 'next' link object returned by /opportunities tests: update tests to reflect changes in endpoint. POST body is now extracted wholesale from returned link object istead of just the params
philvarner
reviewed
Jan 30, 2025
philvarner
reviewed
Jan 30, 2025
Contributor
|
Couple of comments on some tests, other changes look good. |
philvarner
reviewed
Jan 31, 2025
philvarner
approved these changes
Jan 31, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue(s):
Proposed Changes:
Adding pagination for 4 endpoints:
GET /ordersGET /productsGET /orders/{order_id}/statusesPOST /products/{product_id}/opportunitiesWe are using token based approach to pagination.
BREAKING CHANGES:
root_router.pyinstead ofroot_backend.pyroot_backend.pyandproduct_backend.pyto tuples, to include returning a new pagination token.PR Checklist: