Skip to content

Conversation

@d-chambers
Copy link
Contributor

@d-chambers d-chambers commented Dec 22, 2025

Description

This PR tries to add more polish to muting patch functions. It tries to add more comprehensive docs and fixes the relative parameter functionality.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes.
  • documented the new feature with docstrings and/or appropriate doc page.
  • included tests. See testing guidelines.
  • added the "ready_for_review" tag once the PR is ready to be reviewed.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Improved implicit value computation in 2D mute geometry operations for enhanced accuracy.
  • Documentation

    • Clarified boundary specifications for muting regions.
    • Extended examples and docstrings to better illustrate 2D muting behavior with straight-line boundaries.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

Walkthrough

Updates to mute geometry handling in dascore/proc/mute.py, including revised implicit value computation using coordinate compatibility checks, clarified boundary specification terminology in documentation, extended code examples, and updated notes on muting limitations for 2D cases with straight-line boundaries.

Changes

Cohort / File(s) Summary
Core Logic Updates
dascore/proc/mute.py
Modified implicit value handling in 2D mute geometry to compute compatibility values via coord._get_compatible_value(vals, relative=relative) before converting to float after subtracting coord.min(), aligning with coordinate's relative/absolute interpretation.
Documentation Updates
dascore/proc/mute.py
Clarified boundary specifications in line_mute docstrings to use "length-2 sequences" terminology, added explicit note that 2D mutes require straight-line boundaries, extended examples with comments illustrating 2D straight-line boundaries, and updated muting limitation notes to reflect up-to-2D support with straight-line boundaries for 2D cases.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main changes: updating mute documentation and fixing the relative parameter functionality mentioned in the PR description.
Description check ✅ Passed The description provides context about improving muting functions and mentions docs and relative param fixes, but lacks specific details like issue references, test inclusion status, or documentation completion.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mute_doc_update

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85b532c and 62d4702.

📒 Files selected for processing (1)
  • dascore/proc/mute.py
🧰 Additional context used
🧬 Code graph analysis (1)
dascore/proc/mute.py (2)
dascore/core/coords.py (1)
  • _get_compatible_value (610-635)
dascore/utils/time.py (1)
  • to_float (331-337)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.13)
  • GitHub Check: test_code_min_deps (windows-latest, 3.13)
  • GitHub Check: test_code_min_deps (windows-latest, 3.14)
  • GitHub Check: test_code_min_deps (macos-latest, 3.14)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.14)
  • GitHub Check: test_code (macos-latest, 3.14)
  • GitHub Check: test_code (windows-latest, 3.11)
  • GitHub Check: test_code (macos-latest, 3.13)
  • GitHub Check: test_code (ubuntu-latest, 3.14)
  • GitHub Check: test_code (ubuntu-latest, 3.12)
  • GitHub Check: test_code (windows-latest, 3.12)
  • GitHub Check: test_code (windows-latest, 3.14)
  • GitHub Check: test_code (ubuntu-latest, 3.11)
  • GitHub Check: test_code (ubuntu-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.13)
  • GitHub Check: test_code (macos-latest, 3.11)
  • GitHub Check: test_code (macos-latest, 3.12)
  • GitHub Check: Run benchmarks
🔇 Additional comments (2)
dascore/proc/mute.py (2)

421-421: Excellent documentation improvements.

The clarifications enhance readability:

  • "length-2 sequences" is more precise than generic array/list terminology
  • Added example comments clearly illustrate 2D straight-line boundary behavior
  • Updated notes explicitly state the 2D straight-line boundary limitation

These changes make the API more understandable for users.

Also applies to: 438-438, 445-445, 459-460, 467-468, 503-504


237-240: Good improvement for coordinate value handling.

The implementation using coord._get_compatible_value() properly handles units, percentages, datetime coordinates, and relative/absolute interpretation, fixing the relative parameter functionality. The relative parameter is correctly threaded through the call chain and is well-tested with multiple test cases covering both relative and absolute modes.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.92%. Comparing base (85b532c) to head (62d4702).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #592      +/-   ##
==========================================
- Coverage   99.92%   99.92%   -0.01%     
==========================================
  Files         129      129              
  Lines       11274    11272       -2     
==========================================
- Hits        11266    11264       -2     
  Misses          8        8              
Flag Coverage Δ
unittests 99.92% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 22, 2025

CodSpeed Performance Report

Merging #592 will not alter performance

Comparing mute_doc_update (62d4702) with master (85b532c)

Summary

✅ 54 untouched

@d-chambers d-chambers merged commit 79c09ac into master Dec 23, 2025
25 checks passed
@d-chambers d-chambers deleted the mute_doc_update branch December 23, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants