Skip to content
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 programatic Sedona Python API documentaion #1734

Open
MrPowers opened this issue Dec 22, 2024 · 3 comments
Open

Add programatic Sedona Python API documentaion #1734

MrPowers opened this issue Dec 22, 2024 · 3 comments

Comments

@MrPowers
Copy link
Contributor

Expected behavior

Python API docs that are programatically generated.

Actual behavior

There is a Python API, but the docs don't have the programatic Python API documented yet. Here's an example:

from sedona.sql.st_functions import ST_Length
@james-willis
Copy link
Contributor

There's some opportunity for improvement here but they are documented: https://sedona.apache.org/latest/api/sql/DataFrameAPI/

Perhaps primarily there is a navigability issue

@MrPowers
Copy link
Contributor Author

@james-willis - yea, the existing docs are great and perhaps docs that are generated from the Python code aren't necessary.

Let's look at the ST_GeomFromEWKT function for example.

It's not immediately obvious how to use this function with Python, but perhaps we can just add an example on that page. If we use Python type hints, then the programmatically generated Python docs could be readable, but I am open to brainstorming!

@james-willis
Copy link
Contributor

james-willis commented Jan 4, 2025

I think all of the python DF API functions have decent docstrings in them. The Scala ones are missing docstrings.

We could generate pydocs to have a 1 to 1 function to documentation on the site.

However, I feel the pattern is pretty clear if you can find and read the df api page:

from sedona.sql import *

myDF.withColumn("myColumn", ST_GeomFromEWKT(f.lit(...)))

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

No branches or pull requests

2 participants