Skip to content

[DOC-12399] Clarify thirteen Snowpark API reference topics (docstrings only) - #4410

Merged
sfc-gh-mayliu merged 4 commits into
mainfrom
qding/sdk-docs-remaining
Oct 2, 2026
Merged

sfc-gh-mayliu merged 4 commits into
mainfrom
qding/sdk-docs-remaining

Conversation

@sfc-gh-qding

@sfc-gh-qding sfc-gh-qding commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Clarify 13 Snowpark API reference topics through Python docstrings only. The final diff contains no changes to executable statements, decorators, documentation constants, Sphinx configuration, reference indexes, or tests.

Following review feedback, the source-link implementation and its new tests have been removed from this PR. Those tests imported Sphinx's full configuration and failed on Python 3.13 because the pinned Sphinx dependency imports the removed imghdr module. The to_snowflake documentation now uses a direct function docstring instead of an added decorator.

Tickets targeted for closure after merge

Ticket Documentation change
DOC-1100 FileOperation.get statement parameters and reference link
DOC-4966 write_pandas identifier case and separate database/schema/table arguments
DOC-11611 DataFrame.ai namespace explanation and method links
DOC-12152 IFF example including false and NULL conditions
DOC-12399 Direct to_snowflake docstring explaining all public parameters
DOC-12758 Fractional and fixed-size DataFrame sampling semantics
DOC-12834 SQL simplifier example restoring the original setting
DOC-13066 SQL exception fields and actionable troubleshooting guidance
DOC-13337 Inclusive approx_quantile percentile endpoint
DOC-13515 Session.sql execution and error timing
DOC-13518 Focused SnowflakeFile.open read-mode and context-manager example
DOC-13524 CSV reader options, schema and inference guidance
DOC-16157 ARRAY_POSITION zero-based first-match and not-found example

These are closure targets, not claims of already-completed Jira work. Close only after verified merge and ticket-specific review. Changes to current source do not rebuild historical versioned API pages.

Deferred: not resolved by this PR

Ticket Follow-up needed
DOC-5942 Separate source-link build-code fix with tests isolated from unsupported Sphinx imports
DOC-8392 Verify server BOM/streaming behavior; previous decoder and memory guidance removed
DOC-8393 Confirm constructor/method/result-file lifecycle scope; broader edits removed
DOC-13789 Clarify desired type-preservation behavior versus documentation; changes removed
DOC-16672 Decide insertion-count API requirement versus Connector workaround; changes removed
DOC-10813 Validate third-party interoperability coverage; reference additions removed
DOC-12218 Retrieve/reproduce historical build warnings; not addressed here
DOC-12437 Complete public API inventory and visibility decisions; index additions removed
DOC-12260 Reconcile Modin support matrices/legacy CSV and indexing policy; additions removed

Validation

  • Compared every changed file with PR base e3ddcbbf using Python ASTs after removing docstrings: identical executable ASTs, with no exceptions for decorators or constants.
  • Local sampling doctest, CSV example on a mocked stage, and the exact read_text helper passed against this checkout.
  • Verified public modin.pandas.to_snowflake.__doc__ contains the direct parameter documentation without the added decorator.
  • SQL simplifier example was previously executed with an explicitly mocked connector/schema metadata; generated plans differ and original setting is restored. Its text is unchanged by this narrowing.
  • Equivalent synthetic SQL for IFF/ARRAY_POSITION and approximate-percentile endpoints was validated live. Exact SDK IFF/ARRAY_POSITION examples were not executed against a warehouse; local emulator limitations remain as previously reported.
  • Full Sphinx HTML build and rendered to_snowflake verification; details in the follow-up review comment.
  • Pinned Black and whitespace checks against the PR base.
  • This update removes the newly introduced Sphinx-import unit tests. It does not claim all unrelated CI failures are resolved; CI must rerun on the new head.

Pre-review checklist

  • I acknowledge that I have ensured my changes to be thread-safe
  • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support.

Docstrings only; no new public arguments or execution behavior. NO-CHANGELOG-UPDATES applies. Existing test files and Sphinx configuration are unchanged relative to the PR base.

Generated with Snowflake CoCo

Restore missing reference coverage and pandas export documentation, and clarify API behavior with validated examples.

Generated with [Snowflake CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)

Co-authored-by: Snowflake CoCo <noreply@snowflake.com>
@sfc-gh-qding sfc-gh-qding added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label Oct 1, 2026
@sfc-gh-qding sfc-gh-qding self-assigned this Oct 1, 2026
Add the required test header and canonical import ordering.

Generated with [Snowflake CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)

Co-authored-by: Snowflake CoCo <noreply@snowflake.com>
@codecov-commenter

codecov-commenter commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.47%. Comparing base (e3ddcbb) to head (9ba2d54).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4410   +/-   ##
=======================================
  Coverage   95.47%   95.47%           
=======================================
  Files         176      176           
  Lines       45271    45271           
  Branches     7759     7759           
=======================================
  Hits        43222    43222           
  Misses       1269     1269           
  Partials      780      780           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

State support limits directly without defensive disclaimers or admonishing readers.

Generated with [Snowflake CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)

Co-authored-by: Snowflake CoCo <noreply@snowflake.com>
@sfc-gh-mayliu
sfc-gh-mayliu marked this pull request as ready for review October 2, 2026 18:11
@sfc-gh-mayliu
sfc-gh-mayliu requested a review from a team as a code owner October 2, 2026 18:11

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

Defer build logic, new tests, broad reference audits and unresolved behavior requests. Attach to_snowflake documentation as a direct docstring so the remaining diff changes documentation only.

Generated with [Snowflake CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)

Co-authored-by: Snowflake CoCo <noreply@snowflake.com>
@sfc-gh-qding sfc-gh-qding changed the title [DOC-5942] Consolidate remaining Snowpark API documentation fixes [DOC-12399] Clarify thirteen Snowpark API reference topics (docstrings only) Oct 2, 2026
@sfc-gh-qding

Copy link
Copy Markdown
Collaborator Author

Narrowed in 9ba2d54 following review feedback. The final diff is now docstrings only in nine Python files: no Sphinx configuration changes, new tests, decorators, reference-index changes, or runtime statements. The failing test_documentation.py addition is removed, and to_snowflake now has a direct function docstring. Compared with PR base e3ddcbb, executable ASTs are identical after removing docstrings. Rebuilt the full Sphinx HTML reference with zero warnings and verified the public to_snowflake parameter documentation. The description now lists 13 closure targets and nine explicitly deferred tickets. CI must rerun on this head; I am not claiming all previous failures are resolved.

@sfc-gh-qding sfc-gh-qding added the NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs label Oct 2, 2026
@sfc-gh-qding

Copy link
Copy Markdown
Collaborator Author

Applied NO-PANDAS-CHANGEDOC-UPDATES because the retained pandas change is a direct API docstring; no separate docs/source/modin guide update is needed. The changedoc workflow otherwise requires a file in that directory. No checks or workflow files were modified.

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

@sfc-gh-mayliu
sfc-gh-mayliu merged commit adaaef2 into main Oct 2, 2026
35 of 37 checks passed
@sfc-gh-mayliu
sfc-gh-mayliu deleted the qding/sdk-docs-remaining branch October 2, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs snowpark-pandas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants