-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (135 loc) · 4.06 KB
/
pyproject.toml
File metadata and controls
151 lines (135 loc) · 4.06 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
[build-system]
requires = ["setuptools>=77", "wheel"]
build-backend = "setuptools.build_meta"
# ---------------------------------------------------------------------
[project]
name = "ngraph"
version = "0.21.0"
description = "A tool and a library for network modeling and analysis."
readme = "README.md"
authors = [{ name = "Andrey Golovanov" }]
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.11"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: System :: Networking",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Typing :: Typed",
]
# Runtime deps
dependencies = [
"networkx>=3.0",
"pyyaml>=6.0",
"pandas>=2.0",
"jsonschema>=4.0",
"netgraph-core>=0.3.0",
]
[project.urls]
Homepage = "https://github.com/networmix/NetGraph"
# Dev / CI extras
[project.optional-dependencies]
dev = [
# testing
"pytest>=8",
"pytest-cov",
"pytest-benchmark",
"pytest-mock",
"pytest-timeout",
# perf/visualization
"numpy",
"matplotlib",
"seaborn",
# docs
"mkdocs-material",
"pdoc",
# style + type checking
"ruff==0.11.13",
"pyright==1.1.401",
# type stubs
"pandas-stubs",
# pre-commit hooks
"pre-commit",
# build
"build",
# publishing
"twine",
# schema validation
"jsonschema",
]
[project.scripts]
ngraph = "ngraph.cli:main"
# ---------------------------------------------------------------------
# Pytest flags
[tool.pytest.ini_options]
addopts = "--cov=./ngraph --cov-fail-under=75 --cov-report term-missing --benchmark-disable-gc --benchmark-min-rounds=5 --benchmark-warmup=on"
timeout = 30
markers = [
"slow: marks integration tests as slow (deselect with '-m \"not slow\"')",
"benchmark: marks tests as performance benchmarks (run with '-m benchmark')",
]
# ---------------------------------------------------------------------
# Coverage configuration
[tool.coverage.run]
source = ["."]
omit = ["*/tests/*", "*/test_*", "*/conftest.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
]
# ---------------------------------------------------------------------
# Package discovery
[tool.setuptools.packages.find]
include = ["ngraph*"]
exclude = ["tests*", "notebooks*", "examples*", "dev*"]
# Include schema files in the package for runtime validation
[tool.setuptools.package-data]
"ngraph.schemas" = ["scenario.json"]
"ngraph" = ["py.typed"]
# ---------------------------------------------------------------------
# Ruff
[tool.ruff]
line-length = 88
indent-width = 4
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "B", "I"] # core + Bugbear + isort
ignore = ["E501"] # long lines handled by formatter
fixable = ["ALL"]
[tool.ruff.lint.isort]
known-first-party = ["ngraph"]
[tool.ruff.format]
quote-style = "double"
skip-magic-trailing-comma = false
# ---------------------------------------------------------------------
# Pyright / Pylance
[tool.pyright]
typeCheckingMode = "standard" # balanced level
pythonVersion = "3.11"
venvPath = "."
venv = "venv"
exclude = [
"tests/**", # tests often use dynamic patterns
"dev/**", # development utilities (not shipped)
"**/venv/**", # virtual environments (generic)
"**/*venv/**", # virtual environments (various naming)
"build/**", # build artifacts
"dist/**", # distribution files
"**/__pycache__/**", # Python cache files
"**/*.egg-info/**", # egg info directories
]
reportMissingTypeStubs = "warning"
reportUnknownMemberType = "none"
reportUnknownVariableType = "none"
reportUnknownArgumentType = "none"