Skip to content

Add comprehensive docstrings and expand API documentation#632

Merged
laughingman7743 merged 3 commits intomasterfrom
feature/add-docstrings
Jan 1, 2026
Merged

Add comprehensive docstrings and expand API documentation#632
laughingman7743 merged 3 commits intomasterfrom
feature/add-docstrings

Conversation

@laughingman7743
Copy link
Member

@laughingman7743 laughingman7743 commented Jan 1, 2026

Summary

  • Add comprehensive docstrings to model classes in pyathena/model.py
  • Add docstrings to result set classes (AthenaResultSet, DataFrameIterator)
  • Add docstrings to SQLAlchemy dialect classes and implementation components
  • Add docstrings to S3FS converter method
  • Add docstrings to utility modules (pyathena/pandas/util.py, pyathena/arrow/util.py)
  • Expand Sphinx API documentation with missing classes and new SQLAlchemy reference

Classes documented:

Model classes:

  • AthenaCalculationExecutionStatus, AthenaCalculationExecution
  • AthenaSessionStatus, AthenaDatabase
  • AthenaTableMetadataColumn, AthenaTableMetadataPartitionKey, AthenaTableMetadata
  • AthenaRowFormatSerde, AthenaPartitionTransform

Result set classes:

  • AthenaResultSet, AthenaDictResultSet, WithResultSet (base classes)
  • AthenaPandasResultSet, DataFrameIterator (pandas)
  • AthenaArrowResultSet (arrow)

SQLAlchemy classes:

  • AthenaDialect, AthenaArrowDialect, AthenaPandasDialect, AthenaRestDialect
  • AthenaTypeCompiler, AthenaStatementCompiler, AthenaDDLCompiler
  • AthenaDMLIdentifierPreparer, AthenaDDLIdentifierPreparer
  • AthenaTimestamp, AthenaDate, Tinyint, TINYINT
  • AthenaStruct, STRUCT, AthenaMap, MAP, AthenaArray, ARRAY
  • _HashableDict

S3FS classes:

  • DefaultS3FSTypeConverter.convert method

Utility functions:

  • pyathena/pandas/util.py: get_chunks, reset_index, as_pandas, to_sql_type_mappings, to_parquet, to_sql, get_column_names_and_types, generate_ddl
  • pyathena/arrow/util.py: to_column_info, get_athena_type

Sphinx API documentation updates:

  • Added docs/api/sqlalchemy.rst for SQLAlchemy integration (dialects, types, compilers, preparers)
  • Added missing result set classes to docs/api/connection.rst
  • Added AthenaPandasResultSet, DataFrameIterator, utility functions to docs/api/pandas.rst
  • Added AthenaArrowResultSet, utility functions to docs/api/arrow.rst
  • Added S3File to docs/api/filesystem.rst
  • Updated docs/api.rst to include SQLAlchemy reference

Test plan

  • All existing tests pass
  • make chk passes (lint, format, mypy)

Closes #595

🤖 Generated with Claude Code

laughingman7743 and others added 3 commits January 1, 2026 23:01
Add documentation for:
- Model classes: AthenaCalculationExecutionStatus, AthenaCalculationExecution,
  AthenaSessionStatus, AthenaDatabase, AthenaTableMetadataColumn,
  AthenaTableMetadataPartitionKey, AthenaTableMetadata, AthenaRowFormatSerde,
  AthenaPartitionTransform
- Result set classes: AthenaResultSet, DataFrameIterator
- SQLAlchemy dialects: AthenaDialect, AthenaArrowDialect, AthenaPandasDialect,
  AthenaRestDialect
- S3FS converter: DefaultS3FSTypeConverter.convert method

Closes #595

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add documentation for:
- Compiler classes: AthenaTypeCompiler, AthenaStatementCompiler, AthenaDDLCompiler
- Preparer classes: AthenaDMLIdentifierPreparer, AthenaDDLIdentifierPreparer
- Type classes: AthenaTimestamp, AthenaDate, Tinyint, TINYINT, AthenaStruct,
  STRUCT, AthenaMap, MAP, AthenaArray, ARRAY
- Utility classes: _HashableDict
- Module docstring for util.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add docstrings to pyathena/pandas/util.py functions:
  - get_chunks, reset_index, as_pandas, to_sql_type_mappings
  - to_parquet, to_sql, get_column_names_and_types, generate_ddl
- Add docstrings to pyathena/arrow/util.py functions:
  - to_column_info, get_athena_type
- Add module docstrings to both utility files
- Add missing classes to Sphinx API documentation:
  - AthenaPandasResultSet, DataFrameIterator in pandas.rst
  - AthenaArrowResultSet in arrow.rst
  - AthenaResultSet, AthenaDictResultSet, WithResultSet in connection.rst
  - S3File in filesystem.rst
- Create new docs/api/sqlalchemy.rst for SQLAlchemy integration:
  - Dialects, Type System, Compilers, Identifier Preparers
- Update docs/api.rst to include SQLAlchemy reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@laughingman7743 laughingman7743 changed the title Add comprehensive docstrings to core classes and SQLAlchemy components Add comprehensive docstrings and expand API documentation Jan 1, 2026
@laughingman7743 laughingman7743 marked this pull request as ready for review January 1, 2026 14:44
@laughingman7743 laughingman7743 merged commit 92054a1 into master Jan 1, 2026
5 checks passed
@laughingman7743 laughingman7743 deleted the feature/add-docstrings branch January 1, 2026 14:44
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.

Write docstrings and create API documentation

1 participant