Fix docstring drift surfaced by audit#437
Open
kgdunn wants to merge 1 commit into
Open
Conversation
Docstring/comment-only changes across multiple modules; no runtime behaviour changes: - MBPCA class docstring (_mbpca.py): drop phantom super_vip_ entry from fitted-attributes list; fit() only populates block_vip_. - TPLS class docstring example (_tpls.py): wrap all_data dict in DataFrameDict(all_data) before estimator.fit(...) to match the runtime isinstance check. - TPLS.diagnose docstring example (_tpls.py): change estimator.predict(new_data) to estimator.diagnose(new_data) since predict is deprecated. - TPLS.help() text (_tpls.py): point users at tpls.diagnose(X_new) not the deprecated tpls.predict, and correct spe_limit call shape from .spe_limit["Y"]() to .spe_limit["Y"][group]() to match the nested dict-of-dicts populated by fit(). - variance_decomposition docstring (univariate/metrics.py): update the example to call variance_decomposition(...) instead of the old name within_between_standard_deviation(...). - ttest_paired_from_df docstring (univariate/metrics.py): Output bullets 6-9 said "B minus A"; the code computes A - B, so update the prose to "A minus B" to match. - robust_regression returns block (regression/_robust_regression.py): remove t_value entry - out["t_value"] is only ever initialised to np.nan. - analyze_experiment docstring (experiments/analysis.py): remove the coding parameter from the Parameters block; it is declared but never referenced in the body (signature untouched). - PLS.cross_validate docstring (multivariate/_pls.py): add the missing sample_weight parameter to the Parameters block, matching the style of the other parameters. CITATION.cff version + date-released bumped to match, CHANGELOG.md gains a 1.51.1 section under Unreleased.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Docstring/comment-only changes across multiple modules; no runtime behaviour changes, no signature changes.
src/process_improve/multivariate/_mbpca.pyMBPCAclass docstring: drop phantomsuper_vip_entry from the fitted-attributes list;fit()only populatesblock_vip_.src/process_improve/multivariate/_tpls.pyTPLSclass docstring example: wrapall_datadict inDataFrameDict(all_data)beforeestimator.fit(...)sinceTPLS.fit()raisesTypeErroron a bare dict.src/process_improve/univariate/metrics.pyvariance_decompositiondocstring: example now calls the current namevariance_decomposition(...)instead of the pre-renamewithin_between_standard_deviation(...).src/process_improve/multivariate/_tpls.py(~line 837)TPLS.help()text: point attpls.diagnose(X_new)instead of the deprecatedtpls.predict(X_new).src/process_improve/multivariate/_tpls.py(~line 850)TPLS.help()text: correct SPE-limit call shape from.spe_limit["Y"]()to.spe_limit["Y"][group]()to match the nested dict-of-dicts populated infit().src/process_improve/multivariate/_tpls.py(~line 558)TPLS.diagnosedocstring example: replaceestimator.predict(new_data)withestimator.diagnose(new_data).src/process_improve/regression/_robust_regression.py(~line 133)robust_regressionReturns: drop thet_valueentry;out["t_value"]is only ever initialised tonp.nan.src/process_improve/experiments/analysis.py(~line 176)analyze_experimentParameters block: remove thecodingparameter entry (declared in the signature but never referenced in the body). Signature untouched.src/process_improve/multivariate/_pls.py(~line 1799)PLS.cross_validateParameters block: add previously-undocumentedsample_weightparameter, matching the style of the other parameters.src/process_improve/univariate/metrics.py(~line 396-399)ttest_paired_from_dfOutput bullets 6-9: prose said "B minus A" but the code computesA - B(differences = sample_A - sample_B.to_numpy()); prose now reads "A minus B" to match.Version bumped to
1.51.1(PATCH; docstrings/comments only).CITATION.cffsynced (version: 1.51.1,date-released: "2026-07-03").CHANGELOG.mdgains a## [1.51.1] - 2026-07-03section under## [Unreleased], and the link-reference footer is updated.Test plan
uv run ruff check src/ tests/passes.uv run ruff format --checkon the touched files shows only pre-existing drift (unchanged frommain); no new format issues introduced.uv.lockis intentionally not touched (Claude Code session rule).Generated by Claude Code