Skip to content

Expose sort and order in the pyvolca search and traversal methods - #222

Merged
ccomb merged 1 commit into
mainfrom
pyvolca-consumers-sort-order
Jul 15, 2026
Merged

Expose sort and order in the pyvolca search and traversal methods#222
ccomb merged 1 commit into
mainfrom
pyvolca-consumers-sort-order

Conversation

@ccomb

@ccomb ccomb commented Jul 15, 2026

Copy link
Copy Markdown
Owner

The engine accepts sort and order query 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, and get_consumers now take optional keyword-only sort= and order= 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/order reach the wire, the other asserts they stay out of the query string when unset. The README API reference was regenerated with scripts/gen_api_md.py --write. Full pyvolca suite: 232 passed, 7 skipped (live-engine tests, as usual without a built binary).

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.
@ccomb
ccomb merged commit 80038ee into main Jul 15, 2026
11 checks passed
@ccomb
ccomb deleted the pyvolca-consumers-sort-order branch July 15, 2026 21:15
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

Successfully merging this pull request may close these issues.

1 participant