-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
156 lines (146 loc) · 5.3 KB
/
Copy pathpyproject.toml
File metadata and controls
156 lines (146 loc) · 5.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
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
155
156
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "netcortex"
version = "0.8.0.dev9"
description = "The intelligence layer for your network — multi-dimensional graph of the network bridging Meraki, Catalyst Center, Intersight, and more with NetBox as SoT"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "MIT" }
dependencies = [
# NetBox client
"pynetbox>=7.3",
# Web framework
"fastapi>=0.115",
"uvicorn[standard]>=0.30",
"jinja2>=3.1",
# MCP server
"fastmcp>=2.0",
# Pydantic & settings
"pydantic>=2.7",
"pydantic-settings>=2.3",
# HTTP client (adapters, RESTCONF)
"httpx>=0.27",
# CLI access
"netmiko>=4.3",
"scrapli>=2024.1",
"ntc-templates>=7.0",
# NETCONF
"ncclient>=0.6.15",
"xmltodict>=0.13",
# SNMP
"pysnmp>=6.1",
# Graph database
"neo4j>=5.0",
# Scheduling
"apscheduler>=3.10",
# Redis (job queue coordination)
"redis>=5.0",
# RSA/ECDSA request signing (Intersight, etc.)
"cryptography>=42.0",
# Utilities
"python-dotenv>=1.0",
"structlog>=24.1",
"tenacity>=8.3",
# IEEE OUI → vendor lookup for MAC address enrichment.
"mac-vendor-lookup>=0.1.15",
# Thalamus — NATS event bus client. Backs netcortex/thalamus/nats_bus.py;
# see docs/architecture/brain.md for the role of the bus in the
# brain-mapped architecture.
"nats-py>=2.6",
]
[project.optional-dependencies]
aws = [
"boto3>=1.34",
]
vault = [
"hvac>=2.1",
]
celery = [
"celery[redis]>=5.4",
]
search = [
"sentence-transformers>=3.0",
]
all = [
"boto3>=1.34",
"hvac>=2.1",
"celery[redis]>=5.4",
]
dev = [
"pytest>=8.2",
"pytest-asyncio>=0.23",
"pytest-httpx>=0.30",
"pytest-recording>=0.13", # VCR-style cassettes for offline replay
"vcrpy>=6.0", # underlying recorder used by pytest-recording
"hypothesis>=6.100", # property-based tests for sanitizer & policies
"moto[secretsmanager]>=5.0", # AWS SM mocking
"ruff>=0.4",
"mypy>=1.10",
"types-xmltodict",
"boto3>=1.34", # needed by dev for moto
"hvac>=2.1", # needed by dev for Vault tests
"pip-audit>=2.7", # SCA in CI
]
[project.scripts]
netcortex = "netcortex.cli:main"
[project.entry-points."netcortex.adapters"]
meraki = "netcortex.adapters.meraki:MerakiAdapter"
catalyst_center = "netcortex.adapters.catalyst_center:CatalystCenterAdapter"
intersight = "netcortex.adapters.intersight:IntersightAdapter"
nexus_dashboard = "netcortex.adapters.nexus_dashboard:NexusDashboardAdapter"
snmp = "netcortex.adapters.snmp:SnmpAdapter"
generic_rest = "netcortex.adapters.generic_rest:GenericRestAdapter"
vsphere = "netcortex.adapters.vsphere:VSphereAdapter"
fmc = "netcortex.adapters.fmc:FmcAdapter"
thousandeyes = "netcortex.adapters.thousandeyes:ThousandEyesAdapter"
[tool.ruff]
# Line length raised to 120 while the brain-architecture refactor is in flight.
# Many existing modules (correlate.py, netbox_writeback.py, adapters/*) routinely
# break the historical 100-col cap; rewriting them just to satisfy a style rule
# they're about to be rewritten under anyway is wasted effort. The new modules
# under netcortex/contracts/ (and future netcortex/{thalamus,sensory,...}/) are
# expected to fit comfortably inside 100 cols regardless.
line-length = 120
target-version = "py312"
[tool.ruff.lint]
# Conservative ruleset while the existing codebase is grandfathered. New
# modules added during the brain refactor will be held to a stricter
# per-directory profile when they land (see docs/architecture/brain.md).
#
# Current selection captures real bugs only: pyflakes F* (undefined names,
# unused imports, redefinitions) and syntax errors E9*. Import ordering (I)
# and lower-value style categories (UP/B/SIM) are deferred until the modules
# they would clean up are either rewritten or stable. New code added under
# netcortex/contracts/, tests/contracts/, tests/golden/, and tools/ is
# expected to be import-sorted by hand or via a local `ruff check --fix`.
select = ["E9", "F"]
# Per-rule grandfathering for the legacy codebase. Each entry has a reason
# and a target release for removal. New code added to netcortex/contracts/,
# tests/contracts/, tests/golden/, and tools/ should not need these and is
# reviewed against the full ruleset by hand.
extend-ignore = [
# F401: unused imports — common in __init__.py re-exports across the
# codebase. Cleaning up means touching ~20 files; defer until the
# association/sensory module split surfaces real public interfaces.
"F401",
# F841: unused local variables — many legitimate cases (debugging
# placeholders kept intentionally, response variables held for future
# logging). Will tighten module-by-module post-refactor.
"F841",
# F811: redefinition — surfaces in a few conditional-import patterns
# that aren't actually bugs. Will tighten as adapters are rewritten.
"F811",
]
[tool.ruff.lint.per-file-ignores]
# Top-level package re-exports legitimately have "unused" imports.
"netcortex/__init__.py" = ["F401"]
"netcortex/contracts/__init__.py" = ["F401"]
[tool.mypy]
python_version = "3.12"
strict = true
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]