Skip to content

Add ignore_separators option to by_name() - #105

Open
gefleury wants to merge 3 commits into
openMetadataInitiative:pipelinefrom
gefleury:by-name-ignore-hyphens
Open

Add ignore_separators option to by_name()#105
gefleury wants to merge 3 commits into
openMetadataInitiative:pipelinefrom
gefleury:by-name-ignore-hyphens

Conversation

@gefleury

Copy link
Copy Markdown

Adds a new ignore_separators option to by_name(), plus a small efficiency fix in the same code path.

  • ignore_separators option: when True, hyphens (-), underscores (_), slashes (/), and repeated whitespace are all treated as a single space before matching. For instance,  "CLARITY-TDE" or "CLARITY TDE" now match the canonical "CLARITY/TDE" Technique.
  • Efficiencynormalize(name) was being recomputed on every iteration of the lookup loop even though the query never changes within a call; it's now computed once per call instead.
  • Tests: adds a regression test for ignore_separators.

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