-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Python documentation #123
Merged
Merged
Conversation
This file contains 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
Gold Data ReportNotes
Commit Information
Summary
DetailsGold Data Metrics
|
Spark Test ReportCommit Information
Test Summary
Test DetailsError Counts
Passed Tests Diff--- base 2024-08-08 11:40:41.244046228 +0000
+++ head 2024-08-08 11:40:41.356046969 +0000
@@ -62 +61,0 @@
-.venvs/test/lib/python3.11/site-packages/pyspark/sql/dataframe.py::pyspark.sql.dataframe.DataFrame.withColumns |
shehabgamin
approved these changes
Aug 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is huge, great work!! 🚀
1 task
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.
Changes:
With this PR, the Python documentation can be part of the SPA (single-page application) documentation site. I haven't seen Python libraries doing this. I feel this is a valuable approach that offers good user experience for browsing the documentation.
Additional Notes
I spent some time investigating the Python documentation setup, and it turns out that the tooling is not satisfactory. Here are a few possible options for now.
Option 1: Write Python docstring as Rust doc comments, and optionally write
.pyi
files for typing.__doc__
attribute. (PyO3 stores Rust doc comments in the__doc__
attribute.)Option 2: Write
.pyi
files for docstring and comment..pyi
yet. See the discussions here and here..pyi
files.Option 3: Use Python wrapper functions/classes for all Rust implementations.
.pyi
files.Notes:
.pyi
files automatically in the future. See the issue for more details..pyi
files can be validated against the implementation using stubtest.Here is a summary of all the options.
In this PR I decided to use Option 3. It has higher maintainence cost but good user experience. The maintainence cost is acceptable given that we do not have many Python functions/classes.