reorganization: gnpy/{core => topology}/spectrum_assignment.py

Change-Id: Ic6194ce639dcb2f9419372febe0f2b58473edb38
This commit is contained in:
Jan Kundrát
2020-05-23 15:05:24 +02:00
parent baa9171315
commit 01c566a325
7 changed files with 8 additions and 8 deletions

View File

@@ -11,5 +11,4 @@
.. automodule:: gnpy.core.parameters .. automodule:: gnpy.core.parameters
.. automodule:: gnpy.core.science_utils .. automodule:: gnpy.core.science_utils
.. automodule:: gnpy.core.service_sheet .. automodule:: gnpy.core.service_sheet
.. automodule:: gnpy.core.spectrum_assignment
.. automodule:: gnpy.core.utils .. automodule:: gnpy.core.utils

View File

@@ -3,3 +3,4 @@
.. automodule:: gnpy.topology .. automodule:: gnpy.topology
.. automodule:: gnpy.topology.request .. automodule:: gnpy.topology.request
.. automodule:: gnpy.topology.spectrum_assignment

View File

@@ -28,12 +28,12 @@ from gnpy.core.elements import Roadm
from gnpy.core.utils import db2lin, lin2db from gnpy.core.utils import db2lin, lin2db
from gnpy.core.exceptions import (ConfigurationError, EquipmentConfigError, NetworkTopologyError, from gnpy.core.exceptions import (ConfigurationError, EquipmentConfigError, NetworkTopologyError,
ServiceError, DisjunctionError) ServiceError, DisjunctionError)
from gnpy.core.spectrum_assignment import (build_oms_list, pth_assign_spectrum)
from gnpy.topology.request import (PathRequest, ResultElement, from gnpy.topology.request import (PathRequest, ResultElement,
propagate, jsontocsv, Disjunction, compute_path_dsjctn, propagate, jsontocsv, Disjunction, compute_path_dsjctn,
requests_aggregation, propagate_and_optimize_mode, requests_aggregation, propagate_and_optimize_mode,
BLOCKING_NOPATH, BLOCKING_NOMODE, BLOCKING_NOPATH, BLOCKING_NOMODE,
find_reversed_path, correct_json_route_list) find_reversed_path, correct_json_route_list)
from gnpy.topology.spectrum_assignment import build_oms_list, pth_assign_spectrum
from copy import copy, deepcopy from copy import copy, deepcopy
from textwrap import dedent from textwrap import dedent
from math import ceil from math import ceil

View File

@@ -2,8 +2,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
gnpy.core.spectrum_assignment gnpy.topology.spectrum_assignment
============================= =================================
This module contains the :class:`Oms` and :class:`Bitmap` classes and methods to This module contains the :class:`Oms` and :class:`Bitmap` classes and methods to
select and assign spectrum. The :func:`spectrum_selection` function identifies the free select and assign spectrum. The :func:`spectrum_selection` function identifies the free

View File

@@ -20,9 +20,9 @@ from gnpy.core.exceptions import ServiceError
from examples.path_requests_run import (requests_from_json, load_requests, disjunctions_from_json) from examples.path_requests_run import (requests_from_json, load_requests, disjunctions_from_json)
from gnpy.core.utils import automatic_nch, lin2db from gnpy.core.utils import automatic_nch, lin2db
from gnpy.core.elements import Roadm from gnpy.core.elements import Roadm
from gnpy.core.spectrum_assignment import build_oms_list
from gnpy.topology.request import (compute_path_dsjctn, isdisjoint, find_reversed_path, PathRequest, from gnpy.topology.request import (compute_path_dsjctn, isdisjoint, find_reversed_path, PathRequest,
correct_json_route_list) correct_json_route_list)
from gnpy.topology.spectrum_assignment import build_oms_list
NETWORK_FILE_NAME = Path(__file__).parent.parent / 'tests/data/testTopology_expected.json' NETWORK_FILE_NAME = Path(__file__).parent.parent / 'tests/data/testTopology_expected.json'
SERVICE_FILE_NAME = Path(__file__).parent.parent / 'tests/data/testTopology_testservices.json' SERVICE_FILE_NAME = Path(__file__).parent.parent / 'tests/data/testTopology_testservices.json'

View File

@@ -27,10 +27,10 @@ from gnpy.core.network import save_network, build_network
from gnpy.core.service_sheet import convert_service_sheet, correct_xls_route_list from gnpy.core.service_sheet import convert_service_sheet, correct_xls_route_list
from gnpy.core.equipment import load_equipment from gnpy.core.equipment import load_equipment
from gnpy.core.network import load_network from gnpy.core.network import load_network
from gnpy.core.spectrum_assignment import build_oms_list, pth_assign_spectrum
from gnpy.core.exceptions import ServiceError from gnpy.core.exceptions import ServiceError
from gnpy.topology.request import (jsontocsv, requests_aggregation, compute_path_dsjctn, from gnpy.topology.request import (jsontocsv, requests_aggregation, compute_path_dsjctn,
ResultElement, PathRequest) ResultElement, PathRequest)
from gnpy.topology.spectrum_assignment import build_oms_list, pth_assign_spectrum
from gnpy.tools.convert import convert_file from gnpy.tools.convert import convert_file
from examples.path_requests_run import (requests_from_json, disjunctions_from_json, from examples.path_requests_run import (requests_from_json, disjunctions_from_json,
correct_disjn, compute_path_with_disjunction) correct_disjn, compute_path_with_disjunction)

View File

@@ -19,10 +19,10 @@ from gnpy.core.equipment import load_equipment
from gnpy.core.network import load_network, build_network from gnpy.core.network import load_network, build_network
from gnpy.core.utils import lin2db, automatic_nch from gnpy.core.utils import lin2db, automatic_nch
from gnpy.core.elements import Roadm, Transceiver from gnpy.core.elements import Roadm, Transceiver
from gnpy.core.spectrum_assignment import (build_oms_list, align_grids, nvalue_to_frequency,
bitmap_sum, Bitmap, spectrum_selection, pth_assign_spectrum)
from gnpy.core.exceptions import SpectrumError from gnpy.core.exceptions import SpectrumError
from gnpy.topology.request import compute_path_dsjctn, find_reversed_path from gnpy.topology.request import compute_path_dsjctn, find_reversed_path
from gnpy.topology.spectrum_assignment import (build_oms_list, align_grids, nvalue_to_frequency,
bitmap_sum, Bitmap, spectrum_selection, pth_assign_spectrum)
from examples.path_requests_run import requests_from_json, disjunctions_from_json, correct_disjn from examples.path_requests_run import requests_from_json, disjunctions_from_json, correct_disjn
TEST_DIR = Path(__file__).parent TEST_DIR = Path(__file__).parent