-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
152 lines (137 loc) · 3.9 KB
/
pyproject.toml
File metadata and controls
152 lines (137 loc) · 3.9 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
[build-system]
requires = ["setuptools>=77", "wheel"]
build-backend = "setuptools.build_meta"
# ---------------------------------------------------------------------
[project]
name = "topogen"
version = "0.4.0"
description = "A network topology generator."
readme = "README.md"
authors = [{ name = "Andrey Golovanov" }]
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Operating System :: OS Independent",
"Typing :: Typed",
]
dependencies = [
"pyyaml",
"numpy",
"pandas",
"matplotlib",
"seaborn",
"rich",
"nbformat",
"nbconvert",
"ipykernel",
"itables",
# Geographic processing
"rasterio",
"pyproj",
"geopandas",
"shapely",
"scipy",
"scikit-learn",
"networkx",
"contextily",
# Strict schema validation at runtime
"jsonschema",
# NetGraph ecosystem
"ngraph>=0.12.0",
"netgraph-core>=0.3.0",
] # Runtime deps
# Dev / CI extras
[project.optional-dependencies]
dev = [
# testing
"pytest>=8",
"pytest-cov",
"pytest-benchmark",
"pytest-mock",
"pytest-timeout",
# json schema validation for scenarios
"jsonschema",
# style + type checking
"ruff==0.11.13",
"pyright==1.1.401",
# type stubs
"pandas-stubs",
# pre-commit hooks
"pre-commit",
# build
"build",
# publishing
"twine",
]
[project.scripts]
topogen = "topogen.cli:main"
# ---------------------------------------------------------------------
# Pytest flags
[tool.pytest.ini_options]
addopts = "--cov=./topogen --cov-fail-under=50 --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 = ["topogen*"]
exclude = ["tests*", "notebooks*", "examples*", "dev*"]
[tool.setuptools.package-data]
"topogen.schemas" = ["topogen_config.json"]
"topogen" = ["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 = ["topogen"]
[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
"**/venv/**", # virtual environments (generic)
"**/*venv/**", # virtual environments (various naming)
"build/**", # build artifacts
"dist/**", # distribution files
"**/__pycache__/**", # Python cache files
"**/*.egg-info/**", # egg info directories
"dev/**", # developer scripts (not part of package)
]
reportMissingTypeStubs = "warning"
reportUnknownMemberType = "none"
reportUnknownVariableType = "none"
reportUnknownArgumentType = "none"