Skip to content

docs: tighten demo.rst and the docs landing page (#719) - #954

Merged
JarryShaw merged 1 commit into
mainfrom
docs/719-slice2-root-docs
Oct 1, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/719-slice2-root-docs

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

  • Searched for similar pull requests
  • Followed the coding style (make pylint, make mypy, make isort)
  • make test passes, and a test case covers the change
  • Added a changelog entry under docs/source/changelog/ and regenerated CHANGELOG.md, if the change is user-visible — N/A — documentation prose only, no library behaviour change

What is the purpose of your pull request?

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • chore — anything else

Description of your pull request and other information

Second slice of #719, taking the two user-facing root pages #953 did not touch: docs/source/demo.rst and docs/source/index.rst. +29/−32.

One real documentation defect, at six sites. All three CLI transcripts in demo.rst showed 🚨Loading and 🍺Report with no space. The space is real: pcapkit/__main__.py:135,143 emojizes ":police_car_light: Loading file ..." with the space inside the f-string, and emoji.emojize substitutes the shortcode in place, so the output is 🚨 Loading file .... Confirmed by running all three invocations against examples/captures/in.pcap and reading the raw bytes.

One claim restated against the table it cites. Engine Comparison said pcapkit's ~0.2 ms/packet was "not enough comparing to other popular extraction engines", which the Test Results table does not support — pcapkit at 0.2342 ms is slower than pypcapfile, dpkt, pypcap, pcap_ct and scapy, and roughly eighty times faster than pyshark at 18.8158. It now says slower than most of the engines below.

Timed context removed: "introduced alternative extraction engines" and "By now pcapkit supports …", both of which date prose describing the present. Three typos went with it — foundamental, the gi repository, and a missing relative pronoun in the jspcapy note.

Untouched, deliberately: every toctree entry, the .. deprecated:: 0.8.0 directive, the bpc-poseur / pypcap-versus-pcap-ct / all-extra notes, and the preflight-check rationale. Those are design decisions a reader would otherwise undo, which #719 explicitly protects. docs/source/changelog.rst is excluded — its treatment is still an open question.

Verification. All three demo.rst Python examples and all three CLI examples re-run against the real capture; extract()'s keywords checked against pcapkit/interface/core.py:73-86; the engine literals against pcapkit/foundation/extraction.py:74-75; the eight module-structure parts, the pcapkit-cli script name and the pcap-ct/libpcap pins against pyproject.toml. tests/project/test_conventions_doc_claims.py plus its two siblings: 44 tests, 1 skipped, 0 failed, re-derived under plain unittest as well as pytest.

Not verified: the Test Results benchmark figures themselves and the bpc-poseur upstream line reference, both out of reach without installing engines or that package. Neither was edited.

- demo.rst: cut hedging from the Basic Samples lead-in and fix
  "has two different access" in the CLI section.
- demo.rst: correct the CLI transcripts at six sites. All three
  examples showed "🚨Loading"/"🍺Report" with no space; the real
  output has one, since pcapkit/__main__.py:135,143 emojizes
  ":police_car_light: Loading file ..." with the space inside the
  f-string.
- index.rst: tighten the About comparison, the Engine Comparison
  opening and the pypcap/pcap_ct exclusivity note; drop "introduced"
  and "By now", which date prose that describes the present.
- index.rst: fix "foundamental", "the gi repository", and a missing
  relative pronoun in the jspcapy note.
- index.rst: restate the speed claim against the table it cites --
  pcapkit's own engine is slower than five of the six third-party
  engines and faster than pyshark, which "not enough comparing to
  other popular extraction engines" did not say.

Every toctree entry, every .. deprecated:: directive and every
design-rationale note is untouched. All three demo.rst examples and
all three CLI invocations were re-run against examples/captures/in.pcap.
tests/project/test_conventions_doc_claims.py and its two siblings:
44 tests, 1 skipped, 0 failed.
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 1, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 8a7b5625f — fable cross-review, read-only and on a different model from the author.

It verified the emoji fix the hard way rather than by reading the source: ran all three CLI invocations and hexdumped the output, getting f0 9f 9a a8 20 4c 6f 61 64 69 6e 67 — 🚨, 0x20, Loading. Then it went further than the fix and diffed all 24 transcript lines against the real stdout of the three runs, byte for byte, empty diff. That is the check I had not made: correcting one line of a transcript while a stale line sits beside it would have been worse than leaving both.

On the speed claim it reached the same conclusion independently — five third-party engines faster than pcapkit's 0.2342 ms, pyshark ~80× slower — and made the sharper point that the old wording implied pcapkit trailed all of them, which the pyshark row contradicts. So the new sentence is a correction, not just a shorter one.

For the removals it grepped every cut line for toctree, :ref:, :doc:, .. version*, .. deprecated::, anchors and substitution definitions: zero matches. The one :mod:pcap`` reference that went is covered by the untouched paragraph above it, which is what the reworded back-reference now points at.

Two nits accepted but not acted on, and I would rather say so than quietly fold them in:

  • "can be reached two ways" wants "in two ways". Real, but a new head invalidates this verdict and restarts 61 CI legs for one preposition.
  • the jspcapy note's trailing clause still attaches ambiguously to pcapkit. Pre-existing, and not worsened here.

One scope difference worth naming rather than calling an error: the body says 44 tests over three files, the review got 43 over two. Both are right at their own scope — it did not count test_documentation_claims.py, which reads neither file.

Unverified by either of us: the Test Results benchmark figures and the engine-availability matrix. Neither is edited by this change.

Labelled review: good-to-go. Not calling it ready to merge until CI finishes — and it is unpublished-equivalent in the sense that matters here: yours to merge, not mine.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 1, 2026
@JarryShaw
JarryShaw merged commit 5204334 into main Oct 1, 2026
63 checks passed
@JarryShaw
JarryShaw deleted the docs/719-slice2-root-docs branch October 1, 2026 03:46
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 1, 2026
@JarryShaw JarryShaw added this to the 1.5 milestone Oct 6, 2026
@JarryShaw JarryShaw moved this to Done in PyPCAPKit Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Pull requests that change documentation only (docs: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant