116 lines
2.7 KiB
TOML
116 lines
2.7 KiB
TOML
[build-system]
|
|
requires = ["hatchling>=1.25"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "genshin-tcg"
|
|
version = "0.1.0"
|
|
description = "Pipeline to generate printable Genshin Impact TCG cards (PNG + A4 imposition PDF) from paimon-moe data."
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = { text = "MIT" }
|
|
authors = [{ name = "Genshin TCG Tool" }]
|
|
keywords = ["genshin", "tcg", "cards", "pdf", "print", "playwright", "reportlab"]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Environment :: Console",
|
|
"Intended Audience :: End Users/Desktop",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
|
|
]
|
|
dependencies = [
|
|
"beautifulsoup4>=4.12",
|
|
"httpx>=0.27",
|
|
"jinja2>=3.1",
|
|
"pillow>=10.4",
|
|
"playwright>=1.47",
|
|
"pydantic>=2.9",
|
|
"pydantic-settings>=2.5",
|
|
"reportlab>=4.2",
|
|
"rich>=13.9",
|
|
"typer>=0.12",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"mypy>=1.11",
|
|
"pytest>=8.3",
|
|
"pytest-cov>=6.0",
|
|
"ruff>=0.7",
|
|
"types-beautifulsoup4>=4.12",
|
|
]
|
|
|
|
[project.scripts]
|
|
genshin-tcg = "genshin_tcg.cli:app"
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/example/genshin-tcg"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/genshin_tcg"]
|
|
|
|
# --------------------------------------------------------------------------------------
|
|
# Tooling
|
|
# --------------------------------------------------------------------------------------
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
src = ["src", "tests"]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"N", # pep8-naming
|
|
"UP", # pyupgrade
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"SIM", # flake8-simplify
|
|
"TID", # flake8-tidy-imports
|
|
"RUF", # ruff-specific
|
|
"PTH", # flake8-use-pathlib
|
|
"ANN", # flake8-annotations
|
|
]
|
|
ignore = [
|
|
"ANN401", # allow Any where genuinely needed (rare)
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/**" = ["ANN201", "ANN001"]
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-first-party = ["genshin_tcg"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.11"
|
|
plugins = ["pydantic.mypy"]
|
|
strict = true
|
|
warn_unreachable = true
|
|
warn_unused_ignores = true
|
|
disallow_any_generics = true
|
|
disallow_untyped_defs = true
|
|
no_implicit_reexport = true
|
|
files = ["src", "tests"]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["reportlab.*", "pil.*"]
|
|
ignore_missing_imports = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "-ra --strict-markers --strict-config"
|
|
filterwarnings = ["error"]
|
|
|
|
[tool.coverage.run]
|
|
source = ["genshin_tcg"]
|
|
branch = true
|
|
|
|
[tool.coverage.report]
|
|
show_missing = true
|
|
exclude_lines = ["if TYPE_CHECKING:", "raise NotImplementedError"]
|