-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (127 loc) · 3.93 KB
/
pyproject.toml
File metadata and controls
139 lines (127 loc) · 3.93 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "python-icap"
version = "0.1.2"
description = "Python ICAP (Internet Content Adaptation Protocol) Client"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
authors = [
{name = "CaptainDriftwood"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"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",
]
dependencies = []
keywords = [
"icap",
"antivirus",
"clamav",
"content-adaptation",
"security",
"virus-scanning",
"squid",
]
[project.urls]
Homepage = "https://github.com/CaptainDriftwood/python-icap"
Repository = "https://github.com/CaptainDriftwood/python-icap"
[project.entry-points.pytest11]
icap = "icap.pytest_plugin.plugin"
[tool.hatch.build.targets.wheel]
packages = ["src/icap"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = "-v --strict-markers"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
"docker: marks tests requiring Docker (deselect with '-m \"not docker\"')",
"ssl: marks tests requiring SSL/TLS certificates (run: just generate-certs)",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"icap(host, port, timeout, ssl_context): configure ICAP client for testing",
"icap_mock(response, virus_name, raises, options, respmod, reqmod): configure mock ICAP client",
]
timeout = 120 # Default timeout for all tests (seconds)
timeout_method = "thread" # Use thread-based timeout for better compatibility
filterwarnings = [
# Ignore deprecation warning from testcontainers internals
"ignore:The @wait_container_is_ready decorator is deprecated:DeprecationWarning",
# Ignore pytest-asyncio warning in pytester subprocess tests (our main config has it set)
"ignore:The configuration option \"asyncio_default_fixture_loop_scope\" is unset:pytest.PytestDeprecationWarning",
]
[tool.ruff]
line-length = 100
target-version = "py38"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by formatter
]
[tool.ruff.lint.isort]
known-first-party = ["icap"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[dependency-groups]
dev = [
"coverage[toml]>=7.0.0",
"nox>=2024.0.0",
"nox-uv>=0.2.0; python_version >= '3.9'",
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.10.0",
"pytest-timeout>=2.0.0",
"ruff>=0.1.0",
"setuptools>=75.3.2", # Required for PyCharm's test runner
"testcontainers>=3.7.0",
"ty>=0.0.8",
]
[tool.coverage.run]
source = ["icap"]
branch = true
parallel = true
omit = [
# Import-time only files - class/import definitions execute before coverage starts
# due to pytest plugin loading order
"*/icap/__init__.py",
"*/icap/exception.py",
"*/icap/pytest_plugin/plugin.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"raise NotImplementedError",
# Exclude docstrings (use literal strings for regex backslashes)
'^\\s*"""',
"^\\s*'''",
'^\\s*r"""',
"^\\s*r'''",
]