Skip to content

Review #363 (6/19): supported_measures_list becomes the function supported_measures() - #431

Draft
florence-bockting wants to merge 3 commits into
fix/pred-measure-argsfrom
fix/pred-measure-supported
Draft

florence-bockting wants to merge 3 commits into
fix/pred-measure-argsfrom
fix/pred-measure-supported

Conversation

@florence-bockting

Copy link
Copy Markdown
Contributor

PR 6/19 for the review of #363. It stacks on #430, because both change .prepare_measures().
I will rebase it to pred_measure after #430 merges.

supported_measures_list becomes the function supported_measures()

Review comment: r4553955796

Implementation:

  • supported_measures() is exported and returns names(.measure_spec) (R/pred_measure-builtin.R). The constant supported_measures_list is removed.
  • .prepare_measures() calls supported_measures() and has no supported_measures_list argument. Its caller do_pred_measure() no longer passes the constant. The name check in .measure_entry_custom() also calls the function.
  • The 8 roxygen links, _pkgdown.yml, NEWS.md and migration-guide.Rmd use supported_measures().

Tests: test_pred_measure_helpers.R no longer gets the constant with getFromNamespace(). The .prepare_measures() calls have no supported_measures_list argument. A new test checks that supported_measures() returns a character vector with "elpd", "rmse" and "srps".

Test runs

The tests that match pred_measure|compare|deprecated pass with NOT_CRAN=true: [ FAIL 0 | WARN 52 | SKIP 0 | PASS 810 ]. On the base branch (#430) the result is [ FAIL 0 | WARN 52 | SKIP 0 | PASS 808 ]. The 2 extra passes come from the new test.

This PR was assisted by use of LLM.

@codecov-commenter

codecov-commenter commented Nov 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.44%. Comparing base (03dd172) to head (ec95927).

Additional details and impacted files
@@                  Coverage Diff                   @@
##           fix/pred-measure-args     #431   +/-   ##
======================================================
  Coverage                  92.44%   92.44%           
======================================================
  Files                         38       38           
  Lines                       4712     4713    +1     
======================================================
+ Hits                        4356     4357    +1     
  Misses                       356      356           

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if ec95927 is merged into fix/pred-measure-args:

Status Name Current Incoming Interval
✔️ loo_matrix 1.4s 1.4s [-0.72%, +0.82%]
✔️ loo_function 1.27s 1.26s [-1.51%, +0.56%]

Further explanation regarding interpretation and methodology can be found in the documentation.

This branch has not been deployed

No deployments
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