Skip to content

Commit f384a7f

Browse files
committed
Fix --select-by-word/regex to be case insensitive, whoops
Forgot a flag in a critical line.
1 parent 9e230ef commit f384a7f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cumulus_etl/nlp/selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def _define_regex_filter(
153153
patterns.extend(cli_utils.user_term_to_pattern(word).pattern for word in words)
154154

155155
# combine into one big compiled pattern
156-
patterns = re.compile("|".join(patterns))
156+
patterns = re.compile("|".join(patterns), re.IGNORECASE)
157157

158158
async def res_filter(codebook: deid.Codebook, resource: dict) -> bool:
159159
try:

tests/nlp/test_selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ async def test_selection_by_search(self):
253253
self.mock_response()
254254
self.mock_response()
255255
await self.run_etl(
256-
"--select-by-word=doc2", # hits one docref
256+
"--select-by-word=DOC2", # hits one docref
257257
"--select-by-word=do", # hits none
258258
"--select-by-regex=d.4", # hits one dxreport
259259
)

0 commit comments

Comments
 (0)