Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ update algorithm logic to include regex in parentheses #159

Merged
merged 13 commits into from
Dec 18, 2024

Conversation

signekb
Copy link
Contributor

@signekb signekb commented Dec 18, 2024

Description

This PR updates the logic in get_algorithm_logic() to include regex in parentheses.
We'll need for e.g., podiatrist services: (speciale =~ '^54') AND (barnmak != 0).

To test the updated regex, I added an argument to get_algorithm_logic with a default of algorithm. This enables me to add a test_algorithm_logic object instead of the algorithm we use, so the tests won't start failing if/when the algorithm is updated.

I don't think this is good practice (adding an arg mainly just for test purposes), but I wanted to test the logic formally now that it's a bit more complex. Let me know if there's a better way to do this!

@signekb signekb changed the title feat: ✨ update regex logic to include regex within parentheses feat: ✨ update algorithm logic to include regex in parentheses Dec 18, 2024
Base automatically changed from feat/include-gld-purchases to main December 18, 2024 16:22
Copy link
Member

@lwjohnst86 lwjohnst86 left a comment

Choose a reason for hiding this comment

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

Nice! I think it's fine that we use that arg for this purpose ☺️ it does make it more self-contained ☺️

@lwjohnst86 lwjohnst86 merged commit dd78c3e into main Dec 18, 2024
2 of 3 checks passed
@lwjohnst86 lwjohnst86 deleted the feat/update-algorithm-logic-for-regex-in-parentheses branch December 18, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants