Skip to content

docs(protocols): seventh whole-repo pass over application, misc and the protocol bases (#1103) - #2262

Merged
JarryShaw merged 1 commit into
mainfrom
docs/1103-r7-appmisc-pr
Oct 26, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/1103-r7-appmisc-pr

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • docs — documentation only

Description

Part of #1103, round 7. A full read of pcapkit/protocols/application, misc (PCAP, PCAP-NG), the protocol/schema/data base modules and their models. Prose only: the AST guard is identical on all 10 .py files.

  • PCAP-NG:
    • nanosecond is true for any resolution finer than microseconds.
    • _make_option_if_tzone accepts the types listed.
    • Draft sections are cited by name.
    • _read_secrets_* have Returns: sections.
  • PCAP/PCAP-NG schemas and data:
    • BlockType.post_process warns rather than raising.
    • A negative SchemaField length reads the rest.
    • Header.read raises ProtocolError from the magic callback.
    • Corrected: NoPayload._protos, IF_TSRESOL, aenum.StrEnum, the journal data.
  • Protocol/Schema bases: expand_comp, the _read_unpack Raises, __init_subclass__ scope, the Schema.__new__/from_dict bullets, and the "We used…" comments.
  • Application:
    • PRI is registered (RFC 7540 §11.6), and b'PRI' as 24 bits is 5,263,945.
    • HTTP.pack writes the preface.
    • OSPF.make Raises covers a dict missing keys.
  • Tests: tests/protocols/misc/ 290 passed, tests/protocols/application/ 249; docs, docstring-contract and convention tests pass.

@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
@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

Copy link
Copy Markdown
Owner Author

Review: GOOD TO GO at 401d2708b (Sonnet).

  • Prose only: the AST guard with docstrings stripped is identical on all 10 .py files.
  • Claims: each claim checked against the code or RFC holds:
    • nanosecond (10^7 → True);
    • if_tzone types;
    • BlockType warns ProtocolWarning;
    • negative SchemaField length;
    • Header.read raises ProtocolError from the magic callback;
    • NoPayload._protos is None;
    • IF_TSRESOL, aenum.StrEnum, expand_comp, _read_unpack, __init_subclass__;
    • RFC 7540 §11.6 registers PRI, and int.from_bytes(b'PRI','big') == 5263945;
    • HTTP.pack, and the OSPF missing key.
  • Tests: misc, application, protocol, docstring-contract, docs and convention tests give 706 passed. No text pins.

@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
…he protocol bases (#1103)

Full read of pcapkit/protocols/application, misc (PCAP, PCAP-NG), the
protocol/schema/data base modules and their data/schema models.

- PCAP-NG: nanosecond claim, tzone types, draft sections by name, Returns.
- PCAP/PCAP-NG schemas and data: BlockType warns, negative lengths,
  Header.read Raises, NoPayload, IF_TSRESOL, aenum.StrEnum, journal data.
- Protocol/Schema bases: expand_comp, _read_unpack Raises,
  __init_subclass__, Schema.__new__/from_dict, change-relative wording.
- Application: PRI is registered (RFC 7540 section 11.6), its 24-bit value,
  HTTP.pack, FrameType comment, OSPF Raises.

- NGAP: PPID 60/66 named as the SCTP registry spells them.
@JarryShaw
JarryShaw force-pushed the docs/1103-r7-appmisc-pr branch from 401d270 to c41c41c Compare October 26, 2026 19:03
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet and removed review: good-to-go Cross-review at the current head says ready; CI state is separate labels Oct 26, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Review: GOOD TO GO at c41c41c83 (Sonnet delta review of 401d2708b→c41c41c83).

  • Delta: only ngap.rst and the ngap.py module docstring. PPID 60/66 are cited by their PayloadProtocolIdentifier members, which const/sctp.rst documents.
  • Prose only: the AST guard on ngap.py is identical.
  • Tests: test_ngap_unit, the docstring contract and the docs tests give 106 passed.

@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, c41c41c83, 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 3023 23 1044 25 98.82%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17437 218 4586 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
JarryShaw merged commit 7f01caf into main Oct 26, 2026
61 checks passed
@JarryShaw
JarryShaw deleted the docs/1103-r7-appmisc-pr branch October 26, 2026 20:25
@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.

1 participant