Expose sort and order in the pyvolca search and traversal methods - #222
Merged
Conversation
The engine accepts sort/order query parameters on the activities and flows searches, the supply chain, and the consumers endpoints, but the pyvolca wrappers never forwarded them, so Python callers could not ask the server to order results. All four methods now take optional sort= and order= keyword arguments that flow through the dispatcher like the existing pagination parameters. README API reference regenerated.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The engine accepts
sortandorderquery parameters on four endpoints — the activities search, the flows search, the supply chain, and the consumers listing — but none of the corresponding pyvolca methods forwarded them, so Python callers had no way to ask the server to order results.search_activities,search_flows,get_supply_chain, andget_consumersnow take optional keyword-onlysort=andorder=arguments. They flow through the dispatcher exactly like the existing pagination parameters: left unset, nothing is added to the query string and the server defaults apply. Each docstring lists the sort keys its endpoint supports, taken from the engine's comparators.Two dispatch tests cover the shared path: one asserts
sort/orderreach the wire, the other asserts they stay out of the query string when unset. The README API reference was regenerated withscripts/gen_api_md.py --write. Full pyvolca suite: 232 passed, 7 skipped (live-engine tests, as usual without a built binary).