docs: add summary lines to 10 type/validity operation docstrings#4135
Open
TaiSakuma wants to merge 4 commits into
Open
docs: add summary lines to 10 type/validity operation docstrings#4135TaiSakuma wants to merge 4 commits into
TaiSakuma wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
|
Member
Author
|
Follow-up per @ikrommyd's review on #4130: the Returns
|
TaiSakuma
force-pushed
the
docs-type-validity-docstrings
branch
from
June 30, 2026 22:45
a755000 to
b0e8b61
Compare
TaiSakuma
marked this pull request as ready for review
June 30, 2026 22:54
|
The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR4135 |
Add a Google-style one-line summary and `Returns:`/`Examples:` section headers to the 10 type/validity/equality operations in `src/awkward/operations/`: almost_equal, array_equal, is_valid, validity_error, is_categorical, is_tuple, categories, enforce_type, values_astype, strings_astype. Follows the pilot in scikit-hep#3946 on `ak.flatten`. Original body text is preserved; only structural edits are applied. Refs scikit-hep#3980. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…#3980. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tion. Refs scikit-hep#3980. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per the Examples:-section checklist on scikit-hep#3980: narrative that describes behavior, arguments, or history belongs above Args: in the extended description; Examples: keeps only doctest walkthroughs and their connecting prose; "See also" lines go directly above Args:. Refs scikit-hep#3980. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
TaiSakuma
force-pushed
the
docs-type-validity-docstrings
branch
from
July 23, 2026 14:01
b0e8b61 to
76b7e4c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rolls the pilot from #3946 out to the 10 operations in the Type / validity / equality batch of #3980:
almost_equal,array_equal,is_valid,validity_error,is_categorical,is_tuple,categories,enforce_type,values_astype,strings_astype.Each docstring now has:
""".Returns:andExamples:section headers (the latter only where examples exist).Original body text is preserved; only structural edits are applied. The summary lines were reviewed against the checklist posted in #3980.
Summary lines
ak.almost_equalak.array_equalak.is_validak.validity_errorak.is_categoricalak.is_tupleak.categoriesak.enforce_typeak.values_astypeak.strings_astypeNotes for reviewers
ak.enforce_type's body is one continuous bulleted explanation, so everything sits under a singleReturns:header (theak.concatenatemodel — noExamples:split that would break the prose). Its doctests are nested inside bullets and were uniformly re-indented by 4 spaces with the bullets; content is byte-identical.ak.array_equaldelegates toalmost_equalwith exact settings, so its summary carries no tolerance language, distinguishing the pair.ak.values_astypehas a malformed doctest output inmain(datetime64[ms]['), andak.strings_astype's "See also #ak.numbers_astype" references a non-existent operation.Test plan
Args:blocks and doctests byte-identical; no original narrative text lost.Part of #3980. Draft for initial review; will mark ready once CI passes and the preview is checked.
AI assistance disclosure
Drafted with Claude Code: summaries drafted by Claude Opus 4.8, adversarially verified against the implementations by independent Claude Opus 4.8 agents, mechanically validated (docstring-only changes, original text preserved), and reviewed by a human before submission.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com