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]
|
|
|
|
roll = "roll.cli:roll"
|
|
|
|
|
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",
|
|
|
|
]
|
|
|
|
cov = [
|
|
|
|
"test-cov",
|
|
|
|
"cov-report",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[tool.hatch.envs.all.matrix]]
|
|
|
|
python = ["3.11"]
|
|
|
|
|
|
|
|
[tool.hatch.envs.lint]
|
|
|
|
detached = true
|
|
|
|
dependencies = [
|
|
|
|
"black>=23.1.0",
|
|
|
|
"pyright>=1.1.319",
|
|
|
|
"ruff>=0.0.243",
|
|
|
|
"pytest", # for types in tests
|
|
|
|
]
|
|
|
|
[tool.hatch.envs.lint.scripts]
|
|
|
|
typing = "pyright --project pyproject.toml --dependencies {args:roll tests}"
|
|
|
|
style = [
|
|
|
|
"ruff {args:.}",
|
|
|
|
"black --check --diff {args:.}",
|
|
|
|
]
|
|
|
|
fmt = [
|
|
|
|
"black {args:.}",
|
|
|
|
"ruff --fix {args:.}",
|
|
|
|
"style",
|
|
|
|
]
|
|
|
|
all = [
|
|
|
|
"style",
|
|
|
|
"typing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.black]
|
|
|
|
target-version = ["py311"]
|
|
|
|
line-length = 120
|
|
|
|
skip-string-normalization = true
|
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
target-version = "py311"
|
|
|
|
line-length = 120
|
|
|
|
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]
|
|
|
|
exclude_lines = [
|
|
|
|
"no cov",
|
|
|
|
"if __name__ == .__main__.:",
|
|
|
|
"if TYPE_CHECKING:",
|
|
|
|
]
|