NetGraph contributor development workflow...
For NetGraph contributors. For writing and running scenarios, see the netgraph-dsl skill.
make dev # Creates venv, installs deps, sets up pre-commit
Requires Python 3.11+.
| Command | Purpose |
|---|---|
make qt |
Quick tests (no coverage, excludes slow/benchmark) |
make check |
Full validation: auto-fix, schema, tests, lint, type check |
make test |
Full tests with coverage (includes slow/benchmark) |
make lint |
Verify formatting + lint + type check (no fixes) |
make format |
Auto-format only |
make validate |
Schema validation only |
make docs |
Regenerate API docs |
make qt - fast feedback during developmentmake check - complete validation before commitmake docs to regenerate API referenceFor algorithm complexity analysis and regression testing:
make perf # Run all benchmark profiles with analysis and plots
Output in dev/perf_results/ (JSON) and dev/perf_plots/ (graphs).
# List available benchmark profiles
./venv/bin/python -m dev.perf.main show profile
# Show profile details
./venv/bin/python -m dev.perf.main show profile spf_complexity_clos2tier
# Run specific profile
./venv/bin/python -m dev.perf.main run --profile spf_complexity_grid2d
# List topology types
./venv/bin/python -m dev.perf.main show topology
Available profiles: spf_complexity_*, max_flow_complexity_* (Clos and Grid2D topologies).
Use direct venv paths (avoids shell state issues):
./venv/bin/python -m pytest tests/dsl/
./venv/bin/ngraph inspect scenario.yaml
| Tool | Purpose |
|---|---|
dev/perf/ |
Performance benchmarking framework |
dev/generate_api_docs.py |
API doc generator (used by make docs) |
dev/run-checks.sh |
Quality checks (used by make check) |
dev/dev.md |
Quick development reference |
Any where practicalprint() in library codeA change is complete only after:
make check passes (auto-fixes, schema, lint, type check, tests)Pre-commit hooks run automatically on commit. To run manually:
make check # Runs format, lint, type checks, tests
CI runs the same checks. If CI fails:
make check locallymake dev # Recreates if missing
./venv/bin/pip install -e '.[dev]'
make format # Auto-fix formatting
make check # Verify all checks pass