mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-11 01:02:10 +03:00
chore: update pyproject.toml with Python 3.10 support, linting, testing, and security tool configurations
This commit is contained in:
parent
b053621e19
commit
d21946d1cb
1 changed files with 109 additions and 1 deletions
110
pyproject.toml
110
pyproject.toml
|
|
@ -4,9 +4,24 @@ version = "0.1.0"
|
||||||
description = "Cross-platform CLI for deep network diagnostics: ISP/VPN/ASN identity, latency, path and bandwidth"
|
description = "Cross-platform CLI for deep network diagnostics: ISP/VPN/ASN identity, latency, path and bandwidth"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "PolyForm-Noncommercial-1.0.0"
|
license = "PolyForm-Noncommercial-1.0.0"
|
||||||
requires-python = ">=3.14"
|
requires-python = ">=3.10"
|
||||||
authors = [{ name = "netsleuth contributors" }]
|
authors = [{ name = "netsleuth contributors" }]
|
||||||
keywords = ["network", "diagnostics", "traceroute", "bgp", "vpn", "speedtest"]
|
keywords = ["network", "diagnostics", "traceroute", "bgp", "vpn", "speedtest"]
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 4 - Beta",
|
||||||
|
"Environment :: Console",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"Intended Audience :: System Administrators",
|
||||||
|
"License :: Other/Proprietary License",
|
||||||
|
"Operating System :: MacOS",
|
||||||
|
"Operating System :: Microsoft :: Windows",
|
||||||
|
"Operating System :: POSIX :: Linux",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Programming Language :: Python :: 3.12",
|
||||||
|
"Topic :: System :: Networking",
|
||||||
|
"Topic :: System :: Networking :: Monitoring",
|
||||||
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"typer>=0.12",
|
"typer>=0.12",
|
||||||
"rich>=13.7",
|
"rich>=13.7",
|
||||||
|
|
@ -22,6 +37,27 @@ dependencies = [
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
tcptrace = ["scapy>=2.5"]
|
tcptrace = ["scapy>=2.5"]
|
||||||
ndt7 = ["websockets>=12"]
|
ndt7 = ["websockets>=12"]
|
||||||
|
dev = [
|
||||||
|
"pytest>=8",
|
||||||
|
"pytest-asyncio>=0.23",
|
||||||
|
"pytest-httpx>=0.30",
|
||||||
|
"pytest-cov>=4.1",
|
||||||
|
"ruff>=0.3",
|
||||||
|
"black>=24.2",
|
||||||
|
"mypy>=1.8",
|
||||||
|
"bandit>=1.7",
|
||||||
|
"pre-commit>=3.6",
|
||||||
|
"hypothesis>=6.99",
|
||||||
|
]
|
||||||
|
docs = [
|
||||||
|
"sphinx>=7.2",
|
||||||
|
"sphinx-rtd-theme>=2.0",
|
||||||
|
"sphinx-autodoc-typehints>=2.0",
|
||||||
|
]
|
||||||
|
security = [
|
||||||
|
"bandit>=1.7",
|
||||||
|
"pip-audit>=2.7",
|
||||||
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
netsleuth = "netsleuth.cli:main"
|
netsleuth = "netsleuth.cli:main"
|
||||||
|
|
@ -31,6 +67,13 @@ dev = [
|
||||||
"pytest>=8",
|
"pytest>=8",
|
||||||
"pytest-asyncio>=0.23",
|
"pytest-asyncio>=0.23",
|
||||||
"pytest-httpx>=0.30",
|
"pytest-httpx>=0.30",
|
||||||
|
"pytest-cov>=4.1",
|
||||||
|
"ruff>=0.3",
|
||||||
|
"black>=24.2",
|
||||||
|
"mypy>=1.8",
|
||||||
|
"bandit>=1.7",
|
||||||
|
"pre-commit>=3.6",
|
||||||
|
"hypothesis>=6.99",
|
||||||
]
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|
@ -40,7 +83,72 @@ build-backend = "hatchling.build"
|
||||||
[tool.hatch.build.targets.wheel]
|
[tool.hatch.build.targets.wheel]
|
||||||
packages = ["src/netsleuth"]
|
packages = ["src/netsleuth"]
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
target-version = "py310"
|
||||||
|
line-length = 100
|
||||||
|
select = [
|
||||||
|
"E", # pycodestyle errors
|
||||||
|
"W", # pycodestyle warnings
|
||||||
|
"F", # pyflakes
|
||||||
|
"I", # isort
|
||||||
|
"B", # flake8-bugbear
|
||||||
|
"C4", # flake8-comprehensions
|
||||||
|
"UP", # pyupgrade
|
||||||
|
"ARG", # flake8-unused-arguments
|
||||||
|
"SIM", # flake8-simplify
|
||||||
|
]
|
||||||
|
ignore = [
|
||||||
|
"E501", # line too long (handled by black)
|
||||||
|
"B008", # do not perform function calls in argument defaults
|
||||||
|
"B904", # raise without from inside except
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.ruff.per-file-ignores]
|
||||||
|
"__init__.py" = ["F401"] # unused imports in __init__
|
||||||
|
"tests/*" = ["ARG", "S101"] # unused args in tests, assert allowed
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line-length = 100
|
||||||
|
target-version = ['py310', 'py311', 'py312']
|
||||||
|
include = '\.pyi?$'
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
python_version = "3.10"
|
||||||
|
warn_return_any = true
|
||||||
|
warn_unused_configs = true
|
||||||
|
disallow_untyped_defs = false
|
||||||
|
disallow_incomplete_defs = false
|
||||||
|
check_untyped_defs = true
|
||||||
|
no_implicit_optional = true
|
||||||
|
warn_redundant_casts = true
|
||||||
|
warn_unused_ignores = true
|
||||||
|
strict_equality = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "tests.*"
|
||||||
|
disallow_untyped_defs = false
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
testpaths = ["tests"]
|
testpaths = ["tests"]
|
||||||
asyncio_mode = "auto"
|
asyncio_mode = "auto"
|
||||||
filterwarnings = ["error::DeprecationWarning:netsleuth.*"]
|
filterwarnings = ["error::DeprecationWarning:netsleuth.*"]
|
||||||
|
addopts = "-v --tb=short"
|
||||||
|
markers = [
|
||||||
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
||||||
|
"integration: marks tests as integration tests",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
source = ["src/netsleuth"]
|
||||||
|
branch = true
|
||||||
|
|
||||||
|
[tool.coverage.report]
|
||||||
|
exclude_lines = [
|
||||||
|
"pragma: no cover",
|
||||||
|
"if TYPE_CHECKING:",
|
||||||
|
"raise NotImplementedError",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.bandit]
|
||||||
|
targets = ["src/netsleuth"]
|
||||||
|
skips = ["B101", "B311"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue