-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (84 loc) · 3.4 KB
/
Copy pathpyproject.toml
File metadata and controls
95 lines (84 loc) · 3.4 KB
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
[build-system]
requires = ["hatchling>=1.27"]
build-backend = "hatchling.build"
[project]
name = "hyperhyper"
version = "0.3.0"
description = "Python package to construct word embeddings for small data"
readme = "README.md"
requires-python = ">=3.10,<3.14"
license = "BSD-2-Clause"
license-files = ["LICENSE"]
authors = [{ name = "Johannes Filter", email = "hi@jfilter.de" }]
keywords = ["natural-language-processing", "word-embeddings", "ppmi", "pmi", "pmi-svd"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
]
dependencies = [
# 2.0 is the floor, not 1.6: dataset 1.x predates SQLAlchemy 2 and dies with
# `add_column() takes 3 positional arguments but 4 were given`. Found by the
# `floor` CI job, which resolved 1.6.0 on 3.10 while 3.13 already got 2.0.0.
"dataset>=2,<3",
"gensim>=4.4,<5",
"numpy>=1.26",
# 1.12 is the floor, not 1.11: sparse.diags_array (used by calc_pmi and the
# subsampling scaling) was added in 1.12. Enforced by the `floor` CI job.
"scipy>=1.12",
"tqdm>=4.66",
]
[project.optional-dependencies]
# click is not ours: spacy 3.8's cli/_util.py does `from click import NoSuchOption`
# without declaring click, and typer >=0.13 no longer pulls it in -- so `import spacy`
# fails outright without this. Capped at <9 because that undeclared import is not
# covered by any compatibility promise (click 8.4 already warns about 9.1 removals).
full = ["scikit-learn>=1.4", "spacy>=3.7,<4", "click>=8.1,<9"]
[project.urls]
Homepage = "https://github.com/jfilter/hyperhyper"
Repository = "https://github.com/jfilter/hyperhyper"
Issues = "https://github.com/jfilter/hyperhyper/issues"
[dependency-groups]
# pytest floored at 9.0.3 for GHSA-6w46-j5rx-g56g (tmpdir handling); dev-only.
dev = [
"pytest>=9.0.3",
"ruff>=0.9",
"scikit-learn>=1.4",
"spacy>=3.7,<4",
"click>=8.1,<9",
]
[tool.hatch.build.targets.wheel]
packages = ["hyperhyper"]
[tool.hatch.build.targets.sdist]
# `/bench` and `/tools` are in the sdist because the test suite imports them
# (`bench.reference` pins pair-count equivalence, `tools.build_domain_tasks` is
# tested directly), so an sdist without them cannot run its own tests. Neither is
# in the wheel: they are maintainer tooling, not runtime code.
include = ["/hyperhyper", "/tests", "/bench", "/tools", "/README.md", "/LICENSE"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra --strict-markers"
markers = ["slow: requires the spaCy model / network"]
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.lint]
select = ["E", "W", "F", "I", "UP", "B", "C4", "SIM", "A", "T20", "G", "LOG", "ERA", "RUF"]
extend-select = ["E714", "E722", "S101"]
ignore = ["E501"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "T20"]
# the benchmark's whole output is a printed table; `reference.py` is a frozen
# snapshot of pair_counts.py and is deliberately kept verbatim
"bench/**" = ["T20"]
# the importer is a maintainer CLI: its progress and provenance report *is* its
# output, and it is not shipped in the wheel
"tools/**" = ["T20"]
[tool.ruff.format]
docstring-code-format = true