Repository navigation
feat(ledger): flow candidates, classification stats, and accepting suggestions in bulk - #251
Merged
Merged
Conversation
…ggestions in bulk Brings the Python client level with the TypeScript client's last two pushes. `get_flow_candidates` reads the cash flow rows a line may be tagged with under the entity's Reporting Style. `get_classification_stats` reads how a month's bank lines were classified per suggestion source, with the share that needed a person's choice. `accept_suggestions` takes the suggestion on every open bank line the filters select, posting too with `commit`, and answers every line with its outcome or the reason it was skipped. SDK and schema regenerated against the local stack running robosystems #1800; the other drift is comment strings on existing models. Claude-Session: https://claude.ai/code/session_014Wxgk4yttBxgdE2uBHT71R
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.
What
The Python equivalent of typescript-client #267 (v2.12.1) and #268, which went out without it.
get_flow_candidates(graph_id, entity_id=)→flowCandidates: the leaf investing and financing rows of the entity's cash flow statement, the set a bank line'sclassified_flow_qnamemay take.get_classification_stats(graph_id, period, entity_id=)→classificationStats: per suggestion source, lines accepted, overridden, split or chosen with no suggestion; the share that needed a person;unstampedfor lines posted before outcomes were recorded;Nonewhen the ledger is not initialized.accept_suggestions(graph_id, body=)→ theaccept-suggestionsoperation: filters, explicitevent_ids,commit,dry_run,limit; the result carries the counts,truncated, and every line with its outcome or skip reason.FlowCandidates.graphqlandClassificationStats.graphql;schema.graphqlrefreshed;graphql/generatedregenerated (the drift gate is clean);api/andmodels/regenerated from the local stack on robosystems #1800. Beyond the new operation and its models, the regenerated diff is comment strings on existing request models.Waits on
The server read and operation ship in the next robosystems release after v1.16.16, carrying #1799 (
flowCandidates) and #1800 (classificationStats,accept-suggestions). Until it is in prod, the two reads fail GraphQL validation there and the operation answers 404.Additive: a minor. No stable-tier change; the integration template's emit symbols are untouched.
Tests
6 new in
tests/test_ledger_client.py: the flow rows and the entity default, the stats shape and the null case, the batch's body and result, and the empty-body default.just lint,just typecheck,just test: 687 passed, 17 skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_014Wxgk4yttBxgdE2uBHT71R