Conversation
There was a problem hiding this comment.
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.
|
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..