-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (130 loc) · 3.95 KB
/
Copy pathpyproject.toml
File metadata and controls
143 lines (130 loc) · 3.95 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
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
[build-system]
requires = ["hatchling>=1.24"]
build-backend = "hatchling.build"
[project]
name = "fasttext-langdetect"
version = "1.1.1"
description = "80x faster and 95% accurate language identification with fastText"
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
authors = [
{ name = "Zafer Cavdar", email = "zafercvdr@gmail.com" },
]
keywords = [
"fasttext",
"langdetect",
"language-detection",
"language-identification",
"nlp",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"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",
"Topic :: Text Processing :: Linguistic",
"Typing :: Typed",
]
dependencies = [
# fasttext-predict is a minimal, prediction-only fork of fastText that
# ships prebuilt wheels for Linux, macOS, and Windows on Python
# 3.9-3.13 (including free-threaded 3.13t) and has no NumPy
# dependency. It exposes the same `import fasttext` namespace, so the
# code below is identical regardless of which fasttext variant a user
# has installed. Choosing this fork:
# * makes `pip install fasttext-langdetect` work out of the box on
# Windows and Python 3.13 (see issue #14),
# * removes the NumPy>=2 crash entirely since the predict path never
# constructs ndarrays (see issue #17), and
# * cuts the install size from ~3 MB to ~100 KB.
"fasttext-predict>=0.9.2.4",
"requests>=2.28.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"ruff>=0.6",
"pre-commit>=3.5",
"build>=1.0",
"twine>=4.0",
]
[project.urls]
Homepage = "https://github.com/zafercavdar/fasttext-langdetect"
Repository = "https://github.com/zafercavdar/fasttext-langdetect"
Issues = "https://github.com/zafercavdar/fasttext-langdetect/issues"
Changelog = "https://github.com/zafercavdar/fasttext-langdetect/releases"
[tool.hatch.build.targets.wheel]
packages = ["src/ftlangdetect"]
[tool.hatch.build.targets.sdist]
include = [
"src/ftlangdetect",
"tests",
"README.md",
"LICENSE",
"pyproject.toml",
]
[tool.ruff]
line-length = 100
target-version = "py39"
extend-exclude = [".venv", "build", "dist"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
"RUF", # ruff-specific rules
"N", # pep8-naming
"PL", # pylint
"PTH", # use pathlib
"TID", # flake8-tidy-imports
"ARG", # unused arguments
"RET", # flake8-return
]
ignore = [
"PLR2004", # magic numbers in tests are fine
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"PLR2004", # magic numbers
"S101", # asserts
"ARG", # unused args are common in fixtures and signature-matching test doubles
]
[tool.ruff.lint.isort]
known-first-party = ["ftlangdetect"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
[tool.pytest.ini_options]
minversion = "7.0"
addopts = ["-ra", "--strict-markers", "--strict-config"]
testpaths = ["tests"]
xfail_strict = true
[tool.coverage.run]
branch = true
source = ["ftlangdetect"]
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]