docs: add summary lines to 13 to_* file/format converter docstrings#4139
Open
TaiSakuma wants to merge 4 commits into
Open
docs: add summary lines to 13 to_* file/format converter docstrings#4139TaiSakuma 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
|
Add a Google-style one-line summary and `Returns:`/`Examples:` section headers to the 13 to_* file/format converters in `src/awkward/operations/`: to_arrow, to_arrow_table, to_parquet, to_parquet_dataset, to_parquet_row_groups, metadata_from_parquet, to_feather, to_json, to_safetensors, to_buffers, to_packed, to_regular, to_backend. 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>
39bb46f to
c3fc938
Compare
|
The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR4139 |
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 13 operations in the
to_*file/format converters batch of #3980:to_arrow,to_arrow_table,to_parquet,to_parquet_dataset,to_parquet_row_groups,metadata_from_parquet,to_feather,to_json,to_safetensors,to_buffers,to_packed,to_regular,to_backend.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.to_arrowak.to_arrow_tableak.to_parquetak.to_parquet_dataset_common_metadataand a_metadatain a directory of Parquet files.ak.to_parquet_row_groupsak.metadata_from_parquetak.to_featherak.to_jsonak.to_safetensorsak.to_buffersak.to_packedak.to_regularak.to_backendNotes for reviewers
to_parquet,to_parquet_row_groups, andto_safetensorshad pre-existing (malformed)Returns:headers mid-docstring; they were merged into the standard structure with doctests grouped underExamples:. Content was regrouped but mechanically verified lossless.ak.to_regularreads "one or all variable-length axes … if possible" to coveraxis=None, mirroringfrom_regularin the sibling PR.to_buffers/from_buffersare likewise mirrored ("Decomposes…"/"Reconstitutes… a Form, length, and memory buffers").ak.to_backendreads "Returns an array on a different backend (kernel set)." — avoiding "moves"/"converts" language that would contradict the body's viewed-not-copied note.ak.to_parquet_datasetkeeps backticks on_common_metadata/_metadata— they are literal filenames (the checklist's meaning-bearing exception).to_json's body says it returns "bytes" (it returnsstr; the summary says "string"), andmetadata_from_parquet's body omits the returneduuidkey.write_metadataandget_filepathsare untouched.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