Skip to content

docs: fix descriptions - #13938

Merged
kgryte merged 2 commits into
developfrom
philipp/drift-stats-base-dists-kumaraswamy-2026-08-05
Aug 5, 2026
Merged

kgryte merged 2 commits into
developfrom
philipp/drift-stats-base-dists-kumaraswamy-2026-08-05

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request corrects copy-paste documentation errors in two members of @stdlib/stats/base/dists/kumaraswamy that described the wrong distribution or the wrong function type. No behavior, signatures, or test expectations change; the edits are documentation-only and bring the two outliers in line with wording already used by their own source files and their sibling packages.

The namespace was analyzed for cross-package documentation drift. Every member except these two was already consistent; the corrections below are the only deviations that are both unambiguous errors and mechanically fixable without touching public behavior.

Namespace summary

  • Member packages analyzed: 13 (cdf, ctor, kurtosis, logcdf, logpdf, mean, median, mode, pdf, quantile, skewness, stdev, variance).
  • Features examined: file trees, package.json/manifest.json/directories shape, README section structure, lib/ layout, public signatures, error construction, validation prologues, JSDoc/Doxygen shape, and require dependency sets.
  • Features with a clear majority (≥75%): package layout and metadata are uniform across the namespace; the only structural variation tracks three legitimate axes — the ctor constructor class, measure functions (cdf/logcdf/logpdf/pdf/quantile) versus moment functions, and C-implemented versus JS-only packages.
  • Features excluded (no clear majority or semantic split): presence of a C implementation (11/13; pdf and ctor legitimately differ) and presence of lib/factory.js (measure-function-only). These are not treated as drift.

logcdf

The native-addon JSDoc description was carried over verbatim from the uniform distribution package, describing a distribution with minimum support and maximum support rather than the two Kumaraswamy shape parameters. It now matches the package's own main.js and all eleven C-backed sibling native.js files in the namespace (100% conformance among peers). The package.json description also dropped the space in (CDF)for; it is restored to match the other twelve members.

logpdf

Both the C header doc comment and the README C-API summary labeled the log-density as a probability distribution function, with the header additionally tagging it (CDF). Both are corrected to probability density function (PDF), matching main.js, src/main.c, and the package's own JS-API description, and consistent with logcdf.h naming its own function.

Related Issues

Does this pull request have any related issues?

None.

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.

Validation. Corrections were derived from a structural extraction (filesystem and string features across all 13 members), a semantic extraction (public signatures, error construction, validation, JSDoc/Doxygen shape, dependencies), and an adversarial drift-validation pass. Only errors that are unambiguous, mechanical, and behavior-preserving advanced.

Deliberately excluded from this PR:

  • pdf lacking a C implementation (present in 11/13 members). Adding a native addon is authored C math, not a mechanical fix, and a maintainer-reviewed attempt (feat: add C implementation for stats/base/dists/kumaraswamy/pdf #10067) was previously closed unmerged.
  • kurtosis and skewness lacking test/fixtures/julia/ (present for five of seven moment functions). Generating reference data requires a Julia runtime and would rewrite the test assertions from a type check to a tolerance comparison; both files carry an explicit // TODO: Add fixtures marker. Out of scope.
  • Any feature without a clear ≥75% majority, and any deviation reflecting a genuine semantic difference (e.g., the ctor constructor shape, measure-vs-moment signatures).

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.

This PR was prepared by Claude Code running an automated cross-package documentation-drift analysis over the stats/base/dists/kumaraswamy namespace. AI extracted structural and semantic features from every member, identified the majority documentation wording per feature, flagged deviating packages, and applied the four documentation corrections above. Each edit was verified against the package's own source files and its sibling packages before committing. A human should review before this draft is marked ready.


@stdlib-js/reviewers


Generated by Claude Code

claude added 2 commits August 5, 2026 08:27
The native.js JSDoc lead description was copied from the uniform
distribution package and described a "uniform distribution with
minimum support `a` and maximum support `b`"; replace it with the
Kumaraswamy wording used by the package's own main.js and by all 11
C-backed sibling native.js files in the namespace (100% conformance
among peers). Also add a missing space in the package.json
description ("(CDF)for" -> "(CDF) for"), matching the well-formed
descriptions of the other 12 namespace members.
The C header doc comment described the log-PDF as the "probability
distribution function (CDF)"; correct it to "probability density
function (PDF)", matching the package's own main.js, README JS-API
section, and src/main.c, and consistent with the sibling logcdf.h
naming its own function. Also fix the same "probability distribution
function" -> "probability density function" wording in the README C
API section, aligning it with the JS-API description above it.
@kgryte
kgryte marked this pull request as ready for review August 5, 2026 08:30
@kgryte
kgryte requested a review from a team August 5, 2026 08:30
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. labels Aug 5, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/kumaraswamy/logcdf $\\color{green}341/341$
$\\color{green}+100.00\\%$
$\\color{green}29/29$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}341/341$
$\\color{green}+100.00\\%$
stats/base/dists/kumaraswamy/logpdf $\\color{green}345/345$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}345/345$
$\\color{green}+100.00\\%$

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

@kgryte kgryte changed the title docs: fix incorrect distribution and function references in stats/base/dists/kumaraswamy docs: fix descriptions Aug 5, 2026
@kgryte
kgryte merged commit 075cabd into develop Aug 5, 2026
54 checks passed
@kgryte
kgryte deleted the philipp/drift-stats-base-dists-kumaraswamy-2026-08-05 branch August 5, 2026 08:39
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Aug 5, 2026
@kgryte kgryte added the Documentation Improvements, additions, or changes to documentation. label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements, additions, or changes to documentation. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants