-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathpyproject.toml
157 lines (137 loc) · 4.11 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[build-system]
requires = ["hatchling ~=1.0", "hatch-vcs ~=0.4.0"]
build-backend = "hatchling.build"
[project]
name = "lenskit"
description = "Toolkit for recommender systems research, teaching, and more."
authors = [{ name = "Michael Ekstrand", email = "[email protected]" }]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
]
requires-python = ">= 3.11"
readme = "README.md"
license = { file = "LICENSE.md" }
dynamic = ["version"]
dependencies = [
"typing-extensions ~=4.12",
"pandas ~=2.0",
"pyarrow >=15",
"numpy >=1.25",
"scipy >=1.11",
"torch ~=2.4",
"more-itertools >=9.0",
"threadpoolctl >=3.0",
"structlog >=23.2",
"rich ~=13.5",
"pyzmq >=24",
"click ~=8.1",
"pydantic ~=2.7",
"humanize ~=4.2",
"prettytable ~=3.14",
]
[project.optional-dependencies]
sklearn = ["scikit-learn ~=1.2"]
funksvd = ["numba >= 0.56"]
hpf = ["hpfrec==0.2.*"]
implicit = ["implicit >=0.7.2"]
notebook = ["ipywidgets ~=8.0"]
ray = ["ray ~=2.42"]
# test deps — keep synchronized with pixi.toml
test = [
"pytest >=8.2,<9",
"pytest-doctestplus >=1.2.1,<2",
"pytest-cov >=2.12",
"pytest-benchmark ==4.*",
"pytest-repeat >=0.9",
"hypothesis >=6.16",
"pyprojroot ==0.3.*",
]
[project.urls]
homepage = "https://lenskit.org"
documentation = "https://lkpy.lenskit.org"
source = "https://github.com/lenskit/lkpy"
[project.scripts]
lenskit = "lenskit.cli:lenskit"
[project.entry-points."lenskit.cli.plugins"]
lenskit-data = "lenskit.cli.data:data"
# configure build tools
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.sdist]
include = ["src/lenskit", "LICENSE.md", "README.md"]
[tool.hatch.build.targets.wheel]
packages = ["src/lenskit"]
[tool.hatch.version]
source = "vcs"
raw-options = { version_scheme = "guess-next-dev" }
[tool.hatch.build.hooks.vcs]
version-file = "src/lenskit/_version.py"
# override where UV gets pytorch for CI installs
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.uv.sources]
torch = [{ index = "pytorch-cpu" }]
# dev tool configuration
[tool.coverage.run]
relative_files = "true"
include = ["src/lenskit/"]
omit = ["src/lenskit/_version.py"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I"]
unfixable = ["F401"]
exclude = [".git", "__pycache__", "build", "dist"]
[tool.ruff.lint.per-file-ignores]
# Importing PyTest fixtures triggers F811
"tests/*.py" = ["F811", "F401"]
[tool.ruff.lint.isort]
section-order = [
"future",
"standard-library",
"third-party",
"testing",
"first-party",
"local-folder",
]
known-first-party = ["lenskit"]
[tool.ruff.lint.isort.sections]
testing = ["pytest", "hypothesis"]
[tool.pyright]
typeCheckingMode = "basic"
exclude = ["docs/*", ".pixi", ".venv"]
reportMissingImports = true
reportMissingTypeStubs = false
[tool.pytest.ini_options]
log_level = "INFO"
log_format = "[%(levelname)7s] [%(processName)s] %(name)s %(message)s"
log_cli_format = "[%(levelname)7s] %(asctime)s [%(processName)s] %(name)s %(message)s"
log_file_format = "[%(levelname)7s] %(asctime)s [%(processName)s] %(name)s %(message)s"
log_file_level = "DEBUG"
addopts = "--import-mode=importlib --benchmark-skip"
doctest_plus = true
doctest_subpackage_requires = ["src/lenskit/hpf.py = hpfrec"]
consider_namespace_packages = true
filterwarnings = [
"ignore:::pyarrow[.*]",
"ignore:.*matrix subclass.*:PendingDeprecationWarning",
"ignore:.*np.asscalar.*:DeprecationWarning",
"ignore:.*deprecated create function*:DeprecationWarning",
"ignore:.*importing the ABCs*:DeprecationWarning",
"ignore:.*use_ratings option.*:UserWarning",
"ignore:.*tensor support is in beta state.*:UserWarning",
]
markers = [
"eval: mark the test as running the evaluator over custom data",
"slow: mark the test as taking a larger-than-usual amount of time",
"realdata: mark the test as using a real data set like ML-20M",
]