-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-54949][PYTHON] Move pyproject.toml to repo root #53716
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
Conversation
JIRA Issue Information=== Improvement SPARK-54949 === This comment was automatically generated by GitHub Actions |
HyukjinKwon
left a comment
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.
I remember mypy test failed when I did this .. but ok if it passes now
|
IMO it feels weird to have pyproject.toml in root. pyspark is just one component of the entire repo. we can always add dev/ into the search path right? |
No that's not how all tools work. If all of our python code is in I think the overall direction is to make users use tools as natural as possible. For example, they can just do |
|
@zhengruifeng or @cloud-fan do you have any objections to this? |
|
we also have |
|
merged to master |
### What changes were proposed in this pull request? Move `pyproject.toml` to repo root. ### Why are the changes needed? `pyproject.toml` is now the official way to specify configurations. A lot of tools are supporting it. The way they search for it is to go up in the directory tree until they find it. They will consider that as the root of the project. Having it in `dev/` is not useful for users to run tools individually. We should try to avoid custom scripts as much as possible. After this change, users can do `ruff check` in either repo root, or `python/` and get the correct result with our configurations. This would also be very useful when we introduce `pytest`, which also utilizes `pyproject.toml` to config. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? `dev/lint-python` passed, and CI should pass. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#53716 from gaogaotiantian/move-pyproject. Authored-by: Tian Gao <gaogaotiantian@hotmail.com> Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
What changes were proposed in this pull request?
Move
pyproject.tomlto repo root.Why are the changes needed?
pyproject.tomlis now the official way to specify configurations. A lot of tools are supporting it. The way they search for it is to go up in the directory tree until they find it. They will consider that as the root of the project. Having it indev/is not useful for users to run tools individually. We should try to avoid custom scripts as much as possible.After this change, users can do
ruff checkin either repo root, orpython/and get the correct result with our configurations.This would also be very useful when we introduce
pytest, which also utilizespyproject.tomlto config.Does this PR introduce any user-facing change?
No.
How was this patch tested?
dev/lint-pythonpassed, and CI should pass.Was this patch authored or co-authored using generative AI tooling?
No