Skip to content

docs(api): document context, IPX._next_exthdr_depth and the pcapng schema helpers (#2234) - #2251

Merged
JarryShaw merged 1 commit into
mainfrom
docs/2234-missing-directives
Oct 26, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/2234-missing-directives

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • docs — documentation only

Description

Closes #2234. These members had docstrings but no directive, so they rendered on no page.

  • protocol.rst: .. autoproperty:: context on the Protocol autoclass, and context in the ProtocolBase py:property group.
  • ipx.rst: .. automethod:: _next_exthdr_depth, the fix(ipx): the next layer is chosen by IPX Packet Type, looked up as an IP protocol number #2169 override, which overrides a hook internet.rst documents.
  • pcapng.rst: PACKET_FLAGS (autodata), FlagsField and held_body.
  • Left undocumented: _held_octets and _secrets_cut. No rendered text names them, so they are recipe, not contract.
  • Follow-up: linking context in PCAPNG's versionchanged note touches pcapng.py, so it waits for fix(ethernet,pcapng): reject a non-string MAC or EUI address (#2222) #2232.
  • Test: tests/project/test_docs_missing_directives_2234_unit.py checks each directive is in its block. It gives 6 failed on origin/main.
  • Docs build: a full sphinx-build -b html in the pinned docs venv ran with no Sphinx warnings, and all five anchors render.
  • Tests run: test_docs_* and test_documentation_claims with Sphinx give 156 passed.

…hema helpers (#2234)

Problem: ProtocolBase.context, the IPX._next_exthdr_depth override of a
documented hook, and held_body, FlagsField and PACKET_FLAGS in the pcapng
schema module had docstrings but no API entry.

Fix: list context on the Protocol autoclass and in the ProtocolBase
property group, add _next_exthdr_depth to the IPX autoclass, and add the
three pcapng entries beside their siblings. _held_octets and _secrets_cut
stay undocumented: no rendered text names them, so they are recipe.

Test: tests/project/test_docs_missing_directives_2234_unit.py pins each
entry and the object it names; it fails on origin/main.
@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 26, 2026
@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Review: GOOD TO GO at 03db5c761 (Sonnet).

  • Placement: every name exists and sits in the right place. context follows schema in Protocol and is in the ProtocolBase group. IPX._next_exthdr_depth is in IPX.__dict__, overriding the hook internet.rst documents. PACKET_FLAGS, held_body and FlagsField follow source order.
  • Fail-without-fix: 6 failed on origin/main, and 8 passed on the head.
  • Left out: _held_octets and _secrets_cut appear only in code, so leaving them undocumented fits the house rule.

@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 26, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.56% (unit tier, Python 3.15, 03db5c761, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19599 881 2618 867 92.11%
pcapkit/corekit 2589 74 816 37 96.51%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 2994 23 1038 25 98.81%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17433 218 4584 185 98.15%
pcapkit/toolkit 869 36 298 10 95.20%
pcapkit/utilities 504 7 146 5 98.15%
pcapkit/vendor 4432 1988 1018 167 51.87%

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

@JarryShaw

Copy link
Copy Markdown
Owner Author

Ready to merge at 03db5c761. Closes #2234.

  • Review: Sonnet GOOD TO GO, first round.
  • CI: all checks complete, Required checks passed SUCCESS, 0 failed.
  • KTLO: 12 legs, no warnings.
  • Ordering: merged into main and run. project leg: 2361 tests, 0 failures.
  • Conflicts: none against the current main.
  • Follow-up: linking context in PCAPNG's versionchanged note touches pcapng.py, so it waits for fix(ethernet,pcapng): reject a non-string MAC or EUI address (#2222) #2232.

@JarryShaw
JarryShaw merged commit 0bf2c53 into main Oct 26, 2026
66 checks passed
@JarryShaw
JarryShaw deleted the docs/2234-missing-directives branch October 26, 2026 14:54
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 26, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 26, 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.

docs(api): context, IPX._next_exthdr_depth and pcapng schema helpers have no directive

1 participant