"examples/python-guide/vscode:/vscode.git/clone" did not exist on "bc9d34e4e651b5744b29a556a2e9d2301707e35b"
pyproject.toml 4.4 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[project]

classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: MIT License",
    "Natural Language :: English",
    "Operating System :: MacOS",
    "Operating System :: Microsoft :: Windows",
    "Operating System :: POSIX",
    "Operating System :: Unix",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.7",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
17
    "Programming Language :: Python :: 3.11",
18
19
    "Topic :: Scientific/Engineering :: Artificial Intelligence"
]
20
dependencies = [
21
    "dataclasses ; python_version < '3.7'",
22
23
24
    "numpy",
    "scipy"
]
25
26
27
28
29
30
31
32
description = "LightGBM Python Package"
license = {file = "LICENSE"}
maintainers = [
  {name = "Yu Shi", email = "yushi@microsoft.com"}
]
name = "lightgbm"
readme = "README.rst"
requires-python = ">=3.6"
33
version = "4.3.0.99"
34

35
[project.optional-dependencies]
36
37
38
39
arrow = [
    "cffi>=1.15.1",
    "pyarrow>=6.0.1"
]
40
41
42
43
44
45
46
dask = [
    "dask[array,dataframe,distributed]>=2.0.0",
    "pandas>=0.24.0"
]
pandas = [
    "pandas>=0.24.0"
]
47
48
49
scikit-learn = [
    "scikit-learn!=0.22.0"
]
50

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[project.urls]
homepage = "https://github.com/microsoft/LightGBM"
documentation = "https://lightgbm.readthedocs.io/en/latest/"
repository = "https://github.com/microsoft/LightGBM.git"
changelog = "https://github.com/microsoft/LightGBM/releases"

# start:build-system
[build-system]

requires = ["scikit-build-core>=0.4.4"]
build-backend = "scikit_build_core.build"

# based on https://github.com/scikit-build/scikit-build-core#configuration
[tool.scikit-build]

66
cmake.minimum-version = "3.18"
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
ninja.minimum-version = "1.11"
ninja.make-fallback = true
cmake.args = [
    "-D__BUILD_FOR_PYTHON:BOOL=ON"
]
cmake.verbose = false
cmake.build-type = "Release"
logging.level = "INFO"
sdist.reproducible = true
wheel.py-api = "py3"
experimental = false
strict-config = true
minimum-version = "0.4.4"

# end:build-system

83
[tool.isort]
84
include_trailing_comma = true
85
line_length = 120
86
87
88
# "vertical hanging indent", to match what ruff-format does
# ref: https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html#3-vertical-hanging-indent
multi_line_output = 3
89
skip_glob = [
90
    "*/external_libs/*",
91
    "*/lightgbm-python/*",
92
93
94
]

[tool.mypy]
95
disallow_untyped_defs = true
96
97
98
exclude = 'build/*|compile/*|docs/*|examples/*|external_libs/*|lightgbm-python/*|tests/*'
ignore_missing_imports = true

99
100
101
102
103
104
[tool.ruff]
exclude = [
    "build",
    "compile",
    "external_libs",
    "lightgbm-python",
105
]
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
line-length = 120

# this should be set to the oldest version of python LightGBM supports
target-version = "py37"

[tool.ruff.format]
docstring-code-format = false
exclude = [
    "build/*.py",
    "compile/*.py",
    "external_libs/*.py",
    "lightgbm-python/*.py",
]
indent-style = "space"
quote-style = "double"
121
skip-magic-trailing-comma = false
122
123

[tool.ruff.lint]
124
125
126
127
ignore = [
    # (pydocstyle) Missing docstring in magic method
    "D105",
    # (pycodestyle) Line too long
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
    "E501",
    # (pylint) Too many branches
    "PLR0912",
    # (pylint) Too many arguments in function definition
    "PLR0913",
    # (pylint) Too many statements
    "PLR0915",
    # (pylint) Consider merging multiple comparisons
    "PLR1714",
    # (pylint) Magic value used in comparison
    "PLR2004",
    # (pylint) for loop veriable overwritten by assignment target
    "PLW2901",
    # (pylint) use 'elif' instead of 'else' then 'if', to reduce indentation
    "PLR5501"
143
144
145
146
147
148
149
150
151
152
153
]
select = [
    # flake8-bugbear
    "B",
    # flake8-comprehensions
    "C4",
    # pydocstyle
    "D",
    # pycodestyle
    "E",
    # pyflakes
154
    "F",
155
156
    # pylint
    "PL",
157
158
159
160
161
162
    # flake8-return: unnecessary assignment before return
    "RET504",
    # flake8-simplify: use dict.get() instead of an if-else block
    "SIM401",
    # flake8-print
    "T",
163
164
]

165
166
167
168
169
170
171
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = [
    # (flake8-bugbear) raise exceptions with "raise ... from errr"
    "B904",
    # (flake8-print) flake8-print
    "T"
]
172
173
"examples/*" = [
    # pydocstyle
174
175
176
    "D",
    # flake8-print
    "T"
177
]
178
179
180
181
"python-package/lightgbm/basic.py" = [
    # (pylint) Using the global statement is discouraged
    "PLW0603"
]
182
183
184
185
"tests/*" = [
    # (flake8-bugbear) Found useless expression
    "B018",
    # pydocstyle
186
187
188
    "D",
    # flake8-print
    "T"
189
190
]

191
[tool.ruff.lint.pydocstyle]
192
convention = "numpy"