-
Notifications
You must be signed in to change notification settings - Fork 340
Expand file tree
/
Copy pathpyproject.toml
More file actions
162 lines (147 loc) · 4.15 KB
/
Copy pathpyproject.toml
File metadata and controls
162 lines (147 loc) · 4.15 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
[project]
name = "cltk"
version = "2.5.1"
description = "The Classical Language Toolkit"
authors = [
{name = "Kyle P. Johnson", email = "kyle@kyle-p-johnson.com"},
{name = "Clément Besnier", email = "clem@clementbesnier.fr"},
]
readme = { file = "README.md", content-type = "text/markdown" }
keywords = ["nlp", "ai", "nltk", "latin", "greek", "sanskrit", "hebrew", "arabic", "chinese"]
requires-python = ">=3.13"
dependencies = [
"tqdm (>=4.67.1,<5.0.0)",
"python-dotenv (>=1.1.1,<2.0.0)",
"pydantic (>=2.11.7,<3.0.0)",
"colorama (>=0.4.6,<0.5.0)",
"numpy (>=2.3.2,<3.0.0)"
]
[project.optional-dependencies]
openai = [
"openai (>=1.101.0,<2.0.0)",
]
stanza = [
"stanza (>=1.8.2,<2.0.0)",
]
ollama = [
"ollama (>=0.3.0,<1.0.0)",
"httpx (<0.29)", # pinned since ollama pulls a beta httpx with breaking changes
]
mistral = [
"mistralai (>=1.9.0,<2.0.0)",
]
[project.urls]
Homepage = "http://cltk.org"
Repository = "https://github.com/cltk/cltk"
Documentation = "https://docs.cltk.org"
[project.scripts]
cltk = "cltk.cli.main:main"
[build-system]
requires = ["hatchling>=1.25.0"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/cltk"]
[dependency-groups]
development = [
"mypy>=1.17.1,<2.0.0",
"colorama>=0.4.6,<0.5.0",
"lxml>=6.0.1,<7.0.0",
"ruff>=0.6.0,<0.7.0",
"pre-commit>=3.7.0,<4.0.0",
"pytest>=8.3.2,<9.0.0",
"pytest-cov>=5.0.0,<6.0.0",
"pytest-mock>=3.14.0,<4.0.0",
"syrupy>=4.6.0,<5.0.0",
"hypothesis>=6.112.0,<7.0.0",
"mkdocs>=1.6.1,<2.0.0",
"mkdocs-material>=9.6.20,<10.0.0",
"mkdocstrings[python]>=0.27.0,<0.28.0",
"mkdocs-gen-files>=0.5.0,<0.6.0",
"mkdocs-literate-nav>=0.6.2,<0.7.0",
"mkdocs-section-index>=0.3.10,<0.4.0",
"mkdocs-autorefs>=1.4.3,<2.0.0",
"mkdocs-git-revision-date-localized-plugin>=1.4.7,<2.0.0",
"pymdown-extensions>=10.8,<11.0.0",
"griffe>=1.14.0,<2.0.0",
"interrogate>=1.7.0,<2.0.0",
"black>=25.9.0,<26.0.0",
]
dev = [
"types-requests>=2.32.4.20250913,<3.0.0",
"pyarrow>=22.0.0,<23.0.0",
]
[tool.uv]
default-groups = ["development", "dev"]
[tool.ruff]
target-version = "py313"
line-length = 88
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
select = ["E", "F", "I", "D"]
# Keep lines long where appropriate; relax docstring ‘blank line’ and
# multi-line summary rules for Google style; do not fail on missing docstrings.
ignore = [
"E501",
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D203", # One-blank-line before class docstring
"D213", # Multi-line docstring summary should start at the second line
]
fixable = ["E", "F", "I", "D"]
unfixable = []
[tool.ruff.lint.isort]
known-first-party = ["cltk"]
combine-as-imports = true
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_ignores = true
no_implicit_optional = true
check_untyped_defs = true
disallow_untyped_defs = true
pretty = true
show_error_codes = true
namespace_packages = true
explicit_package_bases = true
mypy_path = "src"
plugins = ["pydantic.mypy"]
exclude = 'temp_.*|^scripts/tlg_example\.py$'
# Interrogate: docstring coverage (non-blocking; run locally or in optional CI job)
[tool.interrogate]
ignore-init-method = true
ignore-init-module = true
ignore-magic = true
ignore-private = true
ignore-property-decorators = true
fail-under = 0
exclude = ["tests", "docs", "v1_backup", "site"]
verbose = 1
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra -m 'not integration'"
markers = ["integration: integration tests (opt-in)"]
xfail_strict = true
filterwarnings = [
"error::DeprecationWarning",
"error::PendingDeprecationWarning",
]
[[tool.mypy.overrides]]
module = [
"openai.*",
"tqdm.*",
"colorama.*",
"stanza",
"stanza.*",
"ollama",
"ollama.*",
]
ignore_missing_imports = true