-
Notifications
You must be signed in to change notification settings - Fork 15
/
pyproject.toml
223 lines (195 loc) · 4.77 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
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
[build-system]
requires = ["setuptools>=61.0.0", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"
[project]
name = "asent"
version = "0.8.3"
description = "A python package for flexible and transparent sentiment analysis."
authors = [
{ name = "Kenneth Enevoldsen", email = "kennethcenevoldsen@gmail.com" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]
keywords = [
"nlp",
"sentiment analysis",
"spacy",
"spaCy",
"spaCy 3",
"text analysis",
"aspect-based sentiment analysis",
"ABSA",
]
requires-python = ">=3.9"
dependencies = ["spacy>=3.0.0", "matplotlib>=3.5.0"]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.license]
file = "LICENSE"
name = "MIT"
[project.urls]
Homepage = "https://github.com/KennethEnevoldsen/asent"
repository = "https://github.com/KennethEnevoldsen/asent"
documentation = "https://kennethenevoldsen.github.io/asent/"
[project.optional-dependencies]
da = ["dacy>=1.1.0"]
all = ["nltk>=3.6.7"]
tests = ["pytest>=7.1.3", "pytest-cov>=3.0.0"]
docs = [
"sphinx==5.3.0",
"furo==2022.12.7",
"sphinx-copybutton>=0.5.1",
"sphinxext-opengraph>=0.7.3",
"sphinx_design>=0.3.0",
"myst-nb>=0.6.0",
"black>=22.12.0",
"pre-commit>=2.20.0",
"ruff>=0.0.263",
"pyright==1.1.325",
"jupyter>=1.0.0",
]
[tool.coverage.run]
omit = ["**/tests/*", "**/_vendorized/*", "**/about.py"]
exclude_lines = [
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __unicode__",
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
]
[tool.mypy]
ignore_missing_imports = true
no_implicit_optional = true
exclude = "dev/"
[tool.setuptools.package-data]
"*" = ["*.csv", "*.json", "*.txt"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.distutils.bdist_wheel]
universal = true
[tool.distutils.sdist]
formats = "gztar"
[tool.pyright]
exclude = [".*venv*", ".tox"]
pythonPlatform = "Darwin"
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = [
"A",
"ANN",
"ARG",
"B",
"C4",
"COM",
"D417",
"E",
"ERA",
"F",
"I",
"ICN",
"NPY001",
"PD002",
"PIE",
"PLE",
"PLW",
"PT",
"UP",
"Q",
"PTH",
"RSE",
"RET",
"RUF",
"SIM",
"W",
]
ignore = ["ANN101", "ANN401", "E402", "E501", "F401", "F841", "RET504"]
ignore-init-module-imports = true
# Allow autofix for all enabled rules (when `--fix`) is provided.
unfixable = ["ERA"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"__init__.py",
"docs/conf.py",
"dev/**",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py39"
[tool.ruff.flake8-annotations]
mypy-init-return = true
suppress-none-returning = true
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.semantic_release]
branch = "main"
version_toml = ["pyproject.toml:project.version"]
build_command = "python -m pip install build; python -m build"
[tool.setuptools]
include-package-data = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py{39,310}
[testenv]
description: run unit tests
extras = tests
use_develop = true
commands =
pip install -r tests/requirements.txt
pytest
[testenv:type]
allowlist_externals = pyright
description: run type checks
extras = tests, dev
basepython = py39 # Setting these explicitly avoid recreating env if your shell is set to a different version
use_develop = true
commands =
pyright src/
[testenv:docs]
description: build docs
extras = docs
basepython = py39 # Setting these explicitly avoid recreating env if your shell is set to a different version
use_develop = true
commands =
sphinx-build -b html docs docs/_build/html
"""