-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
103 lines (94 loc) · 2.42 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
[project]
name = "sklearn-ann"
description = "Various integrations for ANN (Approximate Nearest Neighbours) libraries into scikit-learn."
authors = [
{ name = "Frankie Robertson", email = "[email protected]" },
{ name = "Philipp Angerer", email = "[email protected]" }
]
license = "BSD-3-Clause"
urls.Source = "https://github.com/scikit-learn-contrib/sklearn-ann"
urls.Documentation = "https://sklearn-ann.readthedocs.io/"
dynamic = ["version", "readme"]
requires-python = "<3.13,>=3.9" # enforced by scipy
dependencies = [
"scikit-learn>=0.24.0",
"scipy>=1.11.1,<2.0.0",
]
[project.optional-dependencies]
tests = [
"pytest>=6.2.1",
"pytest-cov>=2.10.1",
]
docs = [
"sphinx>=7",
"sphinx-gallery>=0.8.2",
"sphinx-book-theme>=1.1.0rc1",
"sphinx-issues>=1.2.0",
"numpydoc>=1.1.0",
"matplotlib>=3.3.3",
"scanpydoc",
]
annoy = [
"annoy>=1.17.0,<2.0.0",
]
faiss = [
"faiss-cpu>=1.6.5,<2.0.0",
]
pynndescent = [
"pynndescent>=0.5.1,<1.0.0",
]
nmslib = [
"nmslib>=2.1.1,<3.0.0 ; python_version < '3.11'",
]
annlibs = [
"sklearn-ann[annoy,faiss,pynndescent,nmslib]",
]
[tool.hatch.version]
source = "vcs"
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/x-rst"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.rst"
start-after = ".. inclusion-marker-do-not-remove\n\n"
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
]
# Flaky tests should be marked as xfail(strict=False),
# this will notify us when a test considered broken starts succeeding.
xfail_strict = true
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # Pycodestyle errors
"W", # Pycodestyle warnings
"I", # Isort
"UP", # Pyupgrade
"PT", # Pytest style
"PTH", # Pathlib
"RUF", # Ruff’s own rules
"T20", # print statements
]
ignore = [
# Don’t complain about “confusables”
"RUF001", "RUF002", "RUF003"
]
[tool.ruff.lint.per-file-ignores]
"examples/*.py" = ["E402", "T20"]
"tests/*.py" = ["T20"]
[tool.ruff.lint.isort]
known-first-party = ["sklearn_ann"]
[tool.hatch.envs.default]
features = [
"tests",
"docs",
"annlibs",
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
build-docs = "sphinx-build -M html docs docs/_build"
[tool.hatch.build.targets.wheel]
packages = ["src/sklearn_ann"]
[build-system]
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"