-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (122 loc) · 3.85 KB
/
pyproject.toml
File metadata and controls
141 lines (122 loc) · 3.85 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[project]
name = "py-logguard"
version = "0.3.2"
description = "Utilities for logging, assertions and custom exceptions"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
authors = [
{ name = "DMsuDev", email = "dayronmustelier13@gmail.com" },
]
keywords = ["logging", "assertions", "exceptions", "debugging", "validation"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Logging",
]
dependencies = [
"rich>=13.0",
]
[project.optional-dependencies]
json = [
"python-json-logger>=4.0",
]
dev = [
"pytest>=8.0",
"pytest-cov>=6.0",
"ruff>=0.6",
"mypy>=1.11",
"pre-commit>=4.0",
"pdoc>=15.0,<16.0",
"python-json-logger>=4.0",
]
[project.urls]
Homepage = "https://github.com/DMsuDev/logguard"
# Documentation = "https://logguard.readthedocs.io" # Placeholder, update when docs are ready
Repository = "https://github.com/DMsuDev/logguard"
"Bug Tracker" = "https://github.com/DMsuDev/logguard/issues"
[build-system]
requires = ["hatchling>=1.21"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["logguard"]
# =================================================================
# Ruff Configuration - Python Linter and Formatter
# =================================================================
[tool.ruff]
line-length = 120
target-version = "py310"
src = ["logguard", "tests"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "SIM", "ANN", "C4", "RET", "PL", "RUF"]
ignore = ["ANN401"] # Any type hints are acceptable
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"asserts.py" = ["PLR0913", "PLR0912", "PLW0603", "RUF022", "SIM102"]
"logger.py" = ["PLR0913", "PLR0915", "PLC0415"]
"examples/*.py" = ["PLR2004", "PLR0915", "E501", "PLC0415"]
"tests/*.py" = ["PLR0913", "PLR2004", "PLC0415", "ANN"]
[tool.ruff.lint.isort]
known-first-party = ["logguard"]
# =================================================================
# MyPy Configuration - Static Type Checking
# =================================================================
[tool.mypy]
python_version = "3.10"
exclude = "tests/.* | examples/.*"
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_untyped_defs = false
strict = false
plugins = []
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
# =================================================================
# Pytest Configuration
# =================================================================
[tool.pytest.ini_options]
minversion = "8.0"
pythonpath = ["."]
testpaths = ["tests"]
addopts = [
"-v",
"--strict-markers",
"--cov=logguard",
"--cov-report=term-missing",
]
markers = [
"slow: marks tests as slow",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
# =================================================================
# Coverage Configuration - Code Coverage Measurement
# =================================================================
[tool.coverage.run]
source = ["logguard"]
omit = ["*/__main__.py", "*/tests/*"]
[tool.coverage.report]
exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if sys.platform",
]
precision = 2
fail_under = 80 # Minimum coverage percentage to pass
[tool.coverage.html]
directory = "build/coverage_html"