Skip to content

Commit 5da8d5e

Browse files
committed
docs(repo): seventh whole-repo pass over util, examples, workflows and root files (#1103)
Full read of util/, examples/, workflow comments and root config. - util: changelog_md sdist scope, pyshark_encap_map Unassigned handling and lxml markers, pytest_shards interpreter, python_versions KTLO outputs, release_tags/vendor_test_gate/update_python_versions/superseded claims. - examples: options.py HIP/SMF_DPD/PCAP-NG notes, pcapng.py logging, dispatch.py, legacy.py, engine lists. - workflows: unittest-ordering cap comments, lint schedule, deploy-pages leftover comment, milestone duplicate-closed, status_for cited by name. - root: Makefile captures, pyproject test extra, .gitignore wording. - Change-relative wording and counts restated throughout.
1 parent 9d504ea commit 5da8d5e

35 files changed

Lines changed: 202 additions & 251 deletions

‎.github/workflows/coverage-comment.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
if tests not in ('success', 'failure', 'cancelled', 'skipped'):
101101
sys.exit(f'invalid test outcome in artifact: {tests!r}')
102102
total = number(data['total'])
103-
# The leg's version, from the artifact; one written before #1660 has none.
103+
# The leg's version, from the artifact; one without it reads as the coverage leg.
104104
python = data.get('python')
105105
if python is not None and not (isinstance(python, str) and re.fullmatch(r'3\.\d+', python)):
106106
sys.exit(f'invalid Python version in artifact: {python!r}')

‎.github/workflows/create-release.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,7 @@ jobs:
752752
- macos-latest
753753
- macos-26-intel
754754
- ubuntu-latest
755-
# #2060: win-64, once Conda Update's leg had built and smoke-tested it
756-
# green. Its `run:` steps name `bash`, as Windows runs `pwsh`.
755+
# #2060: win-64. Its `run:` steps name `bash`, as Windows runs `pwsh`.
757756
- windows-latest
758757
# #1633, #1660: the supported tier only. No KTLO 3.10 leg: the list
759758
# util/conda_vendor.py derives omits typing-extensions, which

‎.github/workflows/cron-conda.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ jobs:
551551
- macos-26-intel
552552
- ubuntu-latest
553553
# #2060: win-64, uploaded with the anaconda-client CLI as the Intel
554-
# leg is, once its runs had built and smoke-tested it green.
554+
# leg is.
555555
- windows-latest
556556
# #1633: the supported tier, from .github/python-versions.toml through
557557
# `conda-update` (#1660); create-release.yml's ``conda`` job says why

‎.github/workflows/cron-vendor.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ jobs:
180180
find pcapkit/const -mindepth 2 -name '*.py' -exec isort -l100 -ppcapkit {} +
181181
182182
# #1853: both gates in `head` judge the commit from before the crawl, so
183-
# 1.5.0b13 was committed with a test failing on it. The owner's ruling:
184-
# test it here under #872's rule -- a module the tests fail with goes
185-
# back to HEAD's copy, the rest are committed. util/vendor_test_gate.py's
186-
# docstring gives the rule.
183+
# they pass a crawl the tests fail on, as they did 1.5.0b13's. The
184+
# owner's ruling: test it here under #872's rule -- a module the tests
185+
# fail with goes back to HEAD's copy, the rest are committed.
186+
# util/vendor_test_gate.py's docstring gives the rule.
187187
#
188188
# `continue-on-error`, so the tests never fail the job; if the step fails
189189
# or times out, the next one discards every regenerated module. `.[test]`

‎.github/workflows/deploy-pages.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
github.event.workflow_run.head_branch == 'main' &&
7878
needs.head.outputs.verified == 'true'
7979
))
80-
concurrency: ci-${{ github.event_name == 'workflow_dispatch' && github.run_id || github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
80+
concurrency: ci-${{ github.event_name == 'workflow_dispatch' && github.run_id || github.ref }}
8181
runs-on: macos-latest
8282
steps:
8383
- name: Checkout 🛎️

‎.github/workflows/lint.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on:
3030
pull_request:
3131
branches: [main]
3232
schedule:
33-
# Saturdays, an hour clear of the other Saturday jobs.
33+
# Saturdays, at an hour no other Saturday job uses.
3434
- cron: '0 6 * * 6'
3535
workflow_dispatch:
3636

‎.github/workflows/milestone.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ name: Milestone
77
# "Milestone" in docs/source/contributing/workflows.rst: an open item, a merged
88
# pull request or an issue closed as completed gets the open milestone named
99
# after the checked-out `pcapkit.__version__`, unless it already holds another;
10-
# an unmerged pull request or an issue closed as not planned loses whichever
11-
# milestone it holds. A missing milestone is a warning, never created.
10+
# an unmerged pull request or an issue closed as not planned or as a duplicate
11+
# loses whichever milestone it holds. A missing milestone is a warning, never created.
1212
#
1313
# SECURITY. `pull_request_target` gives this run a write token on events a
1414
# stranger can cause, so it must never execute anything the pull request
1515
# supplies. The job below:
1616
#
1717
# * checks out `github.sha`, which under `pull_request_target` is the tip of
18-
# the *base* branch, never the PR head, and only the three files it reads,
18+
# the *base* branch, never the PR head, and only the files it reads,
1919
# without persisting the token;
2020
# * reads `__version__` from pcapkit/__init__.py as text, importing nothing;
2121
# * takes nothing from the event payload but the item number, passed through

‎.github/workflows/project-status.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Project Status
22

33
# Keeps the project board's Status field (users/JarryShaw/projects/2) in line with
44
# each item's state labels, which no built-in board workflow observes. The mapping
5-
# is util/project_status.py:status_for; it and the PROJECT_TOKEN setup are
5+
# is `status_for` in util/project_status.py; it and the PROJECT_TOKEN setup are
66
# documented under "Milestones and the Project Board" in
77
# docs/source/contributing/conventions/process.rst.
88
#

‎.github/workflows/unit-tests.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
cache: pip
124124

125125
# DPKT (#729), crypto and NGAP (#738) are here so the unit-tier tests
126-
# gated on them run instead of skipping; all three install cleanly. On
126+
# gated on them run instead of skipping; each installs cleanly. On
127127
# PyPy 8.0 PyPI has no Linux wheel of cryptography, so pip builds it with
128128
# the image's Rust and libssl-dev (#1958). `cli` (emoji) is not here: its
129129
# only gated tests are in tests/integration, which this job ignores.
@@ -1166,8 +1166,8 @@ jobs:
11661166
runs-on: ubuntu-latest
11671167
# 45, as `test`'s: this is the only test job with no xdist, so a cell
11681168
# carries its whole serial cost, and a contended run once passed 20
1169-
# minutes. The slowest cell, with #1029's split, is 8.2m; even #1029's slowdown
1170-
# window, at least 1.6x, leaves it far inside the cap.
1169+
# minutes. Each cell is held well inside it by its run step's own cap,
1170+
# which ci-timing.yml's weekly report watches (#2254).
11711171
timeout-minutes: 45
11721172
strategy:
11731173
fail-fast: false
@@ -1224,8 +1224,9 @@ jobs:
12241224
python -c "import os; print('cpu_count', os.cpu_count())"
12251225
12261226
# `--verbose` names every test as it runs, so a hung cell shows where it
1227-
# was. The step cap is about twice the slowest cell's measured maximum,
1228-
# under the job's, so a hang reports as this step timing out.
1227+
# was. The step cap sits under the job's, so a hang reports as this step
1228+
# timing out. util/ci_timing.py flags a cell whose p90 reaches half of
1229+
# it, and such a cell is split, as `project` is (#2254).
12291230
- name: Run tests/${{ matrix.leg }} and the root-level modules under plain unittest
12301231
timeout-minutes: 20
12311232
run: python util/cap_file_size.py python util/run_unittest_leg.py ${{ matrix.leg }} ${{ matrix.exclude }} ${{ matrix.shard }} --verbose

‎.gitignore‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ pcapkit-temp.html
66
# generated captures at examples/sample/, and nothing should track them.
77
examples/sample/
88
examples/captures/*
9-
# Only the two genuine *inputs* are tracked. Everything else in this directory is
10-
# build output: the captures `examples/generators/make_samples.py` writes, and the
11-
# reference reports `examples/legacy_smoke/` renders out of these two inputs --
12-
# out.json, out.plist, out.txt and pcapng.txt, via `make fixtures` there.
9+
# Only the genuine *inputs*, re-included below, are tracked. Everything else in
10+
# this directory is build output: the captures `examples/generators/make_samples.py`
11+
# writes, and the reference reports `examples/legacy_smoke/` renders out of those
12+
# inputs -- out.json, out.plist, out.txt and pcapng.txt, via `make fixtures` there.
1313
#
14-
# Those four used to be tracked, and the reason they no longer are is that a
15-
# tracked report goes stale silently. Nothing reads one back, so nothing notices
16-
# when a parser change alters how a frame renders: #685 was exactly that, with
17-
# pcapng.txt still recording `packet -> NIL` for four blocks long after #683 gave
18-
# PCAP-NG packet blocks their captured octets back. Regenerating them on every such
19-
# change is work with no reader, and the tier guard in `tests/_tiers.py` asks git
20-
# which captures are tracked rather than hardcoding a list, so dropping them here
21-
# is the whole change -- see `examples/legacy_smoke/README.md` for how to rebuild
22-
# them locally.
14+
# The reports are not tracked because a tracked report goes stale silently.
15+
# Nothing reads one back, so nothing notices when a parser change alters how a
16+
# frame renders: #685 was exactly that, with pcapng.txt still recording
17+
# `packet -> NIL` for four blocks long after #683 gave PCAP-NG packet blocks their
18+
# captured octets back. Regenerating them on every such change is work with no
19+
# reader, and the tier guard in `tests/_tiers.py` asks git which captures are
20+
# tracked rather than hardcoding a list, so ignoring them here is all it takes --
21+
# see `examples/legacy_smoke/README.md` for how to rebuild them locally.
2322
!examples/captures/in.pcap
2423
!examples/captures/dhcp.pcapng
2524

0 commit comments

Comments
 (0)