Files
anki-hsk-creator/pyproject.toml
Wolfang Torres eb4cc8e6e0 update format for anki,
upgrade trasnlation package search,
fix small bugs
2026-06-12 00:43:55 +08:00

195 lines
4.2 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",
"python-dotenv",
]
[project.optional-dependencies]
dev = [
"pytest",
"black",
"pylint",
"flake8",
"flake8-pyproject",
# "flakeheaven",
]
[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]
packages = ["src/anki_hsk_creator"]
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 src tests && isort src tests"
lint = "flake8 src"
[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 = ["src", "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.flake8]
max_line_length = 88
show_source = false
exclude = [
".git",
"__pycache__",
".vscode",
"*venv",
"build",
"dist",
"old",
"*.egg-info",
]
[tool.flake8.plugins]
mccabe = ["+C*"]
pycodestyle = ["+E*", "+W*", "-E203", "-E501", "-W503"]
pyflakes = ["+F*"]
flake8-bugbear = ["+*", "+B950"]
# [tool.flakeheaven]
# max_line_length = 88
# format = "grouped"
# show_source = false
# exclude = [
# ".git",
# "__pycache__",
# ".vscode",
# "*venv",
# "build",
# "dist",
# "old",
# "*.egg-info",
# ]
# [tool.flakeheaven.plugins]
# mccabe = ["+C*"]
# pycodestyle = ["+E*", "+W*", "-E203", "-E501", "-W503"]
# pyflakes = ["+F*"]
# flake8-bugbear = ["+*", "+B950"]