Skip to content

BOT: Fix #492: Expose get_interval_range() and add add_interval_range()#1096

Draft
nikosbosse wants to merge 1 commit intomainfrom
fix/492-expose-get-interval-range
Draft

BOT: Fix #492: Expose get_interval_range() and add add_interval_range()#1096
nikosbosse wants to merge 1 commit intomainfrom
fix/492-expose-get-interval-range

Conversation

@nikosbosse
Copy link
Collaborator

Summary

  • Renames the internal get_range_from_quantile() to get_interval_range() and exports it, giving users direct access to compute interval ranges from quantile levels
  • Adds a new exported add_interval_range() function that adds an interval_range column to a data.table with a quantile_level column
  • Updates all internal call sites (3 R source files, 1 test file, 1 vignette) to use the renamed function

Root cause

get_range_from_quantile() was marked @keywords internal and not exported, forcing users to use ::: to access it. Maintainer consensus (from the issue discussion) was to rename and export it, plus provide an add_interval_range() convenience wrapper.

What changed

  • R/helper-quantile-interval-range.R: Renamed function, added @export and @examples, created add_interval_range()
  • R/get-coverage.R, R/metrics-quantile.R: Updated internal call sites
  • NAMESPACE: New exports get_interval_range and add_interval_range
  • man/: New docs for both functions, deleted old get_range_from_quantile.Rd
  • vignettes/Deprecated-visualisations.Rmd: Replaced :::get_range_from_quantile() with ::get_interval_range()

Test coverage

  • 7 new test blocks covering: correct output for standard quantiles, edge cases, export accessibility, column addition, integration with example_quantile, copy semantics, error on missing quantile_level, and regression guard for internal callers
  • Full test suite: 695 tests pass, 0 failures
  • R CMD check: 0 errors, 0 warnings, 2 notes (pre-existing)

Test plan

  • New tests verify get_interval_range() returns correct interval ranges
  • New tests verify add_interval_range() adds correct column
  • Full test suite passes (695 tests)
  • R CMD check passes (0 errors, 0 warnings)
  • Internal callers (get_coverage(), score(), wis()) still work correctly

🤖 Generated with Claude Code

…and add add_interval_range()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.83%. Comparing base (ac0c01a) to head (cc99ad9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1096   +/-   ##
=======================================
  Coverage   97.83%   97.83%           
=======================================
  Files          35       35           
  Lines        1845     1849    +4     
=======================================
+ Hits         1805     1809    +4     
  Misses         40       40           

☔ 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.

Copy link
Collaborator Author

@nikosbosse nikosbosse left a comment

Choose a reason for hiding this comment

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

CLAUDE: Clean, well-scoped rename-and-export PR. Correctly renames get_range_from_quantile() to get_interval_range(), exports it, adds add_interval_range() wrapper with proper copy semantics and input validation. All 3 internal call sites updated. Tests are thorough (8 blocks covering standard cases, edge cases, export accessibility, copy semantics, error handling, and regression). Minor note: two old-name references remain in prose/comments within Deprecated-visualisations.Rmd but these are historical documentation in a deprecated vignette — cosmetic only. Verdict: APPROVE.

@nikosbosse nikosbosse marked this pull request as draft February 13, 2026 08:28
@nikosbosse nikosbosse changed the title Fix #492: Expose get_interval_range() and add add_interval_range() BOT: Fix #492: Expose get_interval_range() and add add_interval_range() Feb 13, 2026
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.

1 participant