Skip to content

[GH-2166] More pathing fixes for Python package refactor - #2167

Merged
jiayuasu merged 8 commits into
apache:masterfrom
james-willis:more-pathing-fixes
Jul 29, 2025
Merged

jiayuasu merged 8 commits into
apache:masterfrom
james-willis:more-pathing-fixes

Conversation

@james-willis

Copy link
Copy Markdown
Collaborator

Did you read the Contributor Guide?

Is this PR related to a ticket?

What changes were proposed in this PR?

I'm fixing the breaking changes from #1930

How was this patch tested?

unit tests

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the documentation.

Comment thread python/tests/test_path_compatibility.py Resolved
Comment thread python/tests/test_path_compatibility.py Resolved
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.
Comment thread python/sedona/sql/__init__.py Resolved
@jiayuasu
jiayuasu requested a review from Copilot July 28, 2025 20:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses path compatibility issues following breaking changes from PR #1930 by reorganizing module imports and providing backward compatibility through wrapper modules and deprecation warnings.

Key changes include:

  • Addition of backward compatibility wrapper modules for sedona.utils, sedona.maps, and sedona.raster packages
  • Implementation of direct imports from sedona.sql to maintain API compatibility
  • Expansion of test coverage to verify all new import paths work correctly

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
python/tests/test_path_compatibility_all.py Adds comprehensive test cases for all new import paths including raster, maps, utils, and geoarrow modules
python/tests/test_path_compatibility.py Expands existing compatibility tests and adds imports for all deprecated modules being tested
python/sedona/utils/__init__.py Creates backward compatibility wrapper for utils package with deprecation warning
python/sedona/sql/__init__.py Enables direct imports from sedona.sql by re-exporting all spark.sql symbols
python/sedona/register/__init__.py Updates register module to import SedonaRegistrator with updated deprecation message
python/sedona/raster_utils/ Creates new raster_utils compatibility module structure
python/sedona/raster/ Creates complete raster compatibility module structure with individual wrapper files
python/sedona/maps/ Creates maps compatibility module structure with wrapper files for SedonaKepler and SedonaPyDeck
python/sedona/geoarrow/__init__.py Updates geoarrow module to use proper all exports from spark.geoarrow
Comments suppressed due to low confidence (2)

python/tests/test_path_compatibility_all.py:96

  • This test method is duplicated - there's already a test_geoarrow_import method at line 87. Consider consolidating these tests or renaming them to reflect different aspects being tested.
    def test_geoarrow_imports(self):

python/tests/test_path_compatibility.py:144

  • This test method is duplicated - there's already a test_geoarrow_import method at line 128. Consider consolidating these tests or renaming them to reflect different aspects being tested.
    def test_geoarrow_imports(self):

Comment thread python/sedona/sql/__init__.py Resolved
Comment thread python/sedona/sql/__init__.py Resolved
@jiayuasu jiayuasu added this to the sedona-1.8.0 milestone Jul 29, 2025
@jiayuasu jiayuasu changed the title [GH-2166] More pathing fixes [GH-2166] More pathing fixes for Python package refactor Jul 29, 2025
@jiayuasu
jiayuasu merged commit 44afedd into apache:master Jul 29, 2025
Kontinuation added a commit to Kontinuation/sedona that referenced this pull request Jan 21, 2026
…e#2167) (apache#468)

cherry pick from sedona

Co-authored-by: Kristin Cowalcijk <bo@wherobots.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Breaking Changes from #1930

4 participants