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

Move python tool configurations to pyproject.toml, and add the python 3.11 classifier. #9112

Merged
merged 4 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions python-package/.pylintrc

This file was deleted.

47 changes: 42 additions & 5 deletions python-package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ build-backend = "packager.pep517"
name = "xgboost"
version = "2.0.0-dev"
authors = [
{name = "Hyunsu Cho", email = "chohyu01@cs.washington.edu"},
{name = "Jiaming Yuan", email = "jm.yuan@outlook.com"}
{ name = "Hyunsu Cho", email = "chohyu01@cs.washington.edu" },
{ name = "Jiaming Yuan", email = "jm.yuan@outlook.com" }
]
description = "XGBoost Python Package"
readme = {file = "README.rst", content-type = "text/x-rst"}
readme = { file = "README.rst", content-type = "text/x-rst" }
requires-python = ">=3.8"
license = {text = "Apache-2.0"}
license = { text = "Apache-2.0" }
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Development Status :: 5 - Production/Stable",
Expand All @@ -24,7 +24,8 @@ classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
]
dependencies = [
"numpy",
Expand All @@ -40,3 +41,39 @@ plotting = ["graphviz", "matplotlib"]
pyspark = ["pyspark", "scikit-learn", "cloudpickle"]

[tool.hatch.build.targets.wheel.hooks.custom]

[tool.isort]
profile = "black"

[tool.mypy]
ignore_missing_imports = true
disallow_untyped_defs = true
follow_imports = "silent"

[tool.pylint.main]
ignore = ["tests"]
extension-pkg-whitelist = ["numpy"]
disable = [
"attribute-defined-outside-init",
"import-outside-toplevel",
"too-many-nested-blocks",
"unexpected-special-method-signature",
"unsubscriptable-object",
"useless-object-inheritance"
]
dummy-variables-rgx = "(unused|)_.*"
reports = false

[tool.pylint.basic]
# Enforce naming convention
const-naming-style = "UPPER_CASE"
class-naming-style = "PascalCase"
function-naming-style = "snake_case"
method-naming-style = "snake_case"
attr-naming-style = "snake_case"
argument-naming-style = "snake_case"
variable-naming-style = "snake_case"
class-attribute-naming-style = "snake_case"

# Allow single-letter variables
variable-rgx = "[a-zA-Z_][a-z0-9_]{0,30}$"
7 changes: 0 additions & 7 deletions python-package/setup.cfg

This file was deleted.

Loading