Skip to content

Fix get_grid and cross_validation docstring inconsistencies#93

Open
kgdunn wants to merge 3 commits into
mainfrom
claude/ecstatic-johnson-tdzze9
Open

Fix get_grid and cross_validation docstring inconsistencies#93
kgdunn wants to merge 3 commits into
mainfrom
claude/ecstatic-johnson-tdzze9

Conversation

@kgdunn

@kgdunn kgdunn commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Two small, scoped docstring fixes. No behaviour change in either case.

Inconsistencies fixed

  • src/scorepilot/api/exploration.py:114get_grid() docstring said "Return a windowed block of cells for the grid, raw or autoscaled.", but the form validator at :108 accepts only "raw" or "scaled" (regex ^(raw|scaled)$). Changed "autoscaled" -> "scaled" in the docstring; the regex and validator are untouched.

  • src/scorepilot/core/cross_validation.py:34-38 (module docstring) — claimed that the selectors re-fit the centring/scaling inside each training fold "(scale_inside_folds=True)", as if ScorePilot passed the kwarg. The actual calls at :274-283 (PCA) and :321-330 (PLS) never pass scale_inside_folds. Verified against process_improve (src/process_improve/multivariate/_pca.py:51 and _pls.py:927): scale_inside_folds: bool = True is the upstream default, so the observed behaviour was correct but the docstring was misleading. Rewrote the sentence as "By default the selectors re-fit the centring/scaling inside each training fold (process_improve's scale_inside_folds=True default, which ScorePilot does not override)..." so the docstring honestly describes what actually happens.

Other notes

  • Version bumped to 0.22.1 in pyproject.toml (PATCH — docs-only).
  • uv.lock left uncommitted per cross-repo Claude Code rules.
  • uv run ruff check / uv run ruff format clean on touched files. pyright skipped because changes are docstrings + version only.

Generated by Claude Code

claude added 3 commits June 19, 2026 07:13
The form validator at src/scorepilot/api/exploration.py:108 accepts only
"raw" or "scaled" (regex ^(raw|scaled)$), so the docstring's "autoscaled"
was misleading. Docstring only; no behaviour change.
…m default

The selectors are called without an explicit scale_inside_folds kwarg
(src/scorepilot/core/cross_validation.py:274-283 for PCA,
:321-330 for PLS), so ScorePilot relies on process_improve's default
(scale_inside_folds=True, confirmed in process_improve's _pca.py:51 and
_pls.py:927). Rewrite the docstring to honestly describe that we accept
the default rather than passing the kwarg. No behaviour change.
Docs-only fixes to get_grid and cross_validation module docstrings.
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