Skip to content

Docstring/code consistency audit for computational modules - #480

Open
kgdunn wants to merge 3 commits into
mainfrom
claude/determined-fermat-w8lfrg
Open

Docstring/code consistency audit for computational modules#480
kgdunn wants to merge 3 commits into
mainfrom
claude/determined-fermat-w8lfrg

Conversation

@kgdunn

@kgdunn kgdunn commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

Audit of user-facing computational functions across multivariate/,
experiments/, monitoring/, regression/, univariate/, and
batch/ for docstring/code inconsistencies. Two real docstring bugs
found and fixed; no code behaviour changes.

  • PCA.select_n_components (src/process_improve/multivariate/_pca.py):
    the return_consensus keyword argument was in the signature but
    missing from the Parameters section, and the four extra Bunch keys
    it attaches (minka_n_components, parallel_analysis_n_components,
    consensus, consensus_counts) were not listed in Returns. Both now
    documented.

  • PLS.select_n_components (src/process_improve/multivariate/_pls.py):
    the selection_mode bullet in the Returns section had a truncated
    sentence: "or None when selection_distribution is." Completed to
    "... is None."

Version bumped to 1.62.3 (PATCH: docstring-only fix); CITATION.cff
and CHANGELOG.md updated to match.

Flagged for human review, not changed

  • analyze_experiment (src/process_improve/experiments/analysis.py:149)
    has a coding: str = "coded" parameter in its signature that is
    neither used in the function body nor documented in the docstring.
    Left alone since the fix is a code change, not a docstring change.
    Either the parameter should be dropped or the intended behaviour
    wired up and documented.

Test plan

  • uv run ruff check . passes
  • uv run pytest still passes (docstring-only changes)

Checklist

  • Version bumped in pyproject.toml (PATCH for docstring fixes)
  • Tests added or updated where relevant (n/a - docstring-only)
  • ruff check . passes
  • CHANGELOG.md updated

Auditing computational/user-facing docstrings across multivariate,
experiments, monitoring, regression, univariate, and batch modules for
real inconsistencies (wrong params, wrong return shape, stale examples,
missing/removed exception mentions, etc.).
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

claude added 2 commits July 31, 2026 07:18
- PCA.select_n_components: document the ``return_consensus`` parameter
  (used but missing from Parameters) and the four extra Bunch keys it
  attaches to the return value (``minka_n_components``,
  ``parallel_analysis_n_components``, ``consensus``, ``consensus_counts``).

- PLS.select_n_components: complete the ``selection_mode`` bullet in the
  Returns section; the sentence ended abruptly ("or ``None`` when
  ``selection_distribution`` is.") -> "... is ``None``.".

No code behaviour changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TikjthFYE6JPHA38JkXzub
PATCH bump: docstring-only fixes to PCA.select_n_components and
PLS.select_n_components (see CHANGELOG). Sync CITATION.cff to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TikjthFYE6JPHA38JkXzub
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