From 474071d632802a96ebd0a24a61b3b88393044a1e Mon Sep 17 00:00:00 2001 From: Andrey Golovanov Date: Thu, 29 Oct 2026 13:04:41 +0000 Subject: [PATCH] Release NetLab-TopoGen 0.6.1 NetLab-TopoGen requires NetGraph 0.26 (ngraph>=0.26.0,<0.27), which chooses the bandwidth unit q once from a static bound. The DC audit regression now states its precondition for each case (an excess below half a unit, or an exact fit that rounding would push over capacity) instead of a fixed coarse q. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++++ pyproject.toml | 4 ++-- tests/test_validation.py | 18 ++++++++++++------ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 964b5e2..97cc016 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.6.1] - 2026-10-29 + +### Changed + +- **BREAKING**: **Dependencies**: Require `ngraph>=0.26.0,<0.27`, which chooses the bandwidth unit `q` once from a static bound. + ## [0.6.0] - 2026-10-27 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index 7e64919..edb8b05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "netlab-topogen" -version = "0.6.0" +version = "0.6.1" description = "Generate NetGraph backbone scenarios from US Census urban areas and TIGER/Line roads." readme = "README.md" authors = [{ name = "Andrey Golovanov" }] @@ -43,7 +43,7 @@ dependencies = [ # Strict schema validation at runtime "jsonschema", # NetGraph ecosystem - "ngraph>=0.25.0,<0.26", + "ngraph>=0.26.0,<0.27", ] # Dev / CI extras diff --git a/tests/test_validation.py b/tests/test_validation.py index 32a3110..855c5d1 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -289,12 +289,12 @@ def test_nonempty_platform_mapping_requires_installed_platforms(): @pytest.mark.parametrize( "capacity,volume,excess", [ - (1001, 1001, False), - (1003, 1003, False), + (20001, 20001, False), + (40003, 40003, False), (33333, 33333, False), - (100, 100.02, True), - (4097, 4097.8194, True), - (20001, 20005.0002, True), + (100, 100.002, True), + (4097, 4097.0625, True), + (20000, 20000.5, True), ], ) def test_dc_audit_uses_declared_volume_with_automatic_units( @@ -311,14 +311,20 @@ def test_dc_audit_uses_declared_volume_with_automatic_units( assert "units" not in yaml.safe_load(build.yaml) result = validate_scenario(build.yaml, cfg.components) assert result.prepared is not None - assert result.prepared.topology.q > 0.01 + q = result.prepared.topology.q + demands = result.prepared.demand_sets["default"].demands + assert len(demands) == 2 if excess: + assert 0 < volume - capacity < q / 2 + assert all(d.nominal_units * q <= capacity for d in demands) assert result.issues == tuple( f"dc capacity: demand set 'default', metro{site}/dc1 {direction} demand {volume:,.6g} exceeds adjacency capacity {capacity:,.6g}" for direction in ("egress", "ingress") for site in (1, 2) ) else: + assert volume == capacity + assert all(capacity < d.nominal_units * q <= capacity + q / 2 for d in demands) assert not result.issues