Skip to content
pyproject.toml 1.85 KiB
Newer Older
[build-system]
requires = ["flit_core ~=3.2"]
build-backend = "flit_core.buildapi"

[project]
name = "project_templates"
authors = [
	{name = "Dom Sekotill", email = "dom.sekotill@kodo.org.uk"},
]
license = {file = "LICENCE.txt"}
readme = "README.md"
dynamic = ["version", "description"]

# https://github.com/pypa/flit/issues/476
requires-python = ">=3.9,<4"

dependencies = [
	"jinja2",
]
classifiers = [
	"Development Status :: 1 - Planning",
	"Intended Audience :: Developers",
	"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
	"Programming Language :: Python :: 3 :: Only",
	"Topic :: Software Development :: Quality Assurance",
]

[project.optional-dependencies]
tests = [
	"coverage[toml]",
	"kodo.plugins.cover_test_context @ https://code.kodo.org.uk/dom/cover-plugin-test-context/-/archive/main/cover-plugin-test-context-main.zip",
]

[project.urls]
Repository = "https://code.kodo.org.uk/dom/project-templates"

[project.scripts]
new-project = "project_templates:main"


[tool.isort]
force_single_line = true
line_length = 92


[tool.unimport]
ignore-init = true


[tool.flakeheaven]
base = ".flakerules.toml"


[tool.mypy]
strict = true
warn_unused_configs = true
warn_unreachable = true


[tool.coverage.run]
data_file = "results/coverage.db"
branch = true
source = ["project_templates"]
plugins = [
	"kodo.plugins.cover_test_context",
]

[tool.coverage.report]
precision = 2
skip_empty = true
exclude_lines = [
	"pragma: no cover",
	"if .*\\b__name__\\b",
	"if .*\\bTYPE_CHECKING\\b",
	"class .*(.*\\bProtocol\\b.*):",
	"def __repr__",
	"@overload",
	"@(abc\\.)abstractmethod",
]
partial_branches = [
	"pragma: no branch",
	"if .*\\b__debug__\\b",
]

[tool.coverage.json]
output = "results/coverage.json"
show_contexts = true

[tool.coverage.xml]
output = "results/coverage.xml"

[tool.coverage.html]
directory = "results/coverage.html.d"
show_contexts = true