docs: fix five docstring/code mismatches#97
Open
kgdunn wants to merge 1 commit into
Open
Conversation
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-only cleanup: five spots where the prose had drifted from what the code actually does. No behaviour changes.
Fixes
src/scorepilot/schemas.py:300-307—FitModelRequest: the old wording claimedn_componentswas used as an upper bound whenauto_componentsis set. It isn't — the auto-fit ceiling is the fixed internal_AUTO_MAX_COMPONENTS = 20inapi/models.py, and the request'sn_componentsis ignored. Rewrote the sentence to say so.src/scorepilot/core/profiling.py:142-158—suggest_transform: docstring implied "milder skew → signed power". The code actually returnsPOWERonly whenskew > 1.0and the log preconditions (positive + wide range) fail; mild skew (≤ 1.0) returnsNONE. Reworded to "a strong skew that isn't positive with a wide dynamic range suggests a signed power (root)".src/scorepilot/core/transforms.py:51—apply_transformNotes: claimedpowerdefaults toc1 = 0.5, but the signature default isc1 = 0.0, which_transform_valuesremaps to0.5internally. Clarified the note to state the parameter default is0.0and is treated as0.5(signed root) inside_transform_values.src/scorepilot/db/models.py:47-54—Modelclass docstring listed the persisted fitted arrays as "P, W, means, scales, …"._pack_paramsinapi/models.py(lines 51-59) only storesx_loadings,explained_variance,r2_cumulative. Updated the list to match.src/scorepilot/api/models.py— replaced stale "no longer in memory" / "no longer loaded" wording at four sites (get_model~L336-337,update_model~L386,model_contributions~L427,model_cross_validation~L489) with "no longer available" / "the source dataset record is missing/deleted". Datasets are persisted now, not in-memory.PATCH version bump (
0.22.0→0.22.1); lockfile intentionally not refreshed (harness rule).Test plan
uv run ruff check .uv run pyrightuv run pytestGenerated by Claude Code