2023-08-10 01:02:53 +00:00
|
|
|
[build-system]
|
|
|
|
requires = ["hatchling"]
|
|
|
|
build-backend = "hatchling.build"
|
|
|
|
|
|
|
|
[project]
|
|
|
|
name = "roll"
|
|
|
|
description = "for initiative!"
|
|
|
|
readme = "README.md"
|
2023-08-11 20:06:01 +00:00
|
|
|
requires-python = ">=3.11"
|
2023-08-10 01:02:53 +00:00
|
|
|
keywords = []
|
|
|
|
# license-files = { paths = ["LICENSE.txt"] }
|
|
|
|
authors = [
|
|
|
|
{ name = "mat ess", email = "mat@mat.services" },
|
|
|
|
]
|
|
|
|
classifiers = [
|
|
|
|
"Development Status :: 4 - Beta",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
"Programming Language :: Python :: 3.11",
|
|
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
|
|
]
|
|
|
|
dependencies = [
|
|
|
|
"click",
|
|
|
|
]
|
|
|
|
dynamic = ["version"]
|
|
|
|
|
|
|
|
[project.urls]
|
|
|
|
Documentation = "https://git.mat.services/mat/roll#readme"
|
|
|
|
Issues = "https://git.mat.services/mat/roll/issues"
|
|
|
|
Source = "https://git.mat.services/mat/roll"
|
|
|
|
|
|
|
|
[project.scripts]
|
2023-08-13 16:59:32 +00:00
|
|
|
roll = "roll.cli:cli"
|
2023-08-10 01:02:53 +00:00
|
|
|
|
2023-08-11 20:06:01 +00:00
|
|
|
[tool.hatch.version]
|
|
|
|
path = "roll/__about__.py"
|
|
|
|
|
2023-08-10 01:02:53 +00:00
|
|
|
[tool.hatch.envs.default]
|
|
|
|
dependencies = [
|
2023-08-11 20:06:01 +00:00
|
|
|
"coverage[toml]>=6.5",
|
2023-08-10 01:02:53 +00:00
|
|
|
"pytest",
|
|
|
|
]
|
|
|
|
[tool.hatch.envs.default.scripts]
|
2023-08-11 20:06:01 +00:00
|
|
|
test = "pytest {args:tests}"
|
|
|
|
test-cov = "coverage run -m pytest {args:tests}"
|
|
|
|
cov-report = [
|
|
|
|
"- coverage combine",
|
|
|
|
"coverage report",
|
|
|
|
]
|
2023-08-13 16:59:32 +00:00
|
|
|
check = [
|
2023-08-11 20:06:01 +00:00
|
|
|
"test-cov",
|
|
|
|
"cov-report",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[tool.hatch.envs.all.matrix]]
|
|
|
|
python = ["3.11"]
|
|
|
|
|
2023-08-13 16:59:32 +00:00
|
|
|
[tool.hatch.envs.typing]
|
|
|
|
extra-dependencies = ["mypy"]
|
|
|
|
[tool.hatch.envs.typing.scripts]
|
|
|
|
check = "mypy --install-types {args:roll tests}"
|
|
|
|
|
2023-08-11 20:06:01 +00:00
|
|
|
[tool.hatch.envs.lint]
|
|
|
|
detached = true
|
|
|
|
dependencies = [
|
|
|
|
"black>=23.1.0",
|
|
|
|
"ruff>=0.0.243",
|
|
|
|
]
|
|
|
|
[tool.hatch.envs.lint.scripts]
|
|
|
|
style = [
|
|
|
|
"ruff {args:.}",
|
|
|
|
"black --check --diff {args:.}",
|
|
|
|
]
|
|
|
|
fmt = [
|
|
|
|
"black {args:.}",
|
|
|
|
"ruff --fix {args:.}",
|
|
|
|
"style",
|
|
|
|
]
|
2023-08-13 16:59:32 +00:00
|
|
|
check = [
|
2023-08-11 20:06:01 +00:00
|
|
|
"style",
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.black]
|
|
|
|
target-version = ["py311"]
|
2023-08-13 16:59:32 +00:00
|
|
|
line-length = 100
|
|
|
|
# skip-string-normalization = true
|
2023-08-11 20:06:01 +00:00
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
target-version = "py311"
|
2023-08-13 16:59:32 +00:00
|
|
|
line-length = 100
|
2023-08-11 20:06:01 +00:00
|
|
|
select = [
|
|
|
|
"A",
|
|
|
|
"ARG",
|
|
|
|
"B",
|
|
|
|
"C",
|
|
|
|
"DTZ",
|
|
|
|
"E",
|
|
|
|
"EM",
|
|
|
|
"F",
|
|
|
|
"FBT",
|
|
|
|
"I",
|
|
|
|
"ICN",
|
|
|
|
"ISC",
|
|
|
|
"N",
|
|
|
|
"PLC",
|
|
|
|
"PLE",
|
|
|
|
"PLR",
|
|
|
|
"PLW",
|
|
|
|
"Q",
|
|
|
|
"RUF",
|
|
|
|
"S",
|
|
|
|
"T",
|
|
|
|
"TID",
|
|
|
|
"UP",
|
|
|
|
"W",
|
|
|
|
"YTT",
|
|
|
|
]
|
|
|
|
ignore = [
|
|
|
|
# Allow non-abstract empty methods in abstract base classes
|
|
|
|
"B027",
|
|
|
|
# Allow boolean positional values in function calls, like `dict.get(... True)`
|
|
|
|
"FBT003",
|
|
|
|
# Ignore checks for possible passwords
|
|
|
|
"S105", "S106", "S107",
|
|
|
|
# Ignore insecure random checks
|
|
|
|
"S311",
|
|
|
|
# Ignore complexity
|
|
|
|
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
|
|
|
|
]
|
|
|
|
unfixable = [
|
|
|
|
# Don't touch unused imports
|
|
|
|
"F401",
|
|
|
|
]
|
2023-08-10 01:02:53 +00:00
|
|
|
|
2023-08-11 20:06:01 +00:00
|
|
|
[tool.ruff.isort]
|
|
|
|
known-first-party = ["roll"]
|
2023-08-10 01:02:53 +00:00
|
|
|
|
2023-08-11 20:06:01 +00:00
|
|
|
[tool.ruff.flake8-tidy-imports]
|
|
|
|
ban-relative-imports = "all"
|
2023-08-10 01:02:53 +00:00
|
|
|
|
2023-08-11 20:06:01 +00:00
|
|
|
[tool.ruff.per-file-ignores]
|
|
|
|
# Tests can use magic values, assertions, and relative imports
|
|
|
|
"tests/**/*" = ["PLR2004", "S101", "TID252"]
|
2023-08-10 01:02:53 +00:00
|
|
|
|
|
|
|
[tool.coverage.run]
|
2023-08-11 20:06:01 +00:00
|
|
|
source_pkgs = ["roll", "tests"]
|
2023-08-10 01:02:53 +00:00
|
|
|
branch = true
|
|
|
|
parallel = true
|
|
|
|
omit = [
|
|
|
|
"roll/__about__.py",
|
|
|
|
]
|
|
|
|
|
2023-08-11 20:06:01 +00:00
|
|
|
[tool.coverage.paths]
|
|
|
|
roll = ["roll", "*/roll/roll"]
|
|
|
|
tests = ["tests", "*/roll/tests"]
|
|
|
|
|
2023-08-10 01:02:53 +00:00
|
|
|
[tool.coverage.report]
|
2023-08-13 16:59:32 +00:00
|
|
|
show_missing = true
|
|
|
|
skip_empty = true
|
|
|
|
fail_under = 100
|
2023-08-10 01:02:53 +00:00
|
|
|
exclude_lines = [
|
|
|
|
"no cov",
|
|
|
|
"if __name__ == .__main__.:",
|
|
|
|
"if TYPE_CHECKING:",
|
|
|
|
]
|
2023-08-13 16:59:32 +00:00
|
|
|
|
|
|
|
[tool.mypy]
|
|
|
|
pretty = true
|
|
|
|
strict = true
|
|
|
|
|
|
|
|
[[tool.mypy.overrides]]
|
|
|
|
module = "tests.*"
|
|
|
|
allow_untyped_defs = true
|
|
|
|
allow_incomplete_defs = true
|
|
|
|
check_untyped_defs = true
|