Skip to content

docs(protocols): third whole-repo pass over application, misc and the protocol base (#1103) - #1835

Merged
JarryShaw merged 2 commits into
mainfrom
docs/1103c-application
Oct 16, 2026
Merged

JarryShaw merged 2 commits into
mainfrom
docs/1103c-application

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • 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
  • release — bumps the version or rolls up a distribution
  • chore — anything else

Counts:

  • Drop counted numbers from the NGAP, HTTP, HTTP/2, PCAP, PCAP-NG, schema
    base and protocol base docstrings and pages; a spec total used as a
    coverage claim becomes count-free, and measurements stay.

Rendered output:

  • The OSPF and DSB selectors' Returns is one paragraph, not a list behind an
    empty paragraph, and the DSB one states what the selector returns.
  • NGAP's conversion table keeps its last row whole, and the class entry sits
    above the narrative sections.
  • Document the root data model and PCAPNG.packet, reattach doc comments a
    NOTE had cut off, and keep the stdlib enum hook off the enum pages.
  • Fix dead or under-qualified cross-references, split napoleon types in the
    Protocol and Raw constructors, and doc-comment types that rendered raw
    aliases.

Accuracy and wording:

  • RARP and ARP share a frame format, not an EtherType; readers return parsed
    data; index raises as documented; grammar and spelling fixes; no
    timed wording in the TLSKeyLabel removal note.

Directives:

  • versionchanged on OSPF and HTTP/2 make() for a parameter inserted before
    existing ones; the OSPF and RARP removal notes name the package-level
    names that went.

Non-prose check: ast.dump is unchanged on every .py file once docstrings are blanked. The OSPF and HTTP/2 make() directives are checked against v1.4.1: both signatures move an existing positional parameter. Narrow test runs are green.

Refs #1103

… protocol base (#1103)

Counts:
- Drop counted numbers from the NGAP, HTTP, HTTP/2, PCAP, PCAP-NG, schema
  base and protocol base docstrings and pages; a spec total used as a
  coverage claim becomes count-free, and measurements stay.

Rendered output:
- The OSPF and DSB selectors' Returns is one paragraph, not a list behind an
  empty paragraph, and the DSB one states what the selector returns.
- NGAP's conversion table keeps its last row whole, and the class entry sits
  above the narrative sections.
- Document the root data model and PCAPNG.packet, reattach doc comments a
  NOTE had cut off, and keep the stdlib enum hook off the enum pages.
- Fix dead or under-qualified cross-references, split napoleon types in the
  Protocol and Raw constructors, and doc-comment types that rendered raw
  aliases.

Accuracy and wording:
- RARP and ARP share a frame format, not an EtherType; readers return parsed
  data; __index__ raises as documented; grammar and spelling fixes; no
  timed wording in the TLSKeyLabel removal note.

Directives:
- versionchanged on OSPF and HTTP/2 make() for a parameter inserted before
  existing ones; the OSPF and RARP removal notes name the package-level
  names that went.

Refs #1103
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 16, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 16, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: NEEDS CHANGES at db9458d6b. A Sonnet cross-review (author: Opus) confirmed:

  • the OSPF and HTTP/2 make() directives, by AST against v1.4.1;
  • the OSPF/RARP removal names, by importing them at the head;
  • that ARP (0x0806) and RARP (0x8035) differ in EtherType;
  • every "Parsed" return, the __index__ Raises, the NGAP table (docutils), the DSB selector's runtime behaviour, and the cross-reference targets.

Two blocking defects, both re-checked:

  • protocol.py:1247-1248 says packet is an out-of-band keyword "consumed here". __init__ pops _layer, _protocol and __context__, but only reads packet (kwargs.get('packet')), which is forwarded.
  • The :exclude-members: +_generate_next_value_ lines in httpv2.rst and pcapng.rst have no effect. The hook still renders in a clean build of this branch, because napoleon's skip handler overrides exclude-members.

A worker is adding a fix commit to this branch.

@JarryShaw JarryShaw added review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 16, 2026
- protocol: the out-of-band Note names only the keywords __init__ pops;
  packet is read and forwarded, not consumed
- conf: skip the enum machinery's _generate_next_value_ ahead of napoleon,
  which re-included it; drop the per-page exclude-members that could not
- tests: pin the hook, its priority, and _missing_ staying documented
- ospf: the removal note also names OSPF_CrytographicAuthentication
- http, ngap: a full sentence for the Note lead-in; name the cache states
- pcapng: "Drops count", the PCAP-NG field's name

Refs #1103
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet and removed review: needs-changes Cross-review at the current head says changes are required; see the verdict comment labels Oct 16, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at e26048bcf. A Sonnet re-review of the fix commit confirmed:

  • the ProtocolBase.__init__ note: _layer, _protocol and __context__ are popped, and packet is only read;
  • the hook mechanism in Sphinx 9.1.0: emit_firstresult takes the first non-None result in ascending priority, autodoc applies exclude-members before the event, and napoleon includes the hook. Across every member of every pcapkit class (about 223k decisions), _generate_next_value_ is the only decision that changes, and it changes only at priority 400;
  • that all 21 hook entries in the previous build now skip, while _missing_ stays documented on every enum;
  • that the new test passes (7), fails when the connect line is removed or the priority is raised to 500, and its tree was restored clean;
  • the OSPF, NGAP and "Drops count" polish against v1.4.1 and the code.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 90.05% (unit tier, Python 3.15, e26048bcf, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 2 20 2 96.77%
pcapkit/const 19595 881 2618 867 92.11%
pcapkit/corekit 2462 69 780 35 96.55%
pcapkit/dumpkit 276 3 100 3 98.40%
pcapkit/foundation 2915 164 1016 34 93.59%
pcapkit/interface 138 7 52 5 93.68%
pcapkit/protocols 17408 224 4580 189 98.10%
pcapkit/toolkit 872 177 298 8 77.18%
pcapkit/utilities 512 2 158 4 99.10%
pcapkit/vendor 4407 2342 1010 157 43.27%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw
JarryShaw merged commit e584be1 into main Oct 16, 2026
56 checks passed
@JarryShaw
JarryShaw deleted the docs/1103c-application branch October 16, 2026 23:10
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 16, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 16, 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