[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "hlink"
version = "4.0.0b1"
description = "Fast supervised pyspark record linkage software"
readme = "README.md"
requires-python = ">=3.10"
license = {file = "LICENSE.txt"}
classifiers = [
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
]
dependencies = [
    "colorama>=0.4.6",
    "ipython>=8.3.0",
    "Jinja2>=3.1.0",
    "numpy>=1.22.0",
    "pandas>=1.4.0",
    "pyspark~=3.5.0",
    "scikit-learn>=1.1.0",
    "toml>=0.10.0",
    "tomli>=2.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=7.1.0",
    "hypothesis>=6.0",
    "black>=23.0",
    "flake8>=5.0",
    "pre-commit>=2.0",
    "twine>=4.0",
    "build>=0.6",
    # setuptools is only necessary because Python 3.12 removed the distutils
    # package. pyspark 3.5.X still imports this package, so we need it on
    # Python 3.12 to run the tests and have hlink work at all.
    "setuptools",
    # These are pinned so tightly because their version numbers appear in the docs.
    # So if you use a different version, it creates a huge diff in the docs.
    # TODO: auto-generate docs on push to GitHub instead of committing them to the
    # repo.
    "sphinx==8.1.3",
    "recommonmark==0.7.1",
]
lightgbm = [
    "synapseml>=1.0"
]
xgboost = [
    "xgboost>=2.0",
    "pyarrow>=4.0",
    # As of 2024-12-10, the latest scikit-learn version (1.6.0) is incompatible
    # with the latest xgboost version (2.1.3). scikit-learn 1.6.0 came out
    # yesterday, 2024-12-09, so I'm guessing that this a temporary bug that
    # will be resolved with an update to one of the two libraries sometime
    # sooner rather than later. Until then, we can pin scikit-learn to < 1.6
    # when using xgboost.
    "scikit-learn<1.6.0",
]

[project.scripts]
hlink = "hlink.scripts.main:cli"

[project.urls]
Homepage = "https://github.com/ipums/hlink"
Documentation = "https://hlink.docs.ipums.org"
Repository = "https://github.com/ipums/hlink"
Changelog = "https://github.com/ipums/hlink/releases"

[tool.setuptools.packages.find]
where = ["."]
include = ["hlink*"]
exclude = ["hlink_config"]
