pyproject.toml
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "lenskit"
description = "Toolkit for recommender systems research, teaching, and more."
authors = [
{ name = "Michael Ekstrand", email = "mdekstrand@drexel.edu" },
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
]
requires-python = ">= 3.10"
readme = "README.md"
license = { file = "LICENSE.md" }
dynamic = ["version"]
dependencies = [
"pandas >=1.5, <3",
"numpy >= 1.23",
"scipy >= 1.9.0",
"numba >= 0.56, < 0.59",
"cffi >= 1.15.0",
"torch ~=2.1", # p2c: -s pytorch==2.*
"threadpoolctl >=3.0",
"binpickle >= 0.3.2",
"seedbank >= 0.2.0a1", # p2c: -p
"progress-api >=0.1.0a9", # p2c: -p
"manylog >=0.1.0a5", # p2c: -p
"csr >= 0.5",
]
[project.optional-dependencies]
dev = [
"setuptools>=64",
"setuptools_scm>=8",
"build ==1.*", # p2c: -s python-build==1
"ruff >= 0.2",
"copier ==9.*",
"unbeheader ~= 1.3", # p2c: -p
"ipython >= 7",
"pyarrow>=15",
"pyproject2conda ~=0.11",
"sphinx-autobuild >= 2021",
"docopt >= 0.6",
"tqdm >= 4",
]
test = [
"pytest ==7.*",
"pytest-doctestplus ==1.*",
"pytest-cov >= 2.12",
"coverage >= 5",
"hypothesis >= 6",
]
doc = [
"sphinx >= 4.2",
"sphinxext-opengraph >= 0.5",
"sphinxcontrib-bibtex >= 2.0",
"sphinx_rtd_theme >= 0.5",
"myst-nb >= 0.13",
]
demo = [
"notebook >= 6",
"nbval >= 0.9",
"matplotlib ~= 3.4",
"nbformat >=5.2",
"ipython >= 7",
]
sklearn = ["scikit-learn >= 1.1"]
[project.urls]
homepage = "https://lenskit.org"
documentation = "https://lkpy.lenskit.org"
source = "https://github.com/lenskit/lkpy"
# configure build tools
[tool.flit.sdist]
include = ["tests/*"]
exclude = [
".github",
"*.ipynb",
"docs",
"data",
"examples",
"build-tools",
"lkbuild",
"tasks.py",
]
[tool.setuptools]
packages = ["lenskit"]
[tool.setuptools_scm]
version_scheme = "release-branch-semver"
# settings for generating conda environments for dev & CI, when needed
[tool.pyproject2conda]
channels = ["conda-forge", "pytorch", "nodefaults"]
python = ["3.10", "3.11"]
default_envs = ["test", "doc"]
template_python = "envs/lenskit-py{py_version}-{env}"
template = "envs/{env}"
deps = ["tbb", "just"]
[tool.pyproject2conda.envs.dev]
extras = ["dev", "test", "doc", "demo", "sklearn"]
deps = ["just==1.*", "tbb"]
[tool.pyproject2conda.envs.ci]
extras = ["test", "sklearn", "dev"]
deps = ["just==1.*", "tbb"]
[tool.ruff]
line-length = 100
target-version = "py310"
exclude = [
".git",
"__pycache__",
"build",
"dist",
]
[tool.ruff.lint]
select = ["E", "F", "I"]
[tool.ruff.lint.isort]
section-order = [
"future",
"standard-library",
"third-party",
"testing",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
testing = ["pytest", "hypothesis"]
[tool.mypy]
exclude = "^docs/"
[tool.pyright]
typeCheckingMode = "basic"
exclude = [
"docs/*",
]
reportMissingImports = true
reportMissingTypeStubs = false