Files
anki-hsk-creator/pyproject.toml
2026-06-11 16:41:34 +08:00

168 lines
3.7 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
dynamic = ["version"]
name = "anki-hsk-creator"
description = "A tool for analaizing chinese text and generating anki cards for studying"
readme = "README.md"
requires-python = ">=3.8"
license = "GPL-3.0-or-later"
license-files = ["LICENSE"]
keywords = []
authors = [
{ name = "Wolfang Torres", email = "wolfang.torres@gmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"cedict-utils",
"pinyin-tone-converter",
"genanki",
"argostranslate",
"chatterbox-tts",
"torch",
"torchaudio",
"torchcodec",
]
[project.optional-dependencies]
dev = [
"pytest",
"black",
"pylint",
"flakehell"
]
[project.urls]
Documentation = "https://gitea.wolfang.info.ve/wolfang/anki-hsk-creator/wiki"
Issues = "https://gitea.wolfang.info.ve/wolfang/anki-hsk-creator/issues"
Source = "https://gitea.wolfang.info.ve/wolfang/anki-hsk-creator"
[tool.hatch.version]
path = "src/anki-hsk-creator/__about__.py"
[tool.hatch.build.targets.sdist]
include = [
"src/anki-hsk-creator/cedict_ts.u8",
]
[tool.hatch.build.targets.wheel]
packages = ["src/anki-hsk-creator"]
include = [
"src/anki-hsk-creator/cedict_ts.u8",
]
[tool.hatch.envs.default]
extra-dependencies = [
"anki-hsk-creator[dev]",
]
[tool.hatch.envs.default.scripts]
format = "black --target-version=py314 anki-hsk-creator tests && isort anki-hsk-creator tests"
[tool.hatch.envs.types]
extra-dependencies = [
"mypy>=1.0.0",
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/anki-hsk-creator tests}"
[tool.coverage.run]
source_pkgs = ["anki-hsk-creator", "tests"]
branch = true
parallel = true
omit = [
"src/anki-hsk-creator/__about__.py",
]
[tool.coverage.paths]
anki-hsk-creator = ["src/anki-hsk-creator", "*/anki-hsk-creator/src/anki-hsk-creator"]
tests = ["tests", "*src/anki-hsk-creator/tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.black]
line-length = 88
include = '\.pyi?$'
exclude = '''
(
\.eggs
| \.git
| \.venv
| build
| dist
)
'''
[tool.isort]
src_paths = ["src", "test"]
skip_glob = [".git", "__pycache__", ".vscode", "*venv", "build", "dist", "old", "*.egg-info"]
line_length = 88
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
verbose = false
case_sensitive = true
length_sort = false
balanced_wrapping = true
atomic = true
import_heading_stdlib = "Standard Library"
import_heading_thirdparty = "Pip"
import_heading_firstparty = "First Party"
import_heading_localfolder = "Local"
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
[tool.pylint.messages_control]
disable = "C0330, C0326"
[tool.pylint.format]
max-line-length = "88"
[tool.pylint.reports]
output-format="text"
msg-template="{path}:{module}:{line}: [{msg_id}({symbol}), {obj}] {msg}"
[tool.pylint.logging]
logging-format-style="new"
logging-modules="logging"
[tool.flakehell]
max_line_length = 88
format = "grouped"
show_source = false
exclude = [
".git",
"__pycache__",
".vscode",
"*venv",
"build",
"dist",
"old",
"*.egg-info",
]
[tool.flakehell.plugins]
mccabe = ["+C*"]
pycodestyle = ["+E*", "+W*", "-E203", "-E501", "-W503"]
pyflakes = ["+F*"]
flake8-bugbear = ["+*", "+B950"]