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

[ci] [python-package] move tool configuration to pyproject.toml #5872

Merged
merged 8 commits into from
May 8, 2023

Conversation

jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented May 7, 2023

Contributes to #3867.
Contributes to #4308.
Contributes to #5061.

Proposes moving configuration for all Python linting tools that support it into pyproject.toml (and for flake8, which doesn't support it per PyCQA/flake8#234, into setup.cfg).

Also adds configuration to skip running linters over the lightgbm-python/ directory (new local build directory introduced in #5837), to help with local development.

Notes for Reviewers

Many Python tools have been moving in this direction, ever since PEP 518 was accepted back in 2016.

From the PEP (link) ...

The [tool] table is where any tool related to your Python project, not just build tools, can have users specify configuration data as long as they use a sub-table within [tool], e.g. the flit tool would store its configuration in [tool.flit].

And projects using those tools have followed. For example, dmlc/xgboost#9112.

Benefits of this Change

Sets up pyproject.toml and setup.cfg as sources of configuration for the Python project, reducing the size of the diff to be reviewed in #5759.

Puts tool configuration into a format used by many other Python projects, making it a bit easier (I hope) for new contributors to work on LightGBM.

@jameslamb jameslamb marked this pull request as ready for review May 7, 2023 05:45
@jameslamb jameslamb changed the title [ci] [python-package] moving tool configuration to pyproject.toml [ci] [python-package] move tool configuration to pyproject.toml May 7, 2023
.ci/lint-python.sh Outdated Show resolved Hide resolved
@jameslamb jameslamb requested a review from jmoralez May 8, 2023 18:01
@jameslamb
Copy link
Collaborator Author

closing and re-opening to try to get rid of that license/cla check 🙃

Screen Shot 2023-05-08 at 3 59 08 PM

@jameslamb jameslamb closed this May 8, 2023
@jameslamb jameslamb reopened this May 8, 2023
@jameslamb jameslamb merged commit 1c873af into master May 8, 2023
@jameslamb jameslamb deleted the add-pyproject-toml branch May 8, 2023 23:05
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed.
To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues
including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants