-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
154 lines (139 loc) · 3.75 KB
/
pyproject.toml
File metadata and controls
154 lines (139 loc) · 3.75 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
142
143
144
145
146
147
148
149
150
151
152
153
154
[project]
name = "neops-remote-lab"
dynamic = ["version"]
description = "FastAPI-based Remote Lab Manager for Netlab topologies to enable remote testing of Neops Function Blocks against virtual networking labs"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "Proprietary" }
authors = [{ name = "zebbra AG" }]
keywords = [
"neops",
"networking",
"netlab",
"remote",
"lab",
"fastapi",
"pytest",
]
dependencies = [
"python-dotenv>=1.2.2,<2", # CVE-2026-28684 fix
"fastapi>=0.116.0",
"starlette>=0.49.1", # CVE-2025-62727 fix
"uvicorn>=0.29.0,<0.30",
"filelock>=3.20.1,<4", # CVE-2025-68146 fix
"urllib3>=2.6.0",
"pyyaml>=6.0,<7",
"colorlog>=6.8.2,<7",
"python-multipart>=0.0.26,<0.1", # CVE-2026-40347 fix (was capped at <0.0.23)
"pydantic>=2.7,<3",
"requests>=2.32.5,<3",
]
[project.scripts]
neops-remote-lab = "neops_remote_lab.__main__:main"
[project.entry-points.pytest11]
neops-remote-lab = "neops_remote_lab.pytest_plugins"
[dependency-groups]
dev = [
"pytest>=9.0.3,<10", # CVE-2025-71176 fix
"pytest-asyncio>=1.1.0,<2",
"httpx>=0.28.1,<0.29",
"pip-audit>=2.10.0,<3",
"types-pyyaml>=6.0.12.20250516,<7",
"types-requests>=2.32.4.20250913,<3",
"ruff>=0.14.11",
"pyrefly>=0.48.0",
]
[tool.pytest.ini_options]
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
addopts = ["--ignore=docs", "--ignore=examples"]
[tool.ruff]
target-version = "py312"
line-length = 120
indent-width = 4
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = 120
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"N", # pep8-naming
"S", # flake8-bandit
"A", # flake8-builtins
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"RET", # flake8-return
"PIE", # flake8-pie
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PERF", # perflint
"PT", # flake8-pytest-style
"PL", # pylint
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # Handled by formatter / explicit line-length
"D203", # Incompatible with D211
"D213", # Incompatible with D212
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"D", # Don't require docstrings in tests
"ANN", # Don't require full typing in tests
"S101", # Allow asserts in tests
"PLR2004" # Allow magic values in tests
]
"neops_remote_lab/testing/pytest_order_plugin.py" = [
"ARG001", # pytest hook must accept `config`
]
"**/__init__.py" = [
"D104", # Package docstring
]
"neops_remote_lab/server.py" = [
"B008", # FastAPI dependency injection uses call defaults (Depends/File)
]
[tool.pyrefly]
python-version = "3.12"
project-includes = ["neops_remote_lab/**/*.py"]
project-excludes = [
"**/__pycache__/**",
"**/.venv/**",
"**/.git/**",
"docs/**",
".make_scripts/**",
]
search-path = ["."]
untyped-def-behavior = "check-and-infer-return-type"
[tool.pyrefly.errors]
unannotated-return = true
unannotated-parameter = true
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.wheel]
packages = ["neops_remote_lab"]
artifacts = [
"neops_remote_lab/logging_config.yaml",
"neops_remote_lab/py.typed",
]
[tool.hatch.build.targets.sdist]
# Using only-include to avoid issues with docs/ symlinks confusing hatch-vcs
# The symlinks (docs/neops_remote_lab, docs/tests, docs/headscale) are needed for documentation builds
only-include = [
"neops_remote_lab",
"README.md",
"pyproject.toml",
]
[build-system]
requires = ["hatchling>=1.27.0", "hatch-vcs>=0.4.0"]
build-backend = "hatchling.build"