-
Notifications
You must be signed in to change notification settings - Fork 0
Dsl refine #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dsl refine #106
Conversation
There was a problem hiding this 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 implements a comprehensive DSL refinement, modernizing field names and simplifying the schema across the codebase. The changes focus on improving consistency and clarity in the configuration language.
Changes:
- Renamed DSL fields for consistency:
operator→op,any_value/no_value→exists/not_exists,sink→target,demand→volume,step_type→type, and others - Flattened nested structures by removing
link_paramswrapper and merging properties directly into link definitions - Updated field names in failure policies:
entity_scope→scope,rule_type→mode,fail_risk_groups→expand_groups - Renamed top-level YAML sections:
traffic_matrix_set→demands,failure_policy_set→failures,groups/adjacency→nodes/links
Reviewed changes
Copilot reviewed 89 out of 125 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/dsl/test_selectors.py | Updated operator field from operator to op in Condition objects; renamed any_value/no_value to exists/not_exists |
| tests/dsl/test_rule_selectors.py | New test file validating enhanced rule selector support with op field |
| tests/dsl/test_risk_group_expansion.py | Updated DSL field names: groups → nodes, node_count → count, adjacency → links, node_overrides → node_rules |
| tests/dsl/test_parse_helpers.py | Renamed test functions and updated to use check_link_keys instead of separate check_adjacency_keys and check_link_params |
| tests/dsl/test_expansion.py | Updated ExpansionSpec fields: expand_vars → vars, expansion_mode → mode |
| tests/dsl/test_examples.py | Comprehensive DSL updates across example scenarios with field renames |
| tests/dsl/test_dsl_features_validation.py | New validation tests for DSL features using updated field names |
| tests/dsl/test_dot_notation_conditions.py | Updated condition operators to use op field and exists/not_exists |
| tests/conftest.py | Added shared network fixtures (diamond, asymmetric_diamond, multi_tier) |
| tests/cli/test_cli.py | Updated workflow step type field and demand fields |
| tests/analysis/test_placement.py | Renamed sink → target, demand → volume, flow_policy_config → flow_policy; moved helper function to module level |
| tests/analysis/test_paths.py | Updated condition operator field to op |
| tests/analysis/test_maxflow_cost_distribution.py | Replaced network factory with shared fixture from conftest |
| tests/analysis/test_maxflow_cache.py | Updated to use shared network factory from conftest |
| tests/analysis/test_maxflow_api.py | Updated comment about graph builder |
| tests/analysis/test_functions_details.py | Updated demand field names |
| tests/analysis/test_functions.py | Renamed demand fields and added test for unknown parameter rejection |
| tests/analysis/test_failure_manager_integration.py | Updated failure rule fields: entity_scope → scope, rule_type → mode |
| tests/analysis/test_failure_manager.py | Updated failure rule and condition field names |
| tests/analysis/test_demand.py | Renamed TrafficDemand fields throughout tests |
| scenarios/square_mesh.yaml | Updated scenario with new DSL field names |
| scenarios/readme_example.yml | New example scenario demonstrating updated DSL |
| scenarios/nsfnet.yaml | Updated large scenario file with flattened link structure |
| scenarios/backbone_clos.yml | Updated with new DSL field names and flattened structures |
| pyproject.toml | Version bump to 0.17.0 |
| ngraph/workflow/traffic_matrix_placement_step.py | Renamed matrix_name → demand_set, updated field references |
| ngraph/workflow/parse.py | Updated step_type → type in workflow parsing |
| ngraph/workflow/network_stats.py | Updated docstring example |
| ngraph/workflow/maximum_supported_demand_step.py | Renamed matrix_name → demand_set with comprehensive updates |
| ngraph/workflow/max_flow_step.py | Renamed sink → target field |
| ngraph/workflow/cost_power.py | Updated docstring example |
| ngraph/workflow/build_graph.py | Updated docstring and removed outdated comment |
| ngraph/workflow/base.py | Enhanced docstring with improved lifecycle description |
| ngraph/types/dto.py | Updated module docstring |
| ngraph/schemas/scenario.json | Comprehensive JSON schema updates reflecting all DSL changes |
| ngraph/scenario.py | Updated to use DemandSet instead of TrafficMatrixSet, renamed fields |
| ngraph/results/snapshot.py | Updated snapshot building with renamed fields |
| ngraph/profiling/profiler.py | Replaced warning with NotImplementedError for combined profile saving |
| ngraph/model/path.py | Simplified get_sub_path signature by removing unused parameters |
| ngraph/model/flow/policy_config.py | Updated docstring for serialize_policy_preset |
| ngraph/model/failure/validation.py | Updated comment referencing scope field |
| ngraph/model/failure/policy.py | Renamed entity_scope → scope, rule_type → mode, fail_risk_groups → expand_groups |
| ngraph/model/failure/parser.py | Updated parser to use new field names and match block structure |
| ngraph/model/failure/membership.py | Added path filtering support, updated field names |
| ngraph/model/failure/init.py | Removed FailureCondition export (now using Condition from selectors) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Note
BREAKING DSL refinements
adjacency→links,traffic_matrix_set→demands,failure_policy_set→failures,sink→target,groups→nodes(withcount/template), overrides→node_rules/link_ruleslink_params);link_count→count;any_direction→bidirectionalexpand_vars/expansion_mode→expand.vars/expand.modeentity_scope→scope,rule_type→mode,fail_risk_groups→expand_groups,fail_risk_group_children→expand_children; add optionalpathfilters andlink_matchany_value/no_value→exists/not_existsnodes; clarified processing order and selection-model defaultsDocumentation and tooling
0.17.0noting breaking changes; add AGPLLICENSEnetgraph-core; minor docs script/comment tweaksWritten by Cursor Bugbot for commit fc60879. This will update automatically on new commits. Configure here.