Skip to content

Conversation

@networmix
Copy link
Owner

@networmix networmix commented Dec 22, 2025

  • Reorganized modules: ngraph.exec split into ngraph.analysis and ngraph.model, maintaining public API via re-exports.
  • Expanded public API to include TrafficDemand, FlowPolicyPreset, Scenario, NetworkExplorer, and placement functions.
  • Introduced ngraph.analysis.placement for demand placement with SPF caching, including place_demands() and PlacementResult.

Note

Reorganizes modules (exec → analysis/model), introduces a unified SPF-cached placement engine, and broadens the top-level public API while updating docs, types, and tests for v0.16.0.

  • Core/API:
    • Split ngraph.exec into ngraph.analysis (runtime) and ngraph.model (data); re-exports keep top-level API stable (ngraph.__init__).
    • Broadened exports: TrafficDemand, FlowPolicyPreset, Scenario, NetworkExplorer, placement types/functions.
  • Analysis:
    • New ngraph.analysis.placement: SPF-cached demand placement (place_demands(), PlacementResult, PlacementEntry, PlacementSummary).
    • Consolidated analysis entrypoints in ngraph.analysis (analyze moved to context.py; functions in analysis.functions; FailureManager moved to analysis.failure_manager).
  • Model:
    • Added ngraph.model.demand (builder, matrix, spec) and ngraph.model.flow (policy presets); re-exported via ngraph.model.
  • Workflow:
    • Scenario and workflow steps updated to use new modules; per-instance _execution_counter for stable step ordering.
    • MSD and traffic-matrix steps refactored to use unified placement.
  • Lib/Types:
    • ngraph.lib.nx.EdgeMap now maps to NxEdgeTuple; added ngraph.types package re-exports.
  • Docs/Version:
    • Reference docs updated to new package paths and APIs; version bumped to 0.16.0.
  • Tests:
    • Test suite updated to new module locations and placement internals; added coverage for placement, failure manager, and demand modules.

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

- Reorganized modules: `ngraph.exec` split into `ngraph.analysis` and `ngraph.model`, maintaining public API via re-exports.
- Expanded public API to include `TrafficDemand`, `FlowPolicyPreset`, `Scenario`, `NetworkExplorer`, and placement functions.
- Introduced `ngraph.analysis.placement` for demand placement with SPF caching, including `place_demands()` and `PlacementResult`.
Copilot AI review requested due to automatic review settings December 22, 2025 00:47
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 reorganizes the codebase to improve modularity and expands the public API surface, bumping the version to 0.16.0.

Key Changes:

  • Split ngraph.exec into ngraph.analysis (runtime analysis with SPF caching) and ngraph.model (data structures for demand/flow configuration)
  • Introduced ngraph.analysis.placement module for demand placement with SPF caching, including place_demands() and PlacementResult
  • Expanded public API exports: TrafficDemand, FlowPolicyPreset, Scenario, NetworkExplorer, and placement functions now available from top-level modules

Reviewed changes

Copilot reviewed 39 out of 49 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Version bump to 0.16.0
ngraph/_version.py Version bump to 0.16.0
ngraph/init.py Added exports for TrafficDemand, FlowPolicyPreset, Scenario, NetworkExplorer
ngraph/analysis/init.py Expanded exports with placement and demand functions
ngraph/analysis/context.py Moved analyze() function here from init.py
ngraph/analysis/placement.py New module: SPF-cached demand placement with place_demands()
ngraph/analysis/demand.py Moved from ngraph.exec.demand.expand
ngraph/analysis/failure_manager.py Moved from ngraph.exec.failure.manager
ngraph/analysis/functions.py Refactored to use new placement module
ngraph/model/demand/init.py New subpackage with TrafficDemand exports
ngraph/model/demand/builder.py Moved from ngraph.exec.demand.builder
ngraph/model/flow/init.py New subpackage with FlowPolicyPreset exports
ngraph/model/failure/init.py Expanded exports for failure policy classes
ngraph/model/init.py Added public API exports for model classes
ngraph/types/init.py Added exports for enums and DTOs
ngraph/results/init.py Added flow result class exports
ngraph/lib/nx.py Renamed EdgeRef type alias to NxEdgeTuple to avoid confusion
ngraph/explorer.py Refactored _compute_statistics into smaller methods
ngraph/scenario.py Reset workflow execution counter on run()
ngraph/workflow/*.py Updated imports to new paths
tests/**/*.py Updated imports to new module structure
docs/reference/*.md Updated module references and package structure
CHANGELOG.md Added 0.16.0 release notes

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@networmix networmix self-assigned this Dec 22, 2025
@networmix networmix merged commit 6ee4620 into main Dec 22, 2025
7 checks passed
@networmix networmix deleted the refactoring branch December 22, 2025 11:19
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.

Silent failure when assigning undefined risk_groups to Nodes/Links Optimize Demand Placement with SPF Caching

2 participants