Skip to content

docs: clarify table write API docstrings#3346

Open
BharatDeva wants to merge 1 commit intoapache:mainfrom
BharatDeva:docs/table-write-api-docstrings
Open

docs: clarify table write API docstrings#3346
BharatDeva wants to merge 1 commit intoapache:mainfrom
BharatDeva:docs/table-write-api-docstrings

Conversation

@BharatDeva
Copy link
Copy Markdown

Rationale for this change

Issue #1056 tracks missing or incomplete docstrings in PyIceberg public APIs. While reviewing the table write helpers, I noticed a few small gaps in the Table API docs:

  • append described the input dataframe as overwriting the table, although the method appends rows.
  • add_files documented only file_paths, even though the public method also accepts snapshot properties, duplicate-file checking, and branch selection.
  • update_spec did not have a public docstring, unlike the surrounding table update helpers.

What changes are included in this PR?

This PR makes a small documentation-only update to pyiceberg/table/__init__.py:

  • clarifies the append argument description
  • adds missing add_files argument descriptions
  • adds a short update_spec docstring with its case_sensitive argument

Are these changes tested?

Yes. I ran the following local checks:

  • uv tool run ruff@0.14.3 check --config pyproject.toml pyiceberg/table/__init__.py
    • Result: All checks passed!
  • uv tool run pydocstyle@6.3.0 --ignore=D100,D102,D101,D103,D104,D107,D203,D212,D213,D404,D405,D406,D407,D411,D413,D415,D417 pyiceberg/table/__init__.py
    • Result: passed with no output
  • git diff --check
    • Result: passed with no whitespace errors

Are there any user-facing changes?

Yes, documentation-only. The public API docs are clearer, but runtime behavior is unchanged.

LLM-generated code disclosure

This documentation update was prepared with assistance from OpenAI Codex and manually reviewed before submission.

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