-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
196 lines (180 loc) · 5.21 KB
/
pyproject.toml
File metadata and controls
196 lines (180 loc) · 5.21 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "writescore"
version = "6.5.0"
description = "AI writing pattern analysis and scoring tool"
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.9"
authors = [{name = "BOHICA Labs"}]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Text Processing :: Linguistic",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"marko>=2.0.0",
"nltk>=3.8",
"spacy>=3.7.0",
"textstat>=0.7.3",
"transformers>=4.35.0",
"torch>=2.0.0",
"scikit-learn>=1.3.0",
"scipy>=1.11.0",
"scikit-learn>=1.3.0",
"textacy>=0.13.0",
"numpy>=1.24.0",
"click>=8.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-timeout>=2.2.0",
"psutil>=5.9.0",
"ruff>=0.1.0",
"pre-commit>=3.5.0",
"sentence-transformers>=2.0.0", # Required for figurative_language tests
"types-PyYAML>=6.0.0", # Type stubs for PyYAML
"pyinstaller>=6.0.0", # For building standalone executables
]
semantic = [
"sentence-transformers>=2.0.0",
]
ml = [
"accelerate>=0.20.0",
"datasets>=2.14.0",
]
[project.scripts]
writescore = "writescore.cli.main:cli"
[project.urls]
Homepage = "https://github.com/BOHICA-LABS/writescore"
Repository = "https://github.com/BOHICA-LABS/writescore"
Documentation = "https://github.com/BOHICA-LABS/writescore#readme"
Issues = "https://github.com/BOHICA-LABS/writescore/issues"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
writescore = ["data/*.json", "data/*.txt"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks integration tests",
"accuracy: marks accuracy validation tests",
"performance_local: marks strict performance tests that should only run locally (skipped on CI)",
]
timeout = 300
[tool.coverage.run]
source = ["src/writescore"]
branch = true
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/htmlcov/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]
show_missing = true
[tool.coverage.html]
directory = "htmlcov"
[tool.mypy]
python_version = "3.12"
warn_return_any = false
warn_unused_ignores = true
ignore_missing_imports = true
implicit_optional = true
strict_optional = false
check_untyped_defs = false
disallow_untyped_defs = false
disallow_incomplete_defs = false
no_implicit_reexport = false
# Disable noisy checks for legacy code
disable_error_code = [
"var-annotated", # Don't require type annotations on all variables
"arg-type", # Allow flexible argument types
"return-value", # Allow flexible return types
"assignment", # Allow flexible assignments
"override", # Don't enforce override compatibility
"attr-defined", # Allow dynamic attributes
"call-arg", # Allow flexible call arguments
"index", # Allow flexible indexing
"operator", # Allow flexible operators
"dict-item", # Allow flexible dict items
"valid-type", # Allow flexible type expressions
"misc", # Allow miscellaneous type issues
]
# TODO: Tech Debt - Re-enable these error codes incrementally in future epic
# Priority: override, attr-defined, assignment, return-value, arg-type
exclude = [
"/opt/homebrew/anaconda3/",
".*/site-packages/mcp/.*",
]
# Per-module overrides for third-party libraries
[[tool.mypy.overrides]]
module = [
"marko.*",
"scipy.*",
"textstat.*",
"textacy.*",
"transformers.*",
"torch.*",
"spacy.*",
"nltk.*",
"sentence_transformers.*",
"yaml",
"yaml.*",
]
ignore_missing_imports = true
ignore_errors = true
[[tool.mypy.overrides]]
module = ["mcp", "mcp.*"]
follow_imports = "skip"
ignore_missing_imports = true
ignore_errors = true
[tool.ruff]
line-length = 100
target-version = "py39"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # function call in default argument
"SIM108", # ternary operator
"UP006", # use builtin types (dict/list/tuple) - pre-existing code style
"UP035", # deprecated typing imports - pre-existing code style
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "PLR2004"] # allow assert and magic values in tests
[tool.ruff.lint.isort]
known-first-party = ["writescore"]