add option to set data_type in patch_function decorator#702
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughRefactor transforms to declare output data type via decorator parameter instead of inline attribute updates. Enhance ChangesPatch Function Enhancement and Transform Data Type Centralization
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f81df7d901
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
|
|
||
| @patch_function() | ||
| @patch_function(data_type="frequency_band_energy") |
There was a problem hiding this comment.
Restore FBE default colormap after renaming data_type
For FBE outputs, this new frequency_band_energy value no longer matches the existing DEFAULT_COLORMAPS key ("frequency-band energy"), while waterfall(cmap="default") lowercases the patch data_type and looks it up directly before falling back to "bwr". As a result, any FBE patch plotted with the default waterfall colormap now silently loses its prior Spectral_r coloring; please update the colormap key alongside the data_type rename.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #702 +/- ##
=======================================
Coverage 99.93% 99.93%
=======================================
Files 138 138
Lines 11881 11890 +9
=======================================
+ Hits 11873 11882 +9
Misses 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Adds a
data_typeargument topatch_functionso patch methods can declare a constant outputdata_typein the decorator. The decorator batches this update with history so it does not need an extraupdate_attrscall when both are applied.
This also moves constant
data_typeassignments for strain-rate, FBE, STA/LTA, and kurtosis transforms into their decorators, and registers the new snake_case transform data types inVALID_DATA_TYPES.Summary by CodeRabbit
New Features
frequency_band_energy,kurtosis, andstalta.Improvements