diff --git a/docs/gnpy-api-core.rst b/docs/gnpy-api-core.rst index 931bdbc5..dcf5baf8 100644 --- a/docs/gnpy-api-core.rst +++ b/docs/gnpy-api-core.rst @@ -10,5 +10,4 @@ .. automodule:: gnpy.core.network .. automodule:: gnpy.core.parameters .. automodule:: gnpy.core.science_utils -.. automodule:: gnpy.core.service_sheet .. automodule:: gnpy.core.utils diff --git a/docs/gnpy-api-tools.rst b/docs/gnpy-api-tools.rst index 0839000a..ef3beab4 100644 --- a/docs/gnpy-api-tools.rst +++ b/docs/gnpy-api-tools.rst @@ -3,3 +3,4 @@ .. automodule:: gnpy.tools .. automodule:: gnpy.tools.convert +.. automodule:: gnpy.tools.service_sheet diff --git a/examples/path_requests_run.py b/examples/path_requests_run.py index 09363eea..58a70eeb 100755 --- a/examples/path_requests_run.py +++ b/examples/path_requests_run.py @@ -20,7 +20,6 @@ from logging import getLogger, basicConfig, CRITICAL, DEBUG, INFO from json import dumps, loads from numpy import mean from gnpy.core import ansi_escapes -from gnpy.core.service_sheet import convert_service_sheet, Request_element, Element from gnpy.core.utils import automatic_nch, automatic_fmax, load_json from gnpy.core.network import load_network, build_network, save_network from gnpy.core.equipment import load_equipment, trx_mode_params @@ -34,6 +33,7 @@ from gnpy.topology.request import (PathRequest, ResultElement, BLOCKING_NOPATH, BLOCKING_NOMODE, find_reversed_path, correct_json_route_list) from gnpy.topology.spectrum_assignment import build_oms_list, pth_assign_spectrum +from gnpy.tools.service_sheet import convert_service_sheet, Request_element, Element from copy import copy, deepcopy from textwrap import dedent from math import ceil diff --git a/gnpy/core/service_sheet.py b/gnpy/tools/service_sheet.py similarity index 99% rename from gnpy/core/service_sheet.py rename to gnpy/tools/service_sheet.py index 379f79ba..1a9c07b0 100644 --- a/gnpy/core/service_sheet.py +++ b/gnpy/tools/service_sheet.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- """ -gnpy.core.service_sheet +gnpy.tools.service_sheet ======================== XLS parser that can be called to create a JSON request file in accordance with diff --git a/gnpy/topology/request.py b/gnpy/topology/request.py index b584efa0..cfa5a814 100644 --- a/gnpy/topology/request.py +++ b/gnpy/topology/request.py @@ -20,12 +20,12 @@ from logging import getLogger from networkx import (dijkstra_path, NetworkXNoPath, all_simple_paths) from networkx.utils import pairwise from numpy import mean -from gnpy.core.service_sheet import Element from gnpy.core.elements import Transceiver, Roadm from gnpy.core.utils import lin2db from gnpy.core.info import create_input_spectral_information from gnpy.core.exceptions import ServiceError, DisjunctionError import gnpy.core.ansi_escapes as ansi_escapes +from gnpy.tools.service_sheet import Element from copy import deepcopy from csv import writer from math import ceil diff --git a/tests/test_parser.py b/tests/test_parser.py index 594c8196..cb309bc0 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -24,7 +24,6 @@ from tests.compare import compare_networks, compare_services from copy import deepcopy from gnpy.core.utils import automatic_nch, lin2db 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.equipment import load_equipment from gnpy.core.network import load_network from gnpy.core.exceptions import ServiceError @@ -32,6 +31,7 @@ from gnpy.topology.request import (jsontocsv, requests_aggregation, compute_path ResultElement, PathRequest) from gnpy.topology.spectrum_assignment import build_oms_list, pth_assign_spectrum from gnpy.tools.convert import convert_file +from gnpy.tools.service_sheet import convert_service_sheet, correct_xls_route_list from examples.path_requests_run import (requests_from_json, disjunctions_from_json, correct_disjn, compute_path_with_disjunction)