Skip to content

docs: add example - #16158

Merged
kgryte merged 1 commit into
developfrom
claude/cool-johnson-bjkxek
Oct 14, 2026
Merged

kgryte merged 1 commit into
developfrom
claude/cool-johnson-bjkxek

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • adds the missing @example block to the main function JSDoc in @stdlib/stats/lowess, bringing it in line with every other package in the @stdlib/stats namespace.

@stdlib/stats/lowess

lib/main.js documents parameters, throws, and return value but has no @example. 56 of the 57 non-namespace @stdlib/stats packages (98%) have one. The recent sweep that added examples to anova1, binomial-test, ttest2, and ztest2 skipped lowess. The example uses the first ten observations from the README data, calls main (inside this file, lowess refers to the internal ./lowess.js routine), and uses the // returns {...} annotation used by ttest2 and anova1.

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.

Namespace summary. 57 non-namespace members of @stdlib/stats were checked. The namespace aggregates array, base, incr, iter, and strided were excluded. A feature counts as a clear majority when at least 75% (≥43) of packages share it.

  • Clear majority: file tree, package.json key set, test/benchmark/example file names, README <section> set, returnKind, JSDoc @returns/@param descriptions, and JSDoc @example presence.
  • No clear majority, so excluded: README ## Notes (70%), error construction (65% have no throws), public signature shape (39%), validation prologue, and @throws tag sequence (51%).

Validation. Structural features were extracted from the filesystem. Semantic features were extracted by a separate agent for each package, and each candidate fix was then checked by reviewers for semantic intent and for whether anything relies on the current behavior. Excluded:

  • the missing benchmark/ in stats/kde2d, which is already proposed in bench: add benchmarks to stats/kde2d #16127;
  • placeholder-free error messages written as plain strings in hypothesis-test packages. That matches the stdlib-wide convention (no format() call without placeholders exists in the repo), so it is not drift.

The change is comment-only and changes no behavior, signatures, or tests.

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 written primarily by Claude Code, as part of an automated check for API drift across packages in a namespace.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01QwjLXc44QKrGGim1D59r9Q


Generated by Claude Code

Added an `@example` block to the main function JSDoc in
`lib/main.js` (present in 56 of 57, or 98%, of `@stdlib/stats`
siblings). `lowess` was omitted from the recent sweep which added
examples to `anova1`, `binomial-test`, `ttest2`, and `ztest2`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QwjLXc44QKrGGim1D59r9Q
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Oct 14, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/lowess $\\color{red}615/627$
$\\color{green}+98.09\\%$
$\\color{red}68/75$
$\\color{green}+90.67\\%$
$\\color{green}6/6$
$\\color{green}+100.00\\%$
$\\color{red}615/627$
$\\color{green}+98.09\\%$

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

@kgryte kgryte added the Documentation Improvements, additions, or changes to documentation. label Oct 14, 2026
@kgryte
kgryte marked this pull request as ready for review October 14, 2026 20:47
@kgryte
kgryte requested a review from a team October 14, 2026 20:47
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. labels Oct 14, 2026
@kgryte kgryte changed the title docs: add missing JSDoc example to stats/lowess docs: add example Oct 14, 2026
@kgryte
kgryte merged commit 9355c78 into develop Oct 14, 2026
82 checks passed
@kgryte
kgryte deleted the claude/cool-johnson-bjkxek branch October 14, 2026 20:48
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Oct 14, 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