Skip to content

feat(pyvolca): expose classification match mode on search_activities#186

Merged
ccomb merged 1 commit into
mainfrom
feat/client-classification-match
Jul 8, 2026
Merged

feat(pyvolca): expose classification match mode on search_activities#186
ccomb merged 1 commit into
mainfrom
feat/client-classification-match

Conversation

@ccomb

@ccomb ccomb commented Jul 8, 2026

Copy link
Copy Markdown
Owner

The typed client could filter search_activities by a classification value, but always as a case-insensitive substring — there was no way to ask for exact equality. The engine and the MCP tool already accept a match-mode parameter for the same search; only the Python client left it out.

search_activities now takes classification_match (a MatchMode, default CONTAINS). Setting it to MatchMode.EXACT restricts the filter to entries whose classification value equals the given string exactly. The default is unchanged, so existing calls behave identically.

This mirrors what get_supply_chain and get_consumers already do through ClassificationFilter.mode; here it is threaded through the flat classification / classification_value arguments that search_activities uses.

Verified end-to-end against a real database: on Agribalyse, classification_value="Recipes" matches 763 processes with the default substring mode and 0 with exact mode, while the exact full path Agricultural\Food\Recipes matches the 763 again — confirming the mode reaches the engine.

Ships as pyvolca 0.7.2. The generated README API reference is regenerated to match; full test suite green (187 passed, 7 skipped).

search_activities only sent classification + classification-value, never the
match mode, so a caller could not require exact equality — only the default
substring. The engine's /activities route and the MCP tool already accept a
classification-mode param; the typed client now exposes it as
classification_match (MatchMode, default CONTAINS), mirroring how
get_supply_chain/get_consumers serialise ClassificationFilter.mode.

Ships pyvolca 0.7.2. README API reference regenerated.
@ccomb ccomb merged commit 451bc3d into main Jul 8, 2026
10 checks passed
@ccomb ccomb deleted the feat/client-classification-match branch July 8, 2026 04:44
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