-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
150 lines (135 loc) · 5.08 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
[tool.poetry]
name = "rhoknp"
version = "1.7.0"
description = "Yet another Python binding for Juman++/KNP/KWJA"
license = "MIT"
authors = [
"Hirokazu Kiyomaru <[email protected]>",
"Nobuhiro Ueda <[email protected]>",
]
maintainers = [
"Hirokazu Kiyomaru <[email protected]>",
"Nobuhiro Ueda <[email protected]>",
]
readme = "README.md"
homepage = "https://github.com/ku-nlp/rhoknp"
repository = "https://github.com/ku-nlp/rhoknp"
documentation = "https://rhoknp.readthedocs.io/en/latest"
keywords = ["NLP", "Japanese", "Juman++", "KNP", "KWJA"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Natural Language :: Japanese",
"Operating System :: MacOS",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing",
"Topic :: Text Processing :: Linguistic",
]
[tool.poetry.dependencies]
python = ">=3.8"
typing-extensions = { version = ">=4.4", python = "<3.12" }
typer = { version = ">=0.7", optional = true }
PyYAML = { version = "^6.0", optional = true }
rich = { version = ">=12.6", optional = true }
uvicorn = { version = ">=0.21.0", optional = true }
fastapi = { version = ">=0.92.0", optional = true }
jinja2 = { version = "^3.1", optional = true }
pygments = { version = "^2.16", optional = true }
[tool.poetry.group.dev.dependencies]
ipython = [
{ version = "~8.12.1", python = "3.8" },
{ version = "^8.13", python = ">=3.9" },
]
ipdb = "^0.13.13"
setuptools = ">=69,<71" # https://stackoverflow.com/questions/75307814/error-python-packaging-tool-setuptools-not
[tool.poetry.group.test.dependencies]
pytest = "^7.2"
coverage = { version = "^7.3", extras = ["toml"] }
pytest-cov = "^4.1"
httpx = ">=0.25,<0.27"
[tool.poetry.group.docs.dependencies]
Sphinx = "^7.0"
sphinx-prompt = [
{ version = "^1.6", python = ">=3.8,<3.9" },
{ version = "^1.8", python = ">=3.9,<4.0" },
]
sphinx-copybutton = "^0.5.0"
myst-parser = "^2.0"
markdown-it-py = "^3.0"
furo = "^2023.9"
typing-extensions = ">=4.4"
[tool.poetry.extras]
cli = ["typer", "PyYAML", "rich", "uvicorn", "fastapi", "jinja2", "pygments"]
[tool.poetry.scripts]
rhoknp = "rhoknp.cli.cli:app"
[tool.mypy]
python_version = 3.8
[tool.ruff]
line-length = 120
indent-width = 4
src = ["src"]
target-version = "py38"
ignore = [
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"E501", # Line too long
"RUF001", # String contains ambiguous `ノ` (KATAKANA LETTER NO). Did you mean `/` (SOLIDUS)?
"RUF002", # Docstring contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
"RUF003", # Comment contains ambiguous `(` (FULLWIDTH LEFT PARENTHESIS). Did you mean `(` (LEFT PARENTHESIS)?
"COM812", # Trailing comma missing
"PLR2004", # Magic value used in comparison
"D100", # Missing docstring in public module
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"D301", # Use `r"""` if any backslashes in a docstring
"D403", # First word of the first line should be properly capitalized
"D415", # First line should end with a period, question mark, or exclamation point
"ANN002", # Missing type annotation for `*args`
"ANN003", # Missing type annotation for `**kwargs`
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
]
select = ["F", "E", "W", "I", "B", "PL", "PD", "NPY", "RUF", "UP", "TID", "COM", "PT", "D", "ARG", "PYI", "ANN"]
[tool.ruff.per-file-ignores]
"__init__.py" = [
"D104" # Missing docstring in public package
]
"tests/*" = ["D"]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["typer.Argument", "typer.Option"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.coverage.run]
omit = ["tests/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__", # Do not complain about missing debug-only code
"except ImportError", # Do not complain about packages we have installed
# Do not complain if tests do not hit defensive assertion code
"raise AssertionError",
"raise NotImplementedError",
"raise ImportError",
# Do not complain if non-runnable code is not run
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"@(abc\\.)?abstractmethod", # Do not complain about abstract methods
"@overload", # Do not complain about overloads
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"