Make the quickstart installable, and split the README into docs/ - #4
Merged
Conversation
An outside developer reading 0.1.3 from PyPI reported that the quickstart imports `requests` while `pip install nodemaven` does not provide it, so the first thing anyone copying the README hits is ModuleNotFoundError. Reproduced 2026-09-10 in a clean venv holding only nodemaven==0.1.3. Fixed with an optional extra rather than a dependency: `requests` is imported nowhere in src/ and stays that way, because check.connect() writes its own CONNECT precisely so no HTTP library is needed to read a status line. An undeclared extra is only a pip warning, so a test reads pyproject.toml and asserts every extra the documentation names is actually declared. The README was 984 lines and over half of it was reference and measurement, so a reader arriving from PyPI met the API reference before the second example. It is now README.md plus docs/api-reference.md, docs/validation.md and docs/observed-behavior.md. Nothing was deleted; the measurements moved at full length. Every outbound link is absolute at blob/main, because PyPI resolves nothing relative and a relative link 404s on the package page. A split is the moment a by-name scan silently stops testing anything, and every check in test_readme.py scanned README.md by name. The corpus is now named rather than globbed, per-file checks say which file they mean, and every scan asserts it found something first. Each new test was verified by breaking what it guards: renaming the extra, deleting the install line, making a link relative, deleting a docs/ link, and renaming a ```python fence to ```py. Also corrects api.py's module docstring, which claimed the six write endpoints had never been called and the page-number base was unknown. Both were settled 2026-09-09 and the findings are in the method docstrings of the same file; it shipped wrong in 0.1.3. Corrected in place with the note, because a module docstring reads as authoritative and was believed over the code it summarises. No version bump: this is unreleased, and PyPI still serves 0.1.3.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Why
An outside developer reading 0.1.3 from PyPI reported that the quickstart imports
requestswhilepip install nodemavendoes not provide it. Reproduced 2026-09-10 in a clean venv holding onlynodemaven==0.1.3: the first thing anyone copying the README hits isModuleNotFoundError.What
nodemaven[requests], an extra and not a dependency.requestsis imported nowhere insrc/and stays that way -check.connect()writes its own CONNECT precisely so that no HTTP library is needed to read a status line, and an HTTP library discards the status line, the reason phrase and the headers that are the diagnosis on this gateway.The near miss worth knowing: an undeclared extra is not an error. pip answers
nodemaven[nosuchthing]with a warning and installs without it, so the documented line would have gone on failing while the README looked fixed. A test now readspyproject.tomland asserts every extra the documentation names is declared.The README was split. 984 lines, over half reference and measurement, so a reader arriving from PyPI met the API reference before the second example. Now
README.md(499 lines) plusdocs/api-reference.md,docs/validation.md,docs/observed-behavior.md. Nothing was deleted - the measurements moved at full length, because summarising a measurement turns it into an opinion.Every outbound link is absolute at
blob/main: PyPI resolves nothing relative, so](docs/validation.md)404s on the package page.api.py's module docstring was wrong and shipped that way in 0.1.3. Its "What is still not measured" block claimed the six write endpoints had never been called and the page-number base was unknown. Both were settled 2026-09-09 and the findings sit in the method docstrings of the same file. Corrected in place with the note: a module docstring reads as authoritative and was believed over the code it summarises.On the tests
A split is the moment a by-name scan silently stops testing anything, and every check in
test_readme.pyscannedREADME.mdby name. So the corpus is named rather than globbed - a newdocs/file fails the suite until somebody decides what checks it is owed - per-file checks say which file they mean, and every scan asserts it found something first.Each new test was verified by breaking what it guards, five mutations and five failures: rename the extra, delete the install line, make a link relative, delete a
docs/link, rename a```pythonfence to```py.Two of those reported MISSED on the first attempt and the mutations were wrong, not the tests -
replace(..., 1)against four links and two imports left the originals in place. A mutation that does not fully remove the thing clears a test it never exercised.The link tests also failed first on
](LICENSE)and](docs/validation.md)inside the HTML comments explaining that those spellings are forbidden - the test caught the note documenting the rule, not a breach of it. Both now read the comment-strippedprosefixture. The second one was worse and silent: a comment namingdocs/validation.mdsatisfiesname in text, so it would have gone on passing after the real link was deleted.Not a release
No version bump. PyPI still serves 0.1.3 and
__version__here is also 0.1.3, which is recorded under## Unreleasedin the CHANGELOG. The reported bug is not fixed for anyone arriving from PyPI until a release - the long description and the extra both travel with a release and never with a push.Test plan
pytest -q- 355 passed, 3 skippedpython -m build+twine check- both artifacts PASSEDProvides-Extra: requestsandRequires-Dist: requests>=2.25; extra == "requests"ci-okon five interpretersSummary by cubic
Fixes the quickstart failing with
ModuleNotFoundErrorby makingrequestsan optional extra (nodemaven[requests]) rather than a dependency, and splits the 984-line README intodocs/so PyPI readers see examples before the reference. Also correctsapi.py's module docstring, which shipped stale claims in 0.1.3.requestsis not imported anywhere insrc/; the package writes its own CONNECT.blob/mainURLs so they work on PyPI.test_readme.pynow coversdocs/and asserts every documented extra is declared inpyproject.toml.Written for commit c9261e1. Summary will update on new commits.