Skip to content

docs: fix suggest_transform / apply_transform / Settings docstrings - #104

Open
kgdunn wants to merge 1 commit into
mainfrom
claude/ecstatic-johnson-o6vluf
Open

docs: fix suggest_transform / apply_transform / Settings docstrings#104
kgdunn wants to merge 1 commit into
mainfrom
claude/ecstatic-johnson-o6vluf

Conversation

@kgdunn

@kgdunn kgdunn commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Three surgical docstring fixes where the prose had drifted from the code.

1. src/scorepilot/core/profiling.pysuggest_transform (line 142)

The docstring described a "milder skew" branch, but the code has no such branch: both the LOG and POWER paths require strongly_skewed = summary.skewness > 1.0. The POWER branch is entered when a strongly-skewed variable fails either the positivity or the wide-range check, not when the skew is milder.

Rewritten to describe the actual branching, including the numeric thresholds (skewness > 1, min_max_ratio > 20) that the code applies.

2. src/scorepilot/core/transforms.pyapply_transform (line 17)

The Notes bullet for power claimed the default was c1 = 0.5 giving a signed root, but the signature default is c1: float = 0.0. The signed-root default actually comes from _transform_values, which special-cases 0.0 → 0.5:

exponent = c1 if c1 != 0.0 else 0.5
return np.sign(x) * np.abs(x) ** exponent

Rewrote the bullet to describe that behaviour explicitly and to note that c2 is ignored by this branch.

3. src/scorepilot/config.pySettings class (line 15)

The Attributes block documented database_url, host, port, open_browser, and the four agent settings, but omitted the hardening knobs added later. Added auth_username / auth_password, docs_enabled, max_upload_mb, and max_cells with descriptions matching the inline comments already on the fields.

Version

Bumped pyproject.toml from 0.22.00.22.1 (PATCH — docs-only) and refreshed uv.lock per the repo's CLAUDE.md.


Generated by Claude Code

- suggest_transform: describe the actual branching (both branches require
  skewness > 1; LOG needs positivity + wide range, POWER catches the rest)
  instead of the incorrect 'milder skew' wording.
- apply_transform: describe the real POWER default. The signature default is
  c1=0.0 and _transform_values special-cases 0.0 -> 0.5, so the previous
  'default c1 = 0.5' description was wrong. Also note c2 is unused.
- Settings: extend the Attributes block to document auth_username /
  auth_password, docs_enabled, max_upload_mb, max_cells so the class docstring
  matches the fields the class actually declares.

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