* refactor(templates): remove README.md from cookiecutter templates * test(templates): drop README expectations, expect WARN instead * docs(skills): note README is generated post-init via repo-readme * docs(skills): repo-readme creates README from scratch post-init * fix(templates): drop readme field from pyproject after README removal --------- Co-authored-by: opencode-agent <agent@opencode.local>
129 lines
No EOL
3.4 KiB
TOML
129 lines
No EOL
3.4 KiB
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "{{ cookiecutter.project_name }}"
|
|
version = "0.1.0"
|
|
description = "{{ cookiecutter.description }}"
|
|
license = "MIT"
|
|
requires-python = ">={{ cookiecutter.python_version }}"
|
|
authors = [{ name = "slaid098" }]
|
|
keywords = ["cli"]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Environment :: Console",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Programming Language :: Python :: 3.13",
|
|
]
|
|
|
|
dependencies = [
|
|
"typer>=0.12",
|
|
"rich",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"pytest-cov>=5.0",
|
|
"pytest-timeout>=2.2",
|
|
"mypy>=1.10",
|
|
"ruff>=0.5",
|
|
"pre-commit>=3.7",
|
|
]
|
|
|
|
[project.scripts]
|
|
{{ cookiecutter.project_name }} = "{{ cookiecutter.project_name }}.__main__:app"
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/slaid098/{{ cookiecutter.project_name }}"
|
|
Repository = "https://github.com/slaid098/{{ cookiecutter.project_name }}"
|
|
Issues = "https://github.com/slaid098/{{ cookiecutter.project_name }}/issues"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/{{cookiecutter.project_name}}"]
|
|
|
|
# ── Ruff ──────────────────────────────────────────────────────────────────
|
|
|
|
[tool.ruff]
|
|
target-version = "py313"
|
|
line-length = 100
|
|
src = ["src", "tests"]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", "W",
|
|
"F",
|
|
"I",
|
|
"B",
|
|
"UP",
|
|
"SIM",
|
|
"C90",
|
|
"PL",
|
|
"RUF",
|
|
"S",
|
|
"TRY",
|
|
"LOG",
|
|
]
|
|
ignore = [
|
|
"S101",
|
|
"S311",
|
|
"RUF001",
|
|
"RUF002",
|
|
"RUF003",
|
|
"TRY003",
|
|
"PLR2004",
|
|
"S106",
|
|
]
|
|
|
|
[tool.ruff.lint.mccabe]
|
|
max-complexity = 10
|
|
|
|
[tool.ruff.lint.pylint]
|
|
max-args = 5
|
|
max-branches = 12
|
|
max-returns = 5
|
|
max-statements = 50
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/*" = ["S101", "PLR2004", "S106", "S603", "S607", "PLR0913"]
|
|
|
|
# ── mypy ──────────────────────────────────────────────────────────────────
|
|
|
|
[tool.mypy]
|
|
python_version = "{{ cookiecutter.python_version }}"
|
|
strict = true
|
|
explicit_package_bases = true
|
|
warn_return_any = true
|
|
disallow_untyped_defs = true
|
|
disallow_incomplete_defs = true
|
|
check_untyped_defs = true
|
|
no_implicit_optional = true
|
|
warn_redundant_casts = true
|
|
warn_unused_ignores = true
|
|
|
|
# ── pytest ────────────────────────────────────────────────────────────────
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "--cov=src --cov-report=term-missing --timeout=120"
|
|
|
|
# ── coverage ──────────────────────────────────────────────────────────────
|
|
|
|
[tool.coverage.run]
|
|
source = ["src"]
|
|
branch = true
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
]
|
|
|
|
# ── project-status ─────────────────────────────────────────────────────────
|
|
|
|
[tool.project-status]
|
|
route_line_limit = 50
|
|
min_test_count = 1
|
|
require_branch_protection = false |