mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-11-02 02:57:52 +00:00
chore: make sure all python files have the correct header
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: Ifdd6a566fda74c5b7d417f9d61c51d4d3da07bfd
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.core.ansi_escapes: A random subset of ANSI terminal escape codes for colored messages
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.core.ansi_escapes
|
||||
======================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.core.elements: Standard network elements which propagate optical spectrum
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.core.elements
|
||||
==================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.core.equipment: functionality for specifying equipment
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.core.equipment
|
||||
===================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.core.exceptions: Exceptions thrown by other gnpy modules
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.core.exceptions
|
||||
====================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.core.info: classes for modelling Spectral Information
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.core.info
|
||||
==============
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.core.network: Working with networks which consist of network elements
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.core.network
|
||||
=================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.core.parameters: parameters to configure standard network elements
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.core.parameters
|
||||
====================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.core.science_utils: Solver definitions to calculate the Raman effect and the nonlinear interference noise
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.core.science_utils
|
||||
=======================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.core.utils: utility functions that are used with gnpy
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.core.utils
|
||||
===============
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Utility functions that creates an Eqpt sheet template
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
create_eqpt_sheet.py
|
||||
====================
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# update an existing json file with all the 96ch txt files for a given amplifier type
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
Created on Tue Jan 30 12:32:00 2018
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Reads JSON path result file and writes results to a CSV file
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
write_path_jsontocsv.py
|
||||
========================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.tools.cli_examples: Common code for CLI examples
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.tools.cli_examples
|
||||
=======================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.tools.convert: utilities for converting between XLS and JSON
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.tools.convert
|
||||
==================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.tools.json_io: Loading and saving data from JSON files in GNPy's internal data format
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.tools.json_io
|
||||
==================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.tools.plots: Graphs and plots usable from a CLI application
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.tools.plots
|
||||
================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.tools.service_sheet: XLS parser that can be called to create a JSON request file
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.tools.service_sheet
|
||||
========================
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
'''
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.tools.worker_utils: Common code for CLI examples and API
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.tools.worker_utils
|
||||
=======================
|
||||
|
||||
Common code for CLI examples and API
|
||||
'''
|
||||
"""
|
||||
import logging
|
||||
from copy import deepcopy
|
||||
from typing import Union, List, Tuple
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.topology.request: path computation functionality
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.topology.request
|
||||
=====================
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# gnpy.topology.spectrum_assignment: spectrum assignment functionality
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
gnpy.topology.spectrum_assignment
|
||||
=================================
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
# Copyright (C) 2020 Telecom Infra Project and GNPy contributors
|
||||
# see LICENSE.md for a list of contributors
|
||||
#
|
||||
# test_amplifier
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
import pytest
|
||||
from gnpy.core.parameters import SimParams, NLIParams, RamanParams
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author: Jean-Luc Auge
|
||||
# @Date: 2018-02-02 14:06:55
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_amplifier
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
from numpy import zeros, array
|
||||
from numpy.testing import assert_allclose
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# Module name : test_automaticmodefeature.py
|
||||
# Version :
|
||||
# License : BSD 3-Clause Licence
|
||||
# Copyright (c) 2018, Telecom Infra Project
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_automaticmodefeature
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
@author: esther.lerouzic
|
||||
checks that empty info on mode, power, nbchannel in service file are supported
|
||||
uses combination of [mode, pow, nb channel] filled or empty defined in meshTopologyToy_services.json
|
||||
leading to feasible path or not, and check the propagate and propagate_and_optimize_mode
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# Module name : test_disjunction.py
|
||||
# Version:
|
||||
# License: BSD 3-Clause Licence
|
||||
# Copyright (c) 2018, Telecom Infra Project
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_disjunction
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
@author: esther.lerouzic
|
||||
checks that computed paths are disjoint as specified in the json service file
|
||||
that computed paths do not loop
|
||||
that include node constraints are correctly taken into account
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author: Esther Le Rouzic
|
||||
# @Date: 2019-05-22
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_equalization
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
@author: esther.lerouzic
|
||||
checks that new equalization option give the same output as old one:
|
||||
|
||||
"""
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author: Esther Le Rouzic
|
||||
# @Date: 2019-05-22
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_gain_mode
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
@author: esther.lerouzic
|
||||
checks behaviour of gain mode
|
||||
- if all amps have their gains set, check that these gains are used, even if power_dbm or req_power change
|
||||
- check that saturation is correct in gain mode
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_info
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
Checks spectral information utilities
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from numpy import array, zeros, ones
|
||||
from numpy.testing import assert_array_equal
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_invocation
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
Checks that invocation of scripts give expected results
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import os
|
||||
from logging import INFO, Formatter
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
# Copyright (C) 2020 Telecom Infra Project and GNPy contributors
|
||||
# see LICENSE.md for a list of contributors
|
||||
#
|
||||
# test_logger
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
Checks that loggers works as expected
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import re
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
# Copyright (C) 2020 Telecom Infra Project and GNPy contributors
|
||||
# see LICENSE.md for a list of contributors
|
||||
#
|
||||
# test_info
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
Checks autodesign functions
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
checks compliance to opensource rules:
|
||||
- list of authors
|
||||
- presence of headers
|
||||
"""
|
||||
import subprocess
|
||||
import re
|
||||
from pathlib import Path
|
||||
@@ -50,3 +55,71 @@ def test_commit_authors_in_author_rst():
|
||||
missing_emails = commit_emails - author_emails - allowed_missing
|
||||
|
||||
assert not missing_emails, f"The following commit author emails are missing in AUTHOR.rst: {missing_emails}"
|
||||
|
||||
|
||||
def get_python_files(root_dir):
|
||||
"""Get all Python files in the project."""
|
||||
return list(root_dir.glob('**/*.py'))
|
||||
|
||||
|
||||
def check_header(file_path):
|
||||
"""Check if a file has the correct header."""
|
||||
with open(file_path, 'r', encoding='utf-8') as f:
|
||||
content = f.read(500) # Read just the beginning of the file
|
||||
|
||||
# Check for shebang
|
||||
has_shebang = content.startswith('#!/usr/bin/env python')
|
||||
|
||||
# Check for encoding
|
||||
has_encoding = '# -*- coding: utf-8 -*-' in content[:100]
|
||||
|
||||
# Check for SPDX license
|
||||
has_license = 'SPDX-License-Identifier: BSD-3-Clause' in content
|
||||
|
||||
# Check for copyright
|
||||
has_copyright = re.search(r'Copyright \(C\) .*Telecom Infra Project', content) is not None
|
||||
|
||||
# Check for AUTHORS reference
|
||||
has_authors_ref = 'see AUTHORS.rst' in content
|
||||
|
||||
return {
|
||||
'file': file_path,
|
||||
'has_shebang': has_shebang,
|
||||
'has_encoding': has_encoding,
|
||||
'has_license': has_license,
|
||||
'has_copyright': has_copyright,
|
||||
'has_authors_ref': has_authors_ref,
|
||||
'is_compliant': has_shebang and has_encoding and has_license and has_copyright and has_authors_ref
|
||||
}
|
||||
|
||||
|
||||
def test_file_headers():
|
||||
"""Test that all Python files have the correct header."""
|
||||
# Get all Python files
|
||||
python_files = get_python_files(SRC_DIR / 'gnpy') + get_python_files(SRC_DIR / 'tests')
|
||||
|
||||
# Files that can be excluded from header checks (e.g., third-party code, generated files)
|
||||
excluded_files = [
|
||||
SRC_DIR / 'gnpy' / 'topology' / '__init__.py',
|
||||
SRC_DIR / 'gnpy' / 'tools' / '__init__.py',
|
||||
SRC_DIR / 'gnpy' / 'core' / '__init__.py',
|
||||
SRC_DIR / 'gnpy' / '__init__.py',
|
||||
SRC_DIR / 'tests' / '__init__.py'
|
||||
]
|
||||
|
||||
# Filter out excluded files
|
||||
python_files = [f for f in python_files if f not in excluded_files]
|
||||
|
||||
# Check headers
|
||||
results = [check_header(f) for f in python_files]
|
||||
non_compliant = [r for r in results if not r['is_compliant']]
|
||||
|
||||
# Generate detailed error message
|
||||
error_msg = ""
|
||||
if non_compliant:
|
||||
error_msg = "The following files have non-compliant headers:\n"
|
||||
for result in non_compliant:
|
||||
file_path = result['file'].relative_to(SRC_DIR)
|
||||
error_msg += f"\n{file_path}:\n"
|
||||
print(non_compliant)
|
||||
assert len(non_compliant) == 0, error_msg
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_parameters
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
|
||||
"""
|
||||
Checks that the class SimParams behaves as a mutable Singleton.
|
||||
"""
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author: Esther Le Rouzic
|
||||
# @Date: 2018-06-15
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_parser
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""Adding tests to check the parser non regression
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
# Module name: test_path_computation_functions.py
|
||||
# Version:
|
||||
# License: BSD 3-Clause Licence
|
||||
# Copyright (c) 2018, Telecom Infra Project
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_path_computation_functions
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
|
||||
|
||||
"""
|
||||
@author: esther.lerouzic
|
||||
test path computation functions
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author: Jean-Luc Auge
|
||||
# @Date: 2018-02-02 14:06:55
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_propagation
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
Check that propagation example give expected results
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author: Esther Le Rouzic
|
||||
# @Date: 2019-05-22
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_roadm_restrictions
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
|
||||
"""
|
||||
@author: esther.lerouzic
|
||||
checks that fused placed in amp type is correctly converted to a fused element instead of an edfa
|
||||
and that no additional amp is added.
|
||||
checks that restrictions in roadms are correctly applied during autodesign
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_science_utils
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
Checks that RamanFiber propagates properly the spectral information. In this way, also the RamanSolver and the NliSolver
|
||||
are tested.
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
# Module name: test_spectrum_assignment.py
|
||||
# Version:
|
||||
# License: BSD 3-Clause Licence
|
||||
# Copyright (c) 2018, Telecom Infra Project
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_spectrum_assignment
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
@author: esther.lerouzic
|
||||
|
||||
test spectrum assignment utilities
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author: Esther Le Rouzic
|
||||
# @Date: 2023-09-29
|
||||
"""
|
||||
@author: esther.lerouzic
|
||||
checks all possibilities of this function
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# test_trx_mode_params
|
||||
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||
# see AUTHORS.rst for a list of contributors
|
||||
|
||||
"""
|
||||
checks all possibilities of this function
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
Reference in New Issue
Block a user