Repository navigation
GH-51265: [Python][Parquet] Reorganize Parquet reader docstrings - #51644
Closed
dannyshafer wants to merge 1 commit into
Closed
dannyshafer wants to merge 1 commit into
dannyshafer wants to merge 1 commit into
Conversation
Move the parameter descriptions shared by ParquetFile, ParquetDataset, read_table and read_pandas into module-level snippets and reuse them in each docstring, keeping the most complete wording of each description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UtEFtop6ABsZFiyeX2cu5g
|
|
Member
|
Thanks for the PR. I’m closing it because Arrow’s contributor guidelines require that AI-generated code be reviewed and understood by the person submitting it:
Once you’ve reviewed the changes and can own them yourself, you’re welcome to open a new PR. |
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.
Rationale for this change
The Python Parquet reader docstrings (
ParquetFile,ParquetDataset,read_tableandread_pandas) each repeated the descriptions of common options such asthrift_string_size_limit, and the copies had drifted slightly apart. Closes #51265.What changes are included in this PR?
_read_docstring_common:_read_docstring_file_options(read_dictionary through buffer_size),_read_docstring_partitioning,_read_docstring_filesystem,_read_docstring_reader_options(pre_buffer through schema_depth_limit) and_read_docstring_checksum_options(page_checksum_verification, arrow_extensions_enabled)._read_docstring_commonis kept, built from the first two.ParquetFile.__doc__becomes an f-string built from these snippets, the same wayParquetDataset.__doc__already is. That is why its body is dedented in the diff.ParquetDataset.__doc__,read_table.__doc__andread_pandas.__doc__use the same snippets.read_tablenow gets the fullpre_buffertext (S3, GCS and the memory-usage note),ParquetFilegets the fullread_dictionarydescription (I checked thatParquetFile(..., read_dictionary=["s.x"])does accept nested column paths), anddecryption_propertiesmentions both Parquet Modular Encryption andCryptoFactory.file_decryption_properties().Are these changes tested?
This is a docstring-only change. I rendered the four docstrings before and after and diffed them: apart from the wording unifications above, the content is identical. I also ran the
ParquetFiledocstring examples with doctest and ranflake8 --config python/setup.cfgandautopep8 --diffon the file (both clean).Are there any user-facing changes?
Only the rendered docstrings. They are now consistent across the four readers.
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
This PR was prepared with Claude Code, which wrote the refactor, compared the rendered docstrings before and after, and drafted this description.
PR code and description written by:
Reviewed before submission by: