docs: rewrite the README and fix the crashing quickstart - #12
Merged
Merged
Conversation
Laya-style layout: centered banner (light and dark, drawn with entroscope's own rolling spectral entropy), badges including the docs site, installation with extras, a quickstart whose comments show real outputs, a validation table, sections on rolling entropy, two-signal measures and ML/polars, a guide to choosing a measure, and an "Honest limits" section. The quickstart in the README and on the docs site called rolling with window=20 on an 8-point series and raised ValueError; the other README examples used undefined variables or a missing CSV. Every example now runs, and tests/test_readme.py executes them in CI and checks the 14 numbers they print. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Use re.DOTALL instead of the re.S alias (FURB167), and mark the deliberate exec of the docs' example code with a scoped noqa (S102). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Rewrites the README in the style of laya and fixes a bug: the first example anyone ran crashed.
Bug fixed
The Quickstart (README and
docs/quickstart.md) ranshannon.rolling(s, window=20)on an 8-point series and raisedValueError: window (20) is larger than series length (8). The other three README examples used undefined variables (s,windows,labels) or amatcha_trends.csvthat doesn't exist.New layout
docs/assets/make_banner.py, which is adapted from the original banner design. The badges now include the docs site.# ->comments. It ends on the case for nine measures: Shannon entropy can't tell noise from the cycle (3.08 vs 3.23 bits), while spectral entropy can (6.05 vs 0.88).rollingspeed (sample entropy ~3 s per 3,000 points), sample entropy's finite ceiling, the spectral definition difference, and transfer entropy's data needs.Guarding it
tests/test_readme.pyruns every Python block inREADME.mdanddocs/quickstart.mdin order, and checks each numeric# -> valueclaim (14 in total) against what the line returns.Notes
raw.githubusercontent.com/.../master/...URLs so they also render on PyPI. They'll show as broken in this PR's preview until it merges.Test plan
pytest: 250 passed, coverage 98.7% (includes the 2 new README tests)mkdocs build --strictruff check/ruff format --checkwith local ruff 0.15.15. CI runs the pinned 0.16.7 (pypi.org was unreachable from my machine).🤖 Generated with Claude Code