[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",
    "Programming Language :: Python :: 3.11",
    "Topic :: Scientific/Engineering :: Artificial Intelligence"
]
dependencies = [
    "dataclasses ; python_version < '3.7'",
    "numpy",
    "scipy"
]
description = "LightGBM Python Package"
license = {file = "LICENSE"}
maintainers = [
  {name = "Yu Shi", email = "yushi@microsoft.com"}
]
name = "lightgbm"
readme = "README.rst"
requires-python = ">=3.6"
version = "4.3.0.99"

[project.optional-dependencies]
arrow = [
    "cffi>=1.15.1",
    "pyarrow>=6.0.1"
]
dask = [
    "dask[array,dataframe,distributed]>=2.0.0",
    "pandas>=0.24.0"
]
pandas = [
    "pandas>=0.24.0"
]
scikit-learn = [
    "scikit-learn!=0.22.0"
]

[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]

cmake.minimum-version = "3.18"
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

[tool.isort]
line_length = 120
skip_glob = [
    "*/external_libs/*",
    "*/lightgbm-python/*"
]

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

[tool.ruff]
exclude = [
    "build",
    "compile",
    "external_libs",
    "lightgbm-python",
]
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",
    "examples/*.py",
    "external_libs/*.py",
    "lightgbm-python/*.py",
    "python-package/*.py",
    "tests/*.py"
]
indent-style = "space"
quote-style = "double"

[tool.ruff.lint]
ignore = [
    # (pydocstyle) Missing docstring in magic method
    "D105",
    # (pycodestyle) Line too long
    "E501"
]
select = [
    # flake8-bugbear
    "B",
    # flake8-comprehensions
    "C4",
    # pydocstyle
    "D",
    # pycodestyle
    "E",
    # pyflakes
    "F",
    # flake8-return: unnecessary assignment before return
    "RET504",
    # flake8-simplify: use dict.get() instead of an if-else block
    "SIM401",
    # flake8-print
    "T",
]

[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = [
    # (flake8-bugbear) raise exceptions with "raise ... from errr"
    "B904",
    # (flake8-print) flake8-print
    "T"
]
"examples/*" = [
    # pydocstyle
    "D",
    # flake8-print
    "T"
]
"tests/*" = [
    # (flake8-bugbear) Found useless expression
    "B018",
    # pydocstyle
    "D",
    # flake8-print
    "T"
]

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