Skip to content

docs: copy edits across docstrings, comments, and tests - #418

Merged
thodson-usgs merged 1 commit into
DOI-USGS:mainfrom
thodson-usgs:docs/copy-edits-2
Sep 9, 2026
Merged

docs: copy edits across docstrings, comments, and tests#418
thodson-usgs merged 1 commit into
DOI-USGS:mainfrom
thodson-usgs:docs/copy-edits-2

Conversation

@thodson-usgs

Copy link
Copy Markdown
Collaborator

A second copy editing round. #417 covered the ADRs, guides, and glossary; this one extends the same editing to every .py file — module and function docstrings, inline comments, and message strings — and makes a further pass over the prose #417 touched, so the source and the documentation use the same words for the same things.

What changed

Figurative phrasing replaced with the literal statement:

Instead of Now
a dial, a knob, a switch a setting, a parameter
silence, a silent call time without data
a sanctioned wait, a wait the server named a server-specified wait
surfaces as, fires is raised as, is emitted
silently, quietly without an error, undetected, or dropped
lives in, sits in is defined in, is in
drives a fan-out, per drive runs a fan-out, per run
wins, beats, loses to takes precedence, outranks, is overridden
the code knows, wants, asks, answers, trusts records, requests, responds, accepts

Emphasis adverbs that carried no fact are dropped: actually, genuinely, precisely, merely, really, and "exactly" where it was not a count. Capitals used for emphasis are lowercased.

What is unchanged

The glossary's terms stay as CONTEXT.md defines them: leaf, facade, seam, fan-out, chunk, page walk, dialect and its quirks, rung and ladder, roster, horizon, no-progress budget with its spend and credit vocabulary, throttle, gate. Standard technical words stay too: driver, backoff, jitter, semaphore, hot path, warm cache, wall clock, drift, stale, leak, in flight. Test function names, fixture data, and quoted upstream text are untouched.

Notes for review

  • The show_configuration sample output is duplicated in three places — a docstring, the printed string, and the configuration guide — and test_show_configuration_sample_output_is_current compares them. All three were edited together.
  • Two message strings changed: the cross-host next-page-link refusal in transport/links.py, and the numeric-filter remedy in ogc/filters.py. Both are covered by tests.
  • The diff is large but mechanical. Reading it by file is probably easier than by hunk.

Verification

An AST comparison over all 81 changed Python files confirms that only docstrings, comments, and string literals differ — no structural code change. ruff check, ruff format --check, mypy --strict, lint-imports, xenon, complexipy, and the offline suite (1140 passed) all pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N1Ap36zDGnifU8GvjnFowm

The previous round (DOI-USGS#417) covered the ADRs, guides, and glossary. This one
extends the same copy editing to every .py file -- module and function
docstrings, inline comments, and message strings -- and makes a further pass
over the prose DOI-USGS#417 touched, so the source and the documentation use the same
words for the same things.

Figurative phrasing is replaced with the literal statement:

- settings, not dials or knobs; parameters, not switches
- "time without data" for the stall condition, not silence
- "server-specified" for a Retry-After wait, not sanctioned or named
- "is raised as", not surfaces; "is emitted", not fires
- "without an error" or "undetected", not silently or quietly
- "is defined in", not lives in; "run" a fan-out, not drive one
- "takes precedence" and "outranks", not wins or beats
- literal verbs where code was said to know, want, ask, answer, or trust
- emphasis adverbs dropped where they carried no fact

The glossary's terms are unchanged: leaf, facade, seam, fan-out, chunk, page
walk, dialect, rung and ladder, no-progress budget, and the rest of
CONTEXT.md. Test function names, fixture data, and quoted upstream text are
untouched.

The show_configuration sample output is duplicated in three places -- a
docstring, the printed string, and the configuration guide -- and a test
compares them, so all three were edited together.

No behavior change. An AST comparison over all 81 changed Python files
confirms only docstrings, comments, and message text differ; ruff, mypy
--strict, and the offline suite pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1Ap36zDGnifU8GvjnFowm
@thodson-usgs
thodson-usgs marked this pull request as ready for review September 8, 2026 13:43
@thodson-usgs

Copy link
Copy Markdown
Collaborator Author

@ehinman, this PR consists of one-or-two-word copy edits making the documentation more literal. No code changes

@thodson-usgs
thodson-usgs requested a review from ehinman September 8, 2026 13:45
@thodson-usgs
thodson-usgs merged commit 50407c8 into DOI-USGS:main Sep 9, 2026
11 checks passed
thodson-usgs added a commit to thodson-usgs/dataretrieval-python that referenced this pull request Sep 9, 2026
Two conflicts, both from main's copy-edit passes (DOI-USGS#417, DOI-USGS#418) landing on
lines this branch had already rewritten:

- NEWS.md: main added the 09/01 survey announcement at the top and
  reworded the 08/27 peaks entry; this branch added the 08/30 ratings
  entry. Kept all three, newest first, with main's wording of 08/27.
- tests/nwis_test.py: main copy-edited the docstring of
  test_named_replacement_exists_in_waterdata, which this branch had
  replaced with the stronger test_named_replacement_resolves (ARG001 --
  the old test never used its `name` parameter). Kept the replacement and
  carried main's edits into its docstring.

Gates on the merged tree: ruff check + ruff format --check clean at the
pinned 0.16.5, mypy --strict clean over 60 files, 1153 tests pass,
coverage 98.93%, xenon / complexipy / import-linter (8/8) pass.
thodson-usgs added a commit to thodson-usgs/dataretrieval-python that referenced this pull request Sep 9, 2026
The merge resolved that file with ``git checkout --ours``, which takes the
whole ours-side blob rather than the one conflicted region, so everything
main brought to the file was reverted:

- ``TestReadRdb::test_malformed_peaks_frame_still_raises``, the regression
  test from DOI-USGS#344 -- the suite went 1154 -> 1153 and nothing flagged it,
  since a missing test cannot fail.
- 36 lines of copy edits from DOI-USGS#417 and DOI-USGS#418, the passes that replaced
  figurative wording with literal ("has no opinion about it" -> "does not
  record it", "borrowing" -> "importing").

Redone as a three-way merge of the file with only the conflicted region
resolved by hand. That region is main's copy edit of
``test_named_replacement_exists_in_waterdata``, a test this branch had
already replaced with the stronger ``test_named_replacement_resolves``
(ARG001: the old one never read its ``name`` parameter). The replacement
stands, with main's edits carried into its docstring -- the "Tripwire:"
prefix and the contraction dropped, matching the pass that removed the
only other instance of each in ``tests/``.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant