pydantic-typer/pyproject.toml
2023-04-28 21:11:48 -05:00

166 lines
3.6 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pydantic-typer"
description = 'A rich terminal report for coveragepy.'
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
keywords = []
authors = [
{ name = "Waylon S. Walker", email = "waylon@waylonwalker.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"rich",
"textual",
"typer",
"pydantic",
"anyconfig"
]
dynamic = ["version"]
[project.urls]
Documentation = "https://github.com/waylonwalker/pydantic-typer#readme"
Issues = "https://github.com/waylonwalker/pydantic-typer/issues"
Source = "https://github.com/waylonwalker/pydantic-typer"
Changelog = "https://github.com/waylonwalker/pydantic-typer"
[project.scripts]
pydantic-typer = "pydantic_typer.cli.app:app"
[tool.hatch.version]
path = "pydantic_typer/__about__.py"
[tool.hatch.envs.default]
dependencies = [
"ipython",
"mypy",
"pyflyby",
"pytest",
"pytest-cov",
"pytest-mock",
'polyfactory',
"ruff",
'pyannotate',
"black",
]
[tool.hatch.envs.default.scripts]
test = "coverage run -m pytest"
cov = "coverage-rich"
lint = "ruff pydantic_typer"
format = "black pydantic_typer"
format-check = "black --check pydantic_typer"
build-docs = "markata build"
lint-test = [
"lint",
"format-check",
"test",
"cov",
]
test-lint = "lint-test"
[[tool.hatch.envs.test.matrix]]
python = ["37", "38", "39", "310", "311"]
[tool.coverage.run]
branch = true
parallel = true
omit = [
"pydantic_typer/__about__.py",
]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.pytest.ini_options]
addopts = "-ra -q"
testpaths = ["tests"]
[tool.coverage_rich]
fail-under=80
[tool.ruff]
ignore = ["E501", "D211", "D212", "D213"]
target-version = "py37"
select = [
"F", # Pyflakes
"E", # Error
"W", # Warning
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"YTT", # flake8-2020
# "ANN", # flake8-annotations
"S", # flake8-bandit
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"DJ", # flake8-django
"EM", # flake8-errmsg
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PL", # Pylint
"PLC", # Convention
"PLE", # Error
"PLR", # Refactor
"PLW", # Warning
"TRY", # tryceratops
"NPY", # NumPy-specific rules
"RUF", # Ruff-specific rules
]
[tool.ruff.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 5.
max-complexity = 13
[tool.ruff.pylint]
max-branches = 13
[tool.ruff.per-file-ignores]
'tests/**' = ["D100", "D101", "D102", "D103", "D104", "D105", "S101"]