Skip to content

ref(grouping): Simplify parameterizer code#111345

Merged
lobsterkatie merged 13 commits into
masterfrom
kmclb-more-parameterizer-refactors
Mar 31, 2026
Merged

ref(grouping): Simplify parameterizer code#111345
lobsterkatie merged 13 commits into
masterfrom
kmclb-more-parameterizer-refactors

Conversation

@lobsterkatie
Copy link
Copy Markdown
Member

@lobsterkatie lobsterkatie commented Mar 23, 2026

This is handful of refactors to the parameterization code, to make it a bit simpler and more testable.

  • Allow ParameterizationRegex objects to be passed directly to parameterizer during initialization rather than always using the default set. (This should make it easier to test, so we don't have to do a bunch of mocking.) If none are passed, the default set will still be used.

  • Create the final regex directly in __init__ rather than in a separate method.

  • When deciding if the experimental parameterizer is actually experimental, look at the regexes themselves rather than at the regex maps.

  • When deciding whether to skip testing the experimental parameterizer, look directly at it rather than comparing the regex maps.

  • Use lastgroup to get matched key/original value directly rather than iterating over groupdict.

  • Remove the now-unused regex maps.

  • Rename a number of things.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 23, 2026
@lobsterkatie lobsterkatie force-pushed the kmclb-more-parameterizer-refactors branch from 25abad3 to 9bd39e2 Compare March 23, 2026 22:11
@lobsterkatie lobsterkatie force-pushed the kmclb-more-parameterizer-refactors branch from 9bd39e2 to f8f5f24 Compare March 31, 2026 18:59
@lobsterkatie lobsterkatie marked this pull request as ready for review March 31, 2026 19:24
@lobsterkatie lobsterkatie requested a review from a team as a code owner March 31, 2026 19:24
Copy link
Copy Markdown
Member

@nora-shap nora-shap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as always, I appreciate your docstrings/comments 🚀

@lobsterkatie lobsterkatie merged commit 391f517 into master Mar 31, 2026
108 checks passed
@lobsterkatie lobsterkatie deleted the kmclb-more-parameterizer-refactors branch March 31, 2026 20:56
dashed pushed a commit that referenced this pull request Apr 1, 2026
This is handful of refactors to the parameterization code, to make it a bit simpler and more testable.

- Allow `ParameterizationRegex` objects to be passed directly to parameterizer during initialization rather than always using the default set. (This should make it easier to test, so we don't have to do a bunch of mocking.) If none are passed, the default set will still be used.

- Create the final regex directly in `__init__` rather than in a separate method.

- When deciding if the experimental parameterizer is actually experimental, look at the regexes themselves rather than at the regex maps.

- When deciding whether to skip testing the experimental parameterizer, look directly at it rather than comparing the regex maps.

- Use `lastgroup` to get matched key/original value directly rather than iterating over `groupdict`.

- Remove the now-unused regex maps.

- Rename a number of things.
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants