Skip to content

Document extract.codes strategy, min/max_length, sort_order, disallow… - #1023

Open
mborodii-prog wants to merge 4 commits into
mainfrom
795-complete-document-new-extractcodes-functionality
Open

Document extract.codes strategy, min/max_length, sort_order, disallow…#1023
mborodii-prog wants to merge 4 commits into
mainfrom
795-complete-document-new-extractcodes-functionality

Conversation

@mborodii-prog

@mborodii-prog mborodii-prog commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Documents all extract.codes parameters added in PR Update extract codes with new parameters #744 (min_length, max_length, strategy, sort_order, disallowed_patterns, include_multi_part_tokens)
    plus the previously undocumented extract_raw, none of which had any docstring coverage in wrangles/extract.py::codes().
  • Clarifies the strategy parameter: per backend behavior, balanced and strict currently apply identical filtering (balanced_or_greater = {'balanced',
    'strict'}); only lenient differs by skipping that filter. Default is balanced.

Why

Issue #795 reported that strategy was added to the schema but never fully explained — the docs implied three distinct aggressiveness tiers when the
backend only distinguishes two behaviors. This was verified against the reference implementation (model.py) and reflected accurately in both docstrings.

Changes

  • wrangles/extract.py — added full :param:/:return: documentation to codes().
  • wrangles/recipe_wrangles/extract.py — updated the strategy schema description with the balanced/strict clarification and default; added the missing
    extract_raw schema property.

Allow extract.codes tests to pass against both current service behavior and PR #21 behavior
Accept old and new invalid sort_order service error messages

…ed_patterns, include_multi_part_tokens, and extract_raw params
@mborodii-prog
mborodii-prog requested a review from thomasstvr June 22, 2026 12:08
@mborodii-prog mborodii-prog linked an issue Jun 22, 2026 that may be closed by this pull request
@mborodii-prog mborodii-prog added this to the v1.20 milestone Jun 22, 2026
@mborodii-prog
mborodii-prog requested a review from ebhills July 27, 2026 09:20
@ebhills
ebhills removed their request for review July 27, 2026 14:04

ebhills commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Queue triage (2026-07-27)

  • Disposition: Ready for review
  • Delivery owner: @mborodii-prog
  • Primary reviewer: @thomasstvr
  • Next action: Review the documentation against actual extract.codes behavior and the service-compatible tests.

Please keep the branch current and put the decision in GitHub. This is one of the five active review slots.

@mborodii-prog

Copy link
Copy Markdown
Contributor Author

@thomasstvr @ebhills documentation is up to date with main branch https://github.com/wrangleworks/Wrangles-Extract-Codes/tree/main

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.

Complete / Document New extract.codes functionality

2 participants