Docstring/code consistency audit for computational modules - #480
Open
kgdunn wants to merge 3 commits into
Open
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audit of user-facing computational functions across
multivariate/,experiments/,monitoring/,regression/,univariate/, andbatch/for docstring/code inconsistencies. Two real docstring bugsfound and fixed; no code behaviour changes.
PCA.select_n_components(src/process_improve/multivariate/_pca.py):the
return_consensuskeyword argument was in the signature butmissing 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 nowdocumented.
PLS.select_n_components(src/process_improve/multivariate/_pls.py):the
selection_modebullet in the Returns section had a truncatedsentence: "or
Nonewhenselection_distributionis." Completed to"... is
None."Version bumped to
1.62.3(PATCH: docstring-only fix);CITATION.cffand
CHANGELOG.mdupdated 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 isneither 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 .passesuv run pyteststill passes (docstring-only changes)Checklist
pyproject.toml(PATCH for docstring fixes)ruff check .passesCHANGELOG.mdupdated