Skip to content

test: migrate stats/base/dists/signrank/quantile to ULP-based assertions - #14154

Merged
kgryte merged 1 commit into
developfrom
kgryte/ulp-signrank-quantile
Aug 10, 2026
Merged

test: migrate stats/base/dists/signrank/quantile to ULP-based assertions#14154
kgryte merged 1 commit into
developfrom
kgryte/ulp-signrank-quantile

Conversation

@kgryte

@kgryte kgryte commented Aug 10, 2026

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • migrates the tests for stats/base/dists/signrank/quantile from relative tolerance (EPS/delta/tol) assertions to ULP-based assertions using @stdlib/assert/is-almost-same-value, per [RFC]: Migrate math/base/special packages from relative tolerance testing to ULP difference testing (tracking issue) #11352.
  • updates test/test.factory.js and test/test.quantile.js (the only test files in the package which used the tolerance idiom; test/test.js contains only exact assertions and is unchanged). The package has no test.native.js.
  • removes the now unused @stdlib/math/base/special/abs and @stdlib/constants/float64/eps requires and the associated delta/tol locals, while preserving the existing expected[ i ] !== null fixture guard and overall test structure.

ULP bound: 0 in both files.

The bound was tightened agentically: assertions were run against the full R fixture set (150 cases per file) and pass at 0 ULP, i.e. bit-for-bit equality, which is the tightest bound possible. This is expected here, since the signrank quantile function returns integer-valued rank statistics which are exactly representable. The full package suite (326 assertions) was run twice at the final bound with identical results, confirming no FMA/arch-dependent flakiness.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Only test files are changed; no source, docs, or fixtures were touched.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This PR was authored by Claude Code. It mirrored the idiom established in previously merged conversions (e.g. #14129, #14141) and determined the minimum passing ULP bound empirically by running the package test suite.


@stdlib-js/reviewers


Generated by Claude Code

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Good First PR A pull request resolving a Good First Issue. labels Aug 10, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Hello! 👋

We've noticed that you've been opening a number of PRs addressing good first issues. Thank you for your interest and enthusiasm!

Now that you've made a few contributions, we suggest no longer working on good first issues. Instead, we encourage you to prioritize cleaning up any PRs which have yet to be merged and then proceed to work on more involved tasks.

Not only does this ensure that other new contributors can work on things and get ramped up on all things stdlib, it also ensures that you can spend your time on more challenging problems. 🚀

For ideas for future PRs, feel free to search the codebase for TODOs and FIXMEs and be sure to check out other open issues on the issue tracker. Cheers!

@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/signrank/quantile $\\color{green}305/305$
$\\color{green}+100.00\\%$
$\\color{green}45/45$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}305/305$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte added the Tests Pull requests specifically adding tests. label Aug 10, 2026
@kgryte
kgryte marked this pull request as ready for review August 10, 2026 22:39
@kgryte
kgryte requested a review from a team August 10, 2026 22:39
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 10, 2026
@kgryte
kgryte merged commit 6d5eafc into develop Aug 10, 2026
82 checks passed
@kgryte
kgryte deleted the kgryte/ulp-signrank-quantile branch August 10, 2026 22:40
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Statistics Issue or pull request related to statistical functionality. Tests Pull requests specifically adding tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants