Skip to content

Conversation

@networmix
Copy link
Owner

@networmix networmix commented Dec 20, 2025

  • Introduced unified node selection system.
  • Enhanced variable and bracket expansion.
  • Removed deprecated source_path and sink_path attributes.

Note

Introduce unified selector system (string or dict) replacing source_path/sink_path, add variable and bracket expansion across DSL, and update API/docs/tests accordingly.

  • API/Core:
    • Replace source_path/sink_path with unified source/sink selectors (string regex or selector dict) across analysis (AnalysisContext, MaxFlow, sensitivity, helpers) and CLI.
    • Accept selectors in all workflows; add resolve_parallelism; adjust return/context data; remove ngraph.utils.nodes and move condition logic to dsl.selectors.
  • DSL/Expansion:
    • Add ngraph.dsl.selectors (schema, normalization, condition evaluation) and use it for adjacency, demands, overrides, workflows.
    • Add ngraph.dsl.expansion (variable $var/${var} templates, zip/cartesian; name/bracket expansion) and enable bracket expansion in risk group definitions and memberships.
    • TrafficDemand gains source/sink, group_mode, expand_vars, expansion_mode; ID generation updated.
  • Schema/Docs:
    • Update JSON schema (selectorOrString, match/group_by), README/examples, and extensive DSL reference/examples; add Claude skill docs.
  • Scenarios/Tests:
    • Migrate scenarios and tests to new selectors; broaden test coverage for selectors/expansion/risk groups; remove legacy attr: directive usage.
  • Versioning:
    • Bump version to 0.13.0; changelog updated.

Written by Cursor Bugbot for commit f71b9f0. This will update automatically on new commits. Configure here.

- Introduced unified node selection system.
- Enhanced variable and bracket expansion.
- Removed deprecated `source_path` and `sink_path` attributes.
Copilot AI review requested due to automatic review settings December 20, 2025 00:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates ngraph to v0.13.0, introducing a unified node selection system and enhanced variable expansion while removing deprecated source_path/sink_path attributes in favor of source/sink.

Key Changes:

  • Introduced unified node selector system with dict-based selectors supporting group_by, match, and active_only
  • Enhanced variable expansion with $var syntax and bracket expansion for risk groups
  • Renamed source_path/sink_path to source/sink across all TrafficDemand and workflow step interfaces

Reviewed changes

Copilot reviewed 81 out of 81 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml, ngraph/_version.py Version bumped to 0.13.0
ngraph/dsl/selectors/* New unified selector system with schema, normalization, and evaluation
ngraph/dsl/expansion/* New variable expansion system with templates and bracket patterns
ngraph/model/demand/spec.py Updated TrafficDemand with new fields (source/sink, group_mode, expand_vars)
ngraph/exec/demand/expand.py Refactored to use new selector system and variable expansion
ngraph/workflow/*.py Updated workflow steps to use source/sink instead of source_path/sink_path
ngraph/schemas/scenario.json Updated JSON schema with new selector definitions
tests/**/*.py Updated tests to use new API (source/sink, dict selectors)
scenarios/*.yaml Updated example scenarios with new syntax
ngraph/utils/nodes.py Removed (functionality moved to selectors)
ngraph/model/failure/conditions.py Removed (moved to dsl.selectors)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@networmix networmix linked an issue Dec 20, 2025 that may be closed by this pull request
@networmix networmix merged commit 6e71a1f into main Dec 20, 2025
13 checks passed
@networmix networmix deleted the dsl_refine branch December 20, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Variable expansion for demands

2 participants