BOT: Fix #492: Expose get_interval_range() and add add_interval_range()#1096
BOT: Fix #492: Expose get_interval_range() and add add_interval_range()#1096nikosbosse wants to merge 1 commit intomainfrom
Conversation
…and add add_interval_range() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
nikosbosse
left a comment
There was a problem hiding this comment.
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.
Summary
get_range_from_quantile()toget_interval_range()and exports it, giving users direct access to compute interval ranges from quantile levelsadd_interval_range()function that adds aninterval_rangecolumn to a data.table with aquantile_levelcolumnRoot cause
get_range_from_quantile()was marked@keywords internaland not exported, forcing users to use:::to access it. Maintainer consensus (from the issue discussion) was to rename and export it, plus provide anadd_interval_range()convenience wrapper.What changed
R/helper-quantile-interval-range.R: Renamed function, added@exportand@examples, createdadd_interval_range()R/get-coverage.R,R/metrics-quantile.R: Updated internal call sitesNAMESPACE: New exportsget_interval_rangeandadd_interval_rangeman/: New docs for both functions, deleted oldget_range_from_quantile.Rdvignettes/Deprecated-visualisations.Rmd: Replaced:::get_range_from_quantile()with::get_interval_range()Test coverage
example_quantile, copy semantics, error on missingquantile_level, and regression guard for internal callersTest plan
get_interval_range()returns correct interval rangesadd_interval_range()adds correct columnget_coverage(),score(),wis()) still work correctly🤖 Generated with Claude Code