Skip to content

[GH-2365] Modernize Sedona Python project by switching to pyproject.toml and uv - #2393

Merged
jiayuasu merged 13 commits into
apache:masterfrom
Kontinuation:master
Oct 14, 2025
Merged

jiayuasu merged 13 commits into
apache:masterfrom
Kontinuation:master

Conversation

@Kontinuation

@Kontinuation Kontinuation commented Oct 13, 2025 •

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

What changes were proposed in this PR?

  1. Replace setup.py with pyproject.toml.
  2. Declare dev and test dependencies in pyproject.toml, Replace pipenv with uv for managing dev and test environment

How was this patch tested?

  • Passing all tests
  • Manually inspected the metadata and files of sdist and wheel

Did this PR include necessary documentation updates?

  • Yes, I have updated the documentation.

@Kontinuation Kontinuation changed the title [WIP] Modernize Sedona Python project by switching to pyproject.toml and uv [GH-2365] Modernize Sedona Python project by switching to pyproject.toml and uv Oct 13, 2025
@Kontinuation
Kontinuation marked this pull request as ready for review October 13, 2025 07:40
Comment thread docs/setup/compile.md Outdated
export SPARK_VERSION=3.4.0 # or another supported version
wget https://archive.apache.org/dist/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop3.tgz
tar -xvzf spark-${SPARK_VERSION}-bin-hadoop3.tgz
tar -xvzf spark-${SPARK_VERSION}-bin-hadoop3.tgz

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
tar -xvzf spark-${SPARK_VERSION}-bin-hadoop3.tgz
tar -xvzf spark-${SPARK_VERSION}-bin-hadoop3.tgz

nit: random extra space

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed extra space

@petern48

Copy link
Copy Markdown
Member

I was in the middle of giving it a try, but realized it's taking forever to redownload spark on my slow wifit. will have to wait to tonight to do it, but don't feel the need to wait for that. Excited to get rid of Pipenv finally

@jiayuasu jiayuasu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Waiting for Peter's confirmation.

@petern48 petern48 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works great. Thanks! Minor suggestion and question, but feel free to just merge.

Comment thread docs/setup/compile.md
cd python
pipenv --python 3.8
python -m pip install --upgrade uv
uv venv --python 3.10 # or any supported version (>=3.8)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
uv venv --python 3.10 # or any supported version (>=3.8)
uv venv --python 3.10 # or any supported version (>=3.8)
uv add pip

optional: I personally like when setup guides have every single command that a contributor needs to get setup, so they can blindly copy-paste everything over. Otherwise, I can imagine less-experienced developers to be like "did I miss something? is it okay that I ran this myself?"

pip is needed for this command a few lines down uv run pip install -e .

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Replaced uv run pip install -e . with uv pip install -e .. uv add pip is not needed.

Comment thread docs/setup/compile.md
Comment on lines -125 to -129
Homebrew can be used to install libgeos-dev in macOS:

```
brew install geos
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Curious, was this never needed, or was the need for it removed? I ran brew uninstall geos and confirmed this wasn't needed for things to continue to work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It was intentionally removed. All dependencies should have prebuilt wheels for macOS, so there's no need to install geos.

@petern48

Copy link
Copy Markdown
Member

technically, there's a couple of geopandas tests (related to shapefile io and geom_type) that fail locally for me, so there's something missing/wrong on my local setup, but I don't think it's related to this PR, since it happens for pipenv too. I'll try to figure it out, and (if it makes sense to) submit a follow-up if there's an important instruction to add.

@jiayuasu
jiayuasu merged commit 89d65d2 into apache:master Oct 14, 2025
@petern48 petern48 mentioned this pull request Oct 15, 2025
66 of 77 tasks
Kontinuation added a commit to Kontinuation/sedona that referenced this pull request Jan 21, 2026
…apache#527)

This PR cherry-picks the following PRs from apache/sedona:

* apache#2393
* apache#2401
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.

Consolidate Python dependency files to pyproject.toml

3 participants