-
Notifications
You must be signed in to change notification settings - Fork 12
Bugfix/regex arithmetic #248
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a regex bug where function names were being incorrectly matched as substrings, causing unintended replacements. The fix adds word boundaries to ensure exact function name matching in arithmetic expressions.
- Adds word boundary anchors (
\b) to regex pattern for function names in arithmetic expressions - Updates package version constraints in requirements file to use more flexible versioning
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/eva/transforms/arithmetic.py | Fixes regex pattern to prevent partial function name matches |
| requirements_sles15.txt | Updates package version constraints for better compatibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
|
Sorry to bug you for this bug @CoryMartin-NOAA but I need write approval. |
|
Also @mranst apparently this was my problem with EVA, not the package versions. |
|
This looks reasonable to me, I feel like there must be a better way to do what arithmetic does in general. Using |
The regex change
abswas replacingabsoluteDynamicTopographyfrom the ocean obs. It took me a bit to identify this bug..