mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-30 17:47:50 +00:00
Remove unused imports
Change-Id: I66174048a9eaab0f79ba4c3b1d31ef4dc9c2009b
This commit is contained in:
@@ -34,8 +34,7 @@ from difflib import get_close_matches
|
|||||||
from copy import copy
|
from copy import copy
|
||||||
from gnpy.core.utils import silent_remove
|
from gnpy.core.utils import silent_remove
|
||||||
from gnpy.core.exceptions import NetworkTopologyError
|
from gnpy.core.exceptions import NetworkTopologyError
|
||||||
from gnpy.core.elements import Transceiver, Roadm, Edfa, Fused, Fiber
|
from gnpy.core.elements import Edfa, Fused, Fiber
|
||||||
import time
|
|
||||||
|
|
||||||
all_rows = lambda sh, start=0: (sh.row(x) for x in range(start, sh.nrows))
|
all_rows = lambda sh, start=0: (sh.row(x) for x in range(start, sh.nrows))
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Network elements MUST implement two attributes .uid and .name representing a
|
|||||||
unique identifier and a printable name.
|
unique identifier and a printable name.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from numpy import abs, arange, array, exp, divide, errstate, ones, squeeze
|
from numpy import abs, arange, array, divide, errstate, ones
|
||||||
from numpy import interp, log10, mean, pi, polyfit, polyval, sum
|
from numpy import interp, mean, pi, polyfit, polyval, sum
|
||||||
from scipy.constants import c, h
|
from scipy.constants import h
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
from gnpy.core.node import Node
|
from gnpy.core.node import Node
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ gnpy.core.equipment
|
|||||||
This module contains functionality for specifying equipment.
|
This module contains functionality for specifying equipment.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from numpy import clip, polyval
|
from numpy import clip
|
||||||
from operator import itemgetter
|
|
||||||
from math import isclose
|
from math import isclose
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from json import load
|
from json import load
|
||||||
|
|||||||
@@ -10,11 +10,8 @@ This module contains classes for modelling :class:`SpectralInformation`.
|
|||||||
|
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from numpy import array
|
from gnpy.core.utils import lin2db
|
||||||
from gnpy.core.utils import lin2db, db2lin
|
from gnpy.core.equipment import automatic_nch
|
||||||
from json import loads
|
|
||||||
from gnpy.core.utils import load_json
|
|
||||||
from gnpy.core.equipment import automatic_nch, automatic_spacing
|
|
||||||
|
|
||||||
class Power(namedtuple('Power', 'signal nli ase')):
|
class Power(namedtuple('Power', 'signal nli ase')):
|
||||||
"""carriers power in W"""
|
"""carriers power in W"""
|
||||||
|
|||||||
@@ -10,17 +10,16 @@ This module contains functions for constructing networks of network elements.
|
|||||||
|
|
||||||
from gnpy.core.convert import convert_file
|
from gnpy.core.convert import convert_file
|
||||||
from networkx import DiGraph
|
from networkx import DiGraph
|
||||||
from numpy import arange
|
|
||||||
from scipy.interpolate import interp1d
|
from scipy.interpolate import interp1d
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from os import path
|
from os import path
|
||||||
from operator import itemgetter, attrgetter
|
from operator import attrgetter
|
||||||
from gnpy.core import elements
|
from gnpy.core import elements
|
||||||
from gnpy.core.elements import Fiber, Edfa, Transceiver, Roadm, Fused, RamanFiber
|
from gnpy.core.elements import Fiber, Edfa, Transceiver, Roadm, Fused
|
||||||
from gnpy.core.equipment import edfa_nf
|
from gnpy.core.equipment import edfa_nf
|
||||||
from gnpy.core.exceptions import ConfigurationError, NetworkTopologyError
|
from gnpy.core.exceptions import ConfigurationError, NetworkTopologyError
|
||||||
from gnpy.core.units import UNITS
|
from gnpy.core.units import UNITS
|
||||||
from gnpy.core.utils import (load_json, save_json, round2float, db2lin, merge_amplifier_restrictions)
|
from gnpy.core.utils import (load_json, save_json, round2float, merge_amplifier_restrictions)
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
logger = getLogger(__name__)
|
logger = getLogger(__name__)
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ This base class provides a more convenient way to define a network element
|
|||||||
via subclassing.
|
via subclassing.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from uuid import uuid4
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
class Location(namedtuple('Location', 'latitude longitude city region')):
|
class Location(namedtuple('Location', 'latitude longitude city region')):
|
||||||
|
|||||||
@@ -16,17 +16,17 @@ See: draft-ietf-teas-yang-path-computation-01.txt
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from collections import namedtuple, OrderedDict
|
from collections import namedtuple, OrderedDict
|
||||||
from logging import getLogger, basicConfig, CRITICAL, DEBUG, INFO
|
from logging import getLogger
|
||||||
from networkx import (dijkstra_path, NetworkXNoPath, all_simple_paths)
|
from networkx import (dijkstra_path, NetworkXNoPath, all_simple_paths)
|
||||||
from networkx.utils import pairwise
|
from networkx.utils import pairwise
|
||||||
from numpy import mean
|
from numpy import mean
|
||||||
from gnpy.core.service_sheet import Request_element, Element
|
from gnpy.core.service_sheet import Element
|
||||||
from gnpy.core.elements import Transceiver, Roadm, Edfa, Fused, Fiber
|
from gnpy.core.elements import Transceiver, Roadm, Edfa
|
||||||
from gnpy.core.utils import db2lin, lin2db
|
from gnpy.core.utils import lin2db
|
||||||
from gnpy.core.info import create_input_spectral_information, SpectralInformation, Channel, Power
|
from gnpy.core.info import create_input_spectral_information
|
||||||
from gnpy.core.exceptions import ServiceError, DisjunctionError
|
from gnpy.core.exceptions import ServiceError, DisjunctionError
|
||||||
import gnpy.core.ansi_escapes as ansi_escapes
|
import gnpy.core.ansi_escapes as ansi_escapes
|
||||||
from copy import copy, deepcopy
|
from copy import deepcopy
|
||||||
from csv import writer
|
from csv import writer
|
||||||
from math import ceil
|
from math import ceil
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ from scipy.interpolate import interp1d
|
|||||||
from scipy.optimize import OptimizeResult
|
from scipy.optimize import OptimizeResult
|
||||||
|
|
||||||
from gnpy.core.utils import db2lin
|
from gnpy.core.utils import db2lin
|
||||||
from gnpy.core.parameters import SimParams
|
|
||||||
|
|
||||||
|
|
||||||
logger = getLogger(__name__)
|
logger = getLogger(__name__)
|
||||||
|
|||||||
@@ -17,16 +17,13 @@ try:
|
|||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
exit('Required: `pip install xlrd`')
|
exit('Required: `pip install xlrd`')
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from logging import getLogger, basicConfig, CRITICAL, DEBUG, INFO
|
from logging import getLogger
|
||||||
from json import dumps
|
from json import dumps
|
||||||
from pathlib import Path
|
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from gnpy.core.equipment import load_equipment, automatic_nch
|
from gnpy.core.utils import db2lin
|
||||||
from gnpy.core.utils import db2lin, lin2db
|
|
||||||
from gnpy.core.exceptions import ServiceError
|
from gnpy.core.exceptions import ServiceError
|
||||||
from gnpy.core.network import load_network, build_network
|
|
||||||
from gnpy.core.convert import corresp_names, corresp_next_node
|
from gnpy.core.convert import corresp_names, corresp_next_node
|
||||||
from gnpy.core.elements import Transceiver, Roadm, Edfa, Fused, Fiber
|
from gnpy.core.elements import Transceiver, Roadm, Edfa, Fiber
|
||||||
import gnpy.core.ansi_escapes as ansi_escapes
|
import gnpy.core.ansi_escapes as ansi_escapes
|
||||||
|
|
||||||
SERVICES_COLUMN = 12
|
SERVICES_COLUMN = 12
|
||||||
|
|||||||
Reference in New Issue
Block a user