[SEDONA-725] restructure spark python package#1930
Merged
Conversation
Member
Author
|
@jiayuasu this is the spark part |
jiayuasu
requested changes
Apr 30, 2025
| import warnings | ||
|
|
||
| warnings.warn( | ||
| "The 'sedona.spark.stats.clustering.dbscan' module is deprecated and will be removed in future versions. Please use 'sedona.spark.stats' instead.", |
Member
There was a problem hiding this comment.
Suggested change
| "The 'sedona.spark.stats.clustering.dbscan' module is deprecated and will be removed in future versions. Please use 'sedona.spark.stats' instead.", | |
| "The 'sedona.stats.clustering.dbscan' module is deprecated and will be removed in future versions. Please use 'sedona.spark.stats' instead.", |
| import warnings | ||
|
|
||
| warnings.warn( | ||
| "The 'sedona.utils.structured_adapter' module is deprecated and will be removed in future versions. Please use 'sedona.spark' instead.", |
Member
There was a problem hiding this comment.
Suggested change
| "The 'sedona.utils.structured_adapter' module is deprecated and will be removed in future versions. Please use 'sedona.spark' instead.", | |
| "The 'sedona.utils.structured_adapter' module is deprecated and will be removed in future versions. Please use 'sedona.spark.utils' instead.", |
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| from sedona.spark.stac.client import Client |
Member
There was a problem hiding this comment.
Please keep the Apache file header unless you completely drop the file
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR restructures the Spark Python package in Sedona by updating import paths from sedona.core modules to sedona.spark modules and reorganizing the package structure.
- Updated import statements across core, SQL, and utility modules
- Refactored documentation and notebooks to reflect new module paths
- Added error handling for PySpark availability in the spark init.py
Reviewed Changes
Copilot reviewed 209 out of 209 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/sedona/spark/core/SpatialRDD/linestring_rdd.py | Updated import paths and references to use new sedona.spark modules. |
| python/sedona/spark/core/SpatialRDD/circle_rdd.py | Updated import paths; potential bug in getCenterLineStringRDDAsSpatialRDD method call. |
| python/sedona/spark/init.py | Updated import paths and added PySpark availability check. |
| python/sedona/spark/SedonaContext.py | Adjusted imports to the new package structure. |
| docs/* | Updated documentation and notebooks to use sedona.spark endpoints. |
Comments suppressed due to low confidence (1)
python/sedona/spark/core/SpatialRDD/circle_rdd.py:53
- In the getCenterLineStringRDDAsSpatialRDD method, the call to 'getCenterPolygonAsSpatialRDD()' should likely be updated to 'getCenterLineStringRDDAsSpatialRDD()' to correctly match the method's intent.
srdd = self._srdd.getCenterPolygonAsSpatialRDD()
Member
Author
|
@jiayuasu great catch, I added auto-generating license for Python files in pre-commit (I always forget to add them) |
0f91602 to
e3143fc
Compare
jiayuasu
approved these changes
May 3, 2025
james-willis
added a commit
to james-willis/sedona
that referenced
this pull request
Jul 25, 2025
mostly these are just adding "redirects" to the new location. the geoarrow I moved out of the util folder. unless we had never released this at the time, this seemed to just be a mistake that failed to maintain backwards compatability. I skipped some things because I thought maybe theyre not supported APIS: * everything in core * sedona.register outside of what is available from the init file I'm sure I missed some things here but hopefull this makes things a lot better for existing users of sedona.
james-willis
added a commit
to james-willis/sedona
that referenced
this pull request
Jul 28, 2025
mostly these are just adding "redirects" to the new location. the geoarrow I moved out of the util folder. unless we had never released this at the time, this seemed to just be a mistake that failed to maintain backwards compatability. I skipped some things because I thought maybe theyre not supported APIS: * everything in core * sedona.register outside of what is available from the init file I'm sure I missed some things here but hopefull this makes things a lot better for existing users of sedona.
jiayuasu
pushed a commit
that referenced
this pull request
Jul 29, 2025
* SedonaUtils fix * maintain backwards compat from the restructuring in #1930 mostly these are just adding "redirects" to the new location. the geoarrow I moved out of the util folder. unless we had never released this at the time, this seemed to just be a mistake that failed to maintain backwards compatability. I skipped some things because I thought maybe theyre not supported APIS: * everything in core * sedona.register outside of what is available from the init file I'm sure I missed some things here but hopefull this makes things a lot better for existing users of sedona. * PR Comments + remove SedonaMapUtils.py, its not a public interface. * revert test style changes * clean up imports * remove print statements * fix tests * Fix raster UDT import order issue --------- Co-authored-by: Kristin Cowalcijk <bo@wherobots.com>
Kontinuation
pushed a commit
to Kontinuation/sedona
that referenced
this pull request
Jan 21, 2026
…) (apache#452) ## Did you read the Contributor Guide? - Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/) - No, I haven't read it. ## Is this PR related to a ticket? - Yes, and the PR name follows the format `[SEDONA-XXX] my subject`. - Yes, and the PR name follows the format `[GH-XXX] my subject`. - No: - this is a documentation update. The PR name follows the format `[DOCS] my subject` - this is a CI update. The PR name follows the format `[CI] my subject` ## What changes were proposed in this PR? ## How was this patch tested? ## Did this PR include necessary documentation updates? - Yes, I am adding a new API. I am using the [current SNAPSHOT version number](https://github.com/apache/sedona/blob/99239524f17389fc4ae9548ea88756f8ea538bb9/pom.xml#L29) in `vX.Y.Z` format. - Yes, I have updated the documentation. - No, this PR does not affect any public API so no need to change the documentation. Co-authored-by: Paweł Tokaj <pawel93kocinski@gmail.com>
This file contains hidden or 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
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.
Did you read the Contributor Guide?
Is this PR related to a ticket?
SEDONA-725
What changes were proposed in this PR?
restructure spark python package
How was this patch tested?
existing unit tests
Did this PR include necessary documentation updates?
yes