forked from ChelseaKR/power-content-check
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
122 lines (107 loc) · 3 KB
/
Copy pathpyproject.toml
File metadata and controls
122 lines (107 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[project]
name = "power-content-check"
version = "0.1.0"
description = "Deterministic conformance checker for California Power Content Labels."
readme = "README.md"
requires-python = ">=3.12"
license = { file = "LICENSE" }
authors = [{ name = "Chelsea Kelly-Reif" }]
keywords = ["california", "energy", "power-content-label", "conformance", "civic-tech"]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Text Processing :: Markup",
]
dependencies = ["pypdf>=6.0.0"]
[project.scripts]
power-content-check = "power_content_check.cli:run"
[project.urls]
Source = "https://github.com/ChelseaKR/power-content-check"
Issues = "https://github.com/ChelseaKR/power-content-check/issues"
Changelog = "https://github.com/ChelseaKR/power-content-check/blob/main/CHANGELOG.md"
[build-system]
requires = ["hatchling>=1.32.0"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/power_content_check"]
[dependency-groups]
dev = [
"pytest>=8.3",
"pytest-cov>=5.0",
"ruff>=0.15.0",
"mypy>=1.18",
"bandit>=1.8",
"pip-audit>=2.7",
"hypothesis>=6",
]
# --------------------------------------------------------------------------
# tests and coverage
# --------------------------------------------------------------------------
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--cov=power_content_check",
"--cov-report=term-missing",
"--cov-fail-under=96",
]
[tool.coverage.run]
branch = true
source = ["src/power_content_check"]
[tool.coverage.report]
fail_under = 96
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise AssertionError",
]
# --------------------------------------------------------------------------
# lint and format
# --------------------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # bugbear
"UP", # pyupgrade
"C90", # mccabe complexity
"S", # bandit
"RUF",
]
ignore = [
"S101", # assert is how tests assert
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S311", "S603", "S607"]
"scripts/*" = ["S310"]
# --------------------------------------------------------------------------
# types
# --------------------------------------------------------------------------
[tool.mypy]
python_version = "3.12"
files = ["src", "tests", "scripts"]
strict = true
warn_unreachable = true
disallow_untyped_defs = true
no_implicit_reexport = true
[[tool.mypy.overrides]]
module = "pypdf.*"
ignore_missing_imports = true
[tool.bandit]
exclude_dirs = ["tests", ".venv"]