From b2fb7bc33f74e3f6fb871c1fca441949570db8fb Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Fri, 31 Mar 2023 10:03:01 +0200 Subject: [PATCH 01/16] little fix on tests regarding hardcoded port --- tests/test_job.py | 8 ++++---- tests/test_simulation.py | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/test_job.py b/tests/test_job.py index 80fbc0129..896113483 100644 --- a/tests/test_job.py +++ b/tests/test_job.py @@ -25,20 +25,20 @@ def test_job(): # Stubs creations for Simulations simu_manager_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=simulation__v1__pb2_grpc.SpeosSimulationsManagerStub, ) simu_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=simulation__v1__pb2_grpc.SpeosSimulationStub, ) # Stubs creations for Jobs job_manager_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=job__v1__pb2_grpc.SpeosJobsManagerStub, ) job_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=job__v1__pb2_grpc.SpeosJobStub, ) diff --git a/tests/test_simulation.py b/tests/test_simulation.py index 51a5074e9..e231208f4 100644 --- a/tests/test_simulation.py +++ b/tests/test_simulation.py @@ -65,15 +65,15 @@ def test_simulation(): def test_simu_allocateSyst_load_run_with_file_transfer(): # Stubs creations file_transfer_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=file_transfer__v1__pb2_grpc.FileTransferServiceStub, ) simu_manager_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=simulation__v1__pb2_grpc.SpeosSimulationsManagerStub, ) simu_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=simulation__v1__pb2_grpc.SpeosSimulationStub, ) @@ -100,15 +100,15 @@ def test_simu_allocateSyst_load_run_with_file_transfer(): def test_simu_allocateSyst_load_save_with_file_transfer(): # Stubs creations file_transfer_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=file_transfer__v1__pb2_grpc.FileTransferServiceStub, ) simu_manager_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=simulation__v1__pb2_grpc.SpeosSimulationsManagerStub, ) simu_stub = grpc_stub.get_stub_insecure_channel( - target="localhost:50051", + target="localhost:" + str(config.get("SpeosServerPort")), stub_type=simulation__v1__pb2_grpc.SpeosSimulationStub, ) sv5_name = "LG_50M_Colorimetric_short.sv5" From 32401337dcb74d39a3db2c54af7f43e3fb074ded Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Fri, 31 Mar 2023 10:06:45 +0200 Subject: [PATCH 02/16] update docker compose to use image 2023.2.0.666 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9d66404eb..ca1a25260 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.4" services: optics_speos-rpc: - image: ghcr.io/pyansys/pyoptics/speos-rpc:2023.2.0.305 + image: ghcr.io/pyansys/pyoptics/speos-rpc:2023.2.0.666 container_name: optics_speos-rpc ports: - "50051:50051" From d5bdf5aefdaac4f1bdc1e0ca6ff97c9d32ceba35 Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Fri, 31 Mar 2023 10:13:54 +0200 Subject: [PATCH 03/16] use ansys-api-speos==1.0.dev0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b7876872..f7aa1ff48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers=[ dependencies=[ "grpcio==1.51.3", "grpcio-tools==1.48.2", - "ansys-api-speos==0.1.0", + "ansys-api-speos==1.0.dev0", ] [project.optional-dependencies] From 2ac1f84e04217ad62b9283f168711bb35cc0b9a9 Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Fri, 31 Mar 2023 11:39:36 +0200 Subject: [PATCH 04/16] update changes in tests --- tests/test_job.py | 3 +-- tests/test_simulation.py | 23 +++++------------------ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/tests/test_job.py b/tests/test_job.py index 896113483..6389dcf31 100644 --- a/tests/test_job.py +++ b/tests/test_job.py @@ -26,7 +26,7 @@ def test_job(): # Stubs creations for Simulations simu_manager_stub = grpc_stub.get_stub_insecure_channel( target="localhost:" + str(config.get("SpeosServerPort")), - stub_type=simulation__v1__pb2_grpc.SpeosSimulationsManagerStub, + stub_type=simulation__v1__pb2_grpc.SimulationsManagerStub, ) simu_stub = grpc_stub.get_stub_insecure_channel( target="localhost:" + str(config.get("SpeosServerPort")), @@ -85,7 +85,6 @@ def test_job(): job_information = job_stub.GetInformation(job__v1__pb2.GetInformation_Request(guid=job_create_res.guid)) assert job_information.title == "Direct Simulation Processing" assert job_information.name == "ASSEMBLY1.DS (0)" - assert job_information.progress < 1 # progress < 1 because job was stopped # Get results get_results_res = job_stub.GetResults(job__v1__pb2.GetResults_Request(guid=job_create_res.guid)) diff --git a/tests/test_simulation.py b/tests/test_simulation.py index e231208f4..34739d14b 100644 --- a/tests/test_simulation.py +++ b/tests/test_simulation.py @@ -27,7 +27,7 @@ def test_simulation(): # Stub on simulation manager simulation_manager_stub = grpc_stub.get_stub_insecure_channel( target="localhost:" + str(config.get("SpeosServerPort")), - stub_type=simulation__v1__pb2_grpc.SpeosSimulationsManagerStub, + stub_type=simulation__v1__pb2_grpc.SimulationsManagerStub, ) # Stub on simulation @@ -50,12 +50,6 @@ def test_simulation(): simulation_stub.Load(load_request) - # GetName - get_name_request = simulation__v1__pb2.GetName_Request() - get_name_request.guid = guid_simu.guid - get_name_response = simulation_stub.GetName(get_name_request) - assert get_name_response.name == "ASSEMBLY1.DS (0)" - # Delete simulation delete_request = simulation__v1__pb2.Delete_Request() delete_request.guid = guid_simu.guid @@ -70,7 +64,7 @@ def test_simu_allocateSyst_load_run_with_file_transfer(): ) simu_manager_stub = grpc_stub.get_stub_insecure_channel( target="localhost:" + str(config.get("SpeosServerPort")), - stub_type=simulation__v1__pb2_grpc.SpeosSimulationsManagerStub, + stub_type=simulation__v1__pb2_grpc.SimulationsManagerStub, ) simu_stub = grpc_stub.get_stub_insecure_channel( target="localhost:" + str(config.get("SpeosServerPort")), @@ -105,7 +99,7 @@ def test_simu_allocateSyst_load_save_with_file_transfer(): ) simu_manager_stub = grpc_stub.get_stub_insecure_channel( target="localhost:" + str(config.get("SpeosServerPort")), - stub_type=simulation__v1__pb2_grpc.SpeosSimulationsManagerStub, + stub_type=simulation__v1__pb2_grpc.SimulationsManagerStub, ) simu_stub = grpc_stub.get_stub_insecure_channel( target="localhost:" + str(config.get("SpeosServerPort")), @@ -134,20 +128,13 @@ def test_simu_allocateSyst_load_save_with_file_transfer(): # And Save simu_stub.Save(simulation__v1__pb2.Save_Request(guid=create_res.guid, input_folder_path=reserve_res.uri)) - # We can then list dependencies of the reserved item to check that it contains two deps with correct names - deps_response = file_transfer_stub.ListDependencies( - file_transfer__v1__pb2.ListDependencies_Request(uri=reserve_res.uri) - ) - assert len(deps_response.dependency_infos) == 2 - assert [dep_info for dep_info in deps_response.dependency_infos if dep_info.file_name == blue_spectrum] - assert [dep_info for dep_info in deps_response.dependency_infos if dep_info.file_name == red_spectrum] - - # And download locally the simu saved - using download_folder helper provided within ansys.api.speos.file.v1 + # Download locally the simu saved - using download_folder helper provided within ansys.api.speos.file.v1 download_loc = os.path.join(local_test_path, "download_simu") os.mkdir(download_loc) download_responses = file_transfer.download_folder( file_transfer_service_stub=file_transfer_stub, main_file_uri=reserve_res.uri, download_location=download_loc ) + # Check that file are well downloaded for res in download_responses: downloaded_file = os.path.join(download_loc, res.info.file_name) From ad95a43d930079c11c2a547239de8b5b41761ba8 Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Fri, 31 Mar 2023 11:44:35 +0200 Subject: [PATCH 05/16] mistake with ansys-api-speos version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f7aa1ff48..1a58a83ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers=[ dependencies=[ "grpcio==1.51.3", "grpcio-tools==1.48.2", - "ansys-api-speos==1.0.dev0", + "ansys-api-speos==1.0.0", ] [project.optional-dependencies] From f663c0fbb653338a4ef4046f63348d6286089b0a Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Fri, 31 Mar 2023 14:30:47 +0200 Subject: [PATCH 06/16] add tests for eulumdat, ies, xmp_intensity and xmp_spectral_intensity --- tests/test_eulumdat_file.py | 224 ++++++++++++++++++++++ tests/test_ies_file.py | 154 +++++++++++++++ tests/test_xmp_intensity_file.py | 159 +++++++++++++++ tests/test_xmp_spectral_intensity_file.py | 218 +++++++++++++++++++++ 4 files changed, 755 insertions(+) create mode 100644 tests/test_eulumdat_file.py create mode 100644 tests/test_ies_file.py create mode 100644 tests/test_xmp_intensity_file.py create mode 100644 tests/test_xmp_spectral_intensity_file.py diff --git a/tests/test_eulumdat_file.py b/tests/test_eulumdat_file.py new file mode 100644 index 000000000..c2544b182 --- /dev/null +++ b/tests/test_eulumdat_file.py @@ -0,0 +1,224 @@ +"""This module allows pytest to perform unit testing. + +Usage: +.. code:: + $ pytest + $ pytest -vx + +With coverage. +.. code:: + $ pytest --cov ansys.pyoptics.speos + +""" +import logging +import os + +from ansys.api.speos.intensity_distributions.v1 import eulumdat_pb2, eulumdat_pb2_grpc +import grpc + +from conftest import config, test_path +import helper + + +def createEulumdatIntensity(): + eulumdat = eulumdat_pb2.EulumdatIntensityDistribution() + + # file information + eulumdat.file_info.company_identification = "Ansys" + eulumdat.file_info.measurement_report_number = "" + eulumdat.file_info.luminaire_name = "Luminaire" + eulumdat.file_info.luminaire_number = "0000" + eulumdat.file_info.file_name = "" + eulumdat.file_info.date = "" + + # angular information + eulumdat.type_indicator = 3 + eulumdat.symmetry_indicator = 0 + eulumdat.c_plane_number = 24 + eulumdat.distance_c_planes = 10 + eulumdat.g_angle_number = 19 + eulumdat.distance_g_angle = 10 + + # luminaire parameters + eulumdat.diameter_luminaire = 0.0 + eulumdat.width_luminaire = 0.0 + eulumdat.height_luminaire = 0.0 + + # luminous area + eulumdat.diameter_luminous_area = 0.0 + eulumdat.width_luminous_area = 0.0 + eulumdat.height_luminous_area_c0 = 0 + eulumdat.height_luminous_area_c90 = 0 + eulumdat.height_luminous_area_c180 = 0 + eulumdat.height_luminous_area_c270 = 0 + eulumdat.downward_flux_fraction = 50 + eulumdat.light_ouput_ratio = 100 + eulumdat.conversion_factor = 1 + eulumdat.measurement_tilt = 0 + + # lamp distribution + eulumdat.number_standard_set_lamps = 1 + for lmp in range(eulumdat.number_standard_set_lamps): + lamp_distribution = eulumdat.lamp_distribution.add() + lamp_distribution.number_lamps = 1 + lamp_distribution.type_lamps = "" + lamp_distribution.total_luminous_flux = 1 + lamp_distribution.color_temperature = "" + lamp_distribution.color_rendering_index = "" + lamp_distribution.wattage_including_ballast = 1.0 + + # polar distribution data + for d in range(10): + eulumdat.direct_ratio.append(1) + for cp in range(eulumdat.c_plane_number): + eulumdat.c_plane.append(1.0) + for ga in range(eulumdat.g_angle_number): + eulumdat.g_angle.append(1.0) + cp_used = eulumdat.c_plane_number + if eulumdat.symmetry_indicator == 1: + cp_used = 1 + if eulumdat.symmetry_indicator == 2: + int(cp_used=eulumdat.c_plane_number / 2) + 1 + if eulumdat.symmetry_indicator == 3: + int(cp_used=eulumdat.c_plane_number / 2) + 1 + if eulumdat.symmetry_indicator == 4: + int(cp_used=eulumdat.c_plane_number / 4) + 1 + for cp in range(cp_used): + for ga in range(eulumdat.g_angle_number): + eulumdat.luminous_intensity_per_klm.append(1.0) + + return eulumdat + + +def compareEulumdatIntensities(eulumdat1, eulumdat2): + # file information + if eulumdat1.file_info.company_identification != eulumdat2.file_info.company_identification: + return False + if eulumdat1.file_info.measurement_report_number != eulumdat2.file_info.measurement_report_number: + return False + if eulumdat1.file_info.luminaire_name != eulumdat2.file_info.luminaire_name: + return False + if eulumdat1.file_info.luminaire_number != eulumdat2.file_info.luminaire_number: + return False + if eulumdat1.file_info.file_name != eulumdat2.file_info.file_name: + return False + if eulumdat1.file_info.date != eulumdat2.file_info.date: + return False + + # angular information + if eulumdat1.type_indicator != eulumdat2.type_indicator: + return False + if eulumdat1.symmetry_indicator != eulumdat2.symmetry_indicator: + return False + if eulumdat1.c_plane_number != eulumdat2.c_plane_number: + return False + if eulumdat1.distance_c_planes != eulumdat2.distance_c_planes: + return False + if eulumdat1.g_angle_number != eulumdat2.g_angle_number: + return False + if eulumdat1.distance_g_angle != eulumdat2.distance_g_angle: + return False + + # luminaire parameters + if eulumdat1.diameter_luminaire != eulumdat2.diameter_luminaire: + return False + if eulumdat1.width_luminaire != eulumdat2.width_luminaire: + return False + if eulumdat1.height_luminaire != eulumdat2.height_luminaire: + return False + + # luminous area + if eulumdat1.diameter_luminous_area != eulumdat2.diameter_luminous_area: + return False + if eulumdat1.width_luminous_area != eulumdat2.width_luminous_area: + return False + if eulumdat1.height_luminous_area_c0 != eulumdat2.height_luminous_area_c0: + return False + if eulumdat1.height_luminous_area_c90 != eulumdat2.height_luminous_area_c90: + return False + if eulumdat1.height_luminous_area_c180 != eulumdat2.height_luminous_area_c180: + return False + if eulumdat1.height_luminous_area_c270 != eulumdat2.height_luminous_area_c270: + return False + if eulumdat1.downward_flux_fraction != eulumdat2.downward_flux_fraction: + return False + if eulumdat1.light_ouput_ratio != eulumdat2.light_ouput_ratio: + return False + if eulumdat1.conversion_factor != eulumdat2.conversion_factor: + return False + if eulumdat1.measurement_tilt != eulumdat2.measurement_tilt: + return False + + # lamp distribution + if eulumdat1.number_standard_set_lamps != eulumdat2.number_standard_set_lamps: + return False + for lmp in range(eulumdat1.number_standard_set_lamps): + if eulumdat1.lamp_distribution[lmp].number_lamps != eulumdat2.lamp_distribution[lmp].number_lamps: + return False + if eulumdat1.lamp_distribution[lmp].type_lamps != eulumdat2.lamp_distribution[lmp].type_lamps: + return False + if eulumdat1.lamp_distribution[lmp].total_luminous_flux != eulumdat2.lamp_distribution[lmp].total_luminous_flux: + return False + if eulumdat1.lamp_distribution[lmp].color_temperature != eulumdat2.lamp_distribution[lmp].color_temperature: + return False + if ( + eulumdat1.lamp_distribution[lmp].color_rendering_index + != eulumdat2.lamp_distribution[lmp].color_rendering_index + ): + return False + if ( + eulumdat1.lamp_distribution[lmp].wattage_including_ballast + != eulumdat2.lamp_distribution[lmp].wattage_including_ballast + ): + return False + + # polar distribution data + for d in range(10): + if eulumdat1.direct_ratio[d] != eulumdat2.direct_ratio[d]: + return False + for cp in range(eulumdat1.c_plane_number): + if eulumdat1.c_plane[cp] != eulumdat2.c_plane[cp]: + return False + for ga in range(eulumdat1.g_angle_number): + if eulumdat1.g_angle[ga] != eulumdat2.g_angle[ga]: + return False + if len(eulumdat1.luminous_intensity_per_klm) != len(eulumdat2.luminous_intensity_per_klm): + return False + for lm in range(len(eulumdat1.luminous_intensity_per_klm)): + if eulumdat1.luminous_intensity_per_klm[lm] != eulumdat2.luminous_intensity_per_klm[lm]: + return False + + return True + + +def test_grpc_eulumdat_intensity(): + with grpc.insecure_channel(f"localhost:" + str(config.get("SpeosServerPort"))) as channel: + stub = eulumdat_pb2_grpc.EulumdatIntensityServiceStub(channel) + save_name = eulumdat_pb2.Save_Request() + save_name.file_uri = os.path.join(test_path, "eulumdat_tmp00.ldt") + load_name = eulumdat_pb2.Load_Request() + load_name.file_uri = os.path.join(test_path, "eulumdat_tmp00.ldt") + + logging.debug("Creating eulumdat intensity protocol buffer") + eulumdat = createEulumdatIntensity() + + logging.debug("Sending protocol buffer to server") + import_response = eulumdat_pb2.Import_Response() + import_response = stub.Import(eulumdat) + + logging.debug("Writing as {save_name.file_uri}") + save_response = eulumdat_pb2.Save_Response() + save_response = stub.Save(save_name) + assert helper.does_file_exist(save_name.file_uri) + + logging.debug("Reading {load_name.file_uri} back") + load_response = eulumdat_pb2.Load_Response() + load_response = stub.Load(load_name) + helper.remove_file(load_name.file_uri) + + logging.debug("Exporting eulumdat intensity protocol buffer") + export_request = eulumdat_pb2.Export_Request() + eulumdat2 = stub.Export(export_request) + + logging.debug("Check equal") + assert compareEulumdatIntensities(eulumdat, eulumdat2) diff --git a/tests/test_ies_file.py b/tests/test_ies_file.py new file mode 100644 index 000000000..7151a83c6 --- /dev/null +++ b/tests/test_ies_file.py @@ -0,0 +1,154 @@ +"""This module allows pytest to perform unit testing. + +Usage: +.. code:: + $ pytest + $ pytest -vx + +With coverage. +.. code:: + $ pytest --cov ansys.pyoptics.speos + +""" +import logging +import os + +from ansys.api.speos.intensity_distributions.v1 import ies_pb2, ies_pb2_grpc +import grpc + +from conftest import config, test_path +import helper + + +def createIesIntensity(): + ies = ies_pb2.IesIntensityDistribution() + + ies.norme_version = 1 + ies.key_words.append("IESNA:LM-63-95") + ies.key_words.append("[TEST] \t \tTest report number and laboratory") + ies.key_words.append("[MANUFAC] \tManufacturer of luminaire") + ies.key_words.append("[LUMCAT] \tLuminaire catalog number") + ies.key_words.append("[LUMINAIRE] \tLuminaire description") + ies.key_words.append("[LAMPCAT] \tLamp catalogue number") + ies.key_words.append("[LAMP] \tLamp description") + ies.unit = 1 + ies.nb_vertical_angle = 2 + ies.nb_horizontal_angle = 2 + ies.tilt_type = 1 + ies.tilt_geometry = 1 + ies.tilt_nb_pair_angle = 2 + ies.nb_lamp = 1 + ies.photo_type = 1 + ies.lumen_lamp = 4000 + ies.multiplier = 1 + ies.width = 0 + ies.length = 0 + ies.height = 0 + ies.ballast = 1 + ies.future_use = 1 + ies.input_watt = 500 + for i in range(int(ies.nb_vertical_angle)): + ies.vertical_angle.append(0 + i * 180 / (ies.nb_vertical_angle - 1)) + for i in range(int(ies.nb_horizontal_angle)): + ies.horizontal_angle.append(0 + i * 360 / (ies.nb_horizontal_angle - 1)) + for j in range(int(ies.nb_vertical_angle)): + ies.candela_value.append(1000) + for i in range(int(ies.tilt_nb_pair_angle)): + ies.tilt_angle.append(0 + i * 90 / (ies.tilt_nb_pair_angle - 1)) + ies.tilt_mult_factor.append(1) + ies.local_vert = 0 + + return ies + + +def compareIesIntensities(ies1, ies2): + if ies1.norme_version != ies2.norme_version: + return False + if len(ies1.key_words) != len(ies2.key_words): + return False + for i in range(len(ies1.key_words)): + if ies1.key_words[i] != ies2.key_words[i]: + return False + if ies1.unit != ies2.unit: + return False + if ies1.nb_vertical_angle != ies2.nb_vertical_angle: + return False + if ies1.nb_horizontal_angle != ies2.nb_horizontal_angle: + return False + if ies1.tilt_type != ies2.tilt_type: + return False + if ies1.tilt_geometry != ies2.tilt_geometry: + return False + if ies1.tilt_nb_pair_angle != ies2.tilt_nb_pair_angle: + return False + if ies1.nb_lamp != ies2.nb_lamp: + return False + if ies1.photo_type != ies2.photo_type: + return False + if ies1.lumen_lamp != ies2.lumen_lamp: + return False + if ies1.multiplier != ies2.multiplier: + return False + if ies1.width != ies2.width: + return False + if ies1.length != ies2.length: + return False + if ies1.height != ies2.height: + return False + if ies1.ballast != ies2.ballast: + return False + if ies1.future_use != ies2.future_use: + return False + if ies1.input_watt != ies2.input_watt: + return False + for i in range(int(ies1.nb_vertical_angle)): + if ies1.vertical_angle[i] != ies2.vertical_angle[i]: + return False + for i in range(int(ies1.nb_horizontal_angle)): + if ies1.horizontal_angle[i] != ies2.horizontal_angle[i]: + return False + for j in range(int(ies1.nb_vertical_angle)): + if ies1.candela_value[i * ies1.nb_vertical_angle + j] != ies2.candela_value[i * ies1.nb_vertical_angle + j]: + return False + for i in range(int(ies1.tilt_nb_pair_angle)): + if ies1.tilt_angle[i] != ies2.tilt_angle[i]: + return False + if ies1.tilt_mult_factor[i] != ies2.tilt_mult_factor[i]: + return False + if ies1.local_vert != ies2.local_vert: + return False + return True + + +def test_grpc_ies_intensity(): + with grpc.insecure_channel(f"localhost:" + str(config.get("SpeosServerPort"))) as channel: + stub = ies_pb2_grpc.IesIntensityServiceStub(channel) + save_request = ies_pb2.Save_Request() + save_request.file_uri = os.path.join(test_path, "tmp2_file.ies") + load_request = ies_pb2.Load_Request() + load_request.file_uri = os.path.join(test_path, "tmp2_file.ies") + + logging.debug("Creating ies intensity protocol buffer") + ies = createIesIntensity() + + logging.debug("Sending protocol buffer to server") + import_response = ies_pb2.Import_Response() + import_response = stub.Import(ies) + + logging.debug("Writing as {save_request.file_uri}") + save_response = ies_pb2.Save_Response() + save_response = stub.Save(save_request) + assert helper.does_file_exist(save_request.file_uri) + + logging.debug("Reading {load_response.file_uri}") + load_response = ies_pb2.Load_Response() + load_response = stub.Load(load_request) + helper.remove_file(load_request.file_uri) + + logging.debug("Exporting ies intensity protocol buffer") + export_request = ies_pb2.Export_Request() + ies2 = ies_pb2.IesIntensityDistribution() + ies2 = stub.Export(export_request) + + logging.debug("Comparing ies intensity distributions") + assert compareIesIntensities(ies, ies2) diff --git a/tests/test_xmp_intensity_file.py b/tests/test_xmp_intensity_file.py new file mode 100644 index 000000000..853c6c086 --- /dev/null +++ b/tests/test_xmp_intensity_file.py @@ -0,0 +1,159 @@ +"""This module allows pytest to perform unit testing. + +Usage: +.. code:: + $ pytest + $ pytest -vx + +With coverage. +.. code:: + $ pytest --cov ansys.pyoptics.speos + +""" +import logging +import os + +from ansys.api.speos.intensity_distributions.v1 import ( + base_map_template_pb2, + extended_map_template_pb2, + xmp_pb2, + xmp_pb2_grpc, +) +import grpc + +from conftest import config, test_path +import helper + + +def createXmpIntensity(): + xmp = extended_map_template_pb2.ExtendedMap() + + # file description + xmp.base_data.value_type = base_map_template_pb2.ValueTypes.OptisValueTypeIntensity + xmp.base_data.unit_type = base_map_template_pb2.UnitTypes.OptisUnitTypeRadiometric + xmp.base_data.intensity_type = base_map_template_pb2.IntensityTypes.OptisIntensityConoscopic + # xmp.base_data.coordinate_unit = base_map_template_pb2.CoordinateUnits.OptisUnitDefault + xmp.base_data.colorimetric_standard = base_map_template_pb2.CIEStandard.CIE_STANDARD_UNKNOWN + xmp.base_data.map_type = base_map_template_pb2.MapTypes.OptisMapTypeExtended + xmp.base_data.layer_type = base_map_template_pb2.LayerTypes.OptisMapLayerTypeNone + + # file dimensions + xmp.base_data.x_nb = 10 + xmp.base_data.y_nb = 10 + xmp.base_data.layer_nb = 1 + xmp.base_data.x_min = -5 + xmp.base_data.x_max = 5 + xmp.base_data.y_min = -5 + xmp.base_data.y_max = 5 + xmp.base_data.precision = 1 + + # sensor data + xmp.base_data.is_finite_distance = False + xmp.base_data.finite_difference_sensor_radius = 0 + xmp.base_data.detector_extent = False + xmp.base_data.rad_angular_resolution_radius = 0 + + # fill layer data + for l in range(xmp.base_data.layer_nb): + xmp.base_data.layer.add() + xmp.base_data.layer[l].layer_name = "0" + str(l) + xmp.base_data.layer[l].initial_source_power = 1000 + xmp.base_data.layer[l].initial_source_power_watt = 1000 + xmp.base_data.layer[l].initial_source_power_lumen = 1000 + for s in range(10): + xmp.base_data.layer[l].wavelength.append(400 + 40 * s) + xmp.base_data.layer[l].value.append(0.1) + xmp.value.layer.add() + for y in range(xmp.base_data.y_nb): + xmp.value.layer[l].y.add() + for x in range(xmp.base_data.x_nb): + if x == y: + xmp.value.layer[l].y[y].x.append(1) + else: + xmp.value.layer[l].y[y].x.append(0) + + return xmp + + +def compareXmpIntensityDistributions(xmp1, xmp2): + if xmp1.base_data.value_type != xmp2.base_data.value_type: + return False + if xmp1.base_data.intensity_type != xmp2.base_data.intensity_type: + return False + if xmp1.base_data.unit_type != xmp2.base_data.unit_type: + return False + # if xmp1.coordinate_unit != xmp2.coordinate_unit: + # return False + if xmp1.base_data.colorimetric_standard != xmp2.base_data.colorimetric_standard: + return False + if xmp1.base_data.map_type != xmp2.base_data.map_type: + return False + if xmp1.base_data.layer_type != xmp2.base_data.layer_type: + return False + if xmp1.base_data.x_nb != xmp2.base_data.x_nb: + return False + if xmp1.base_data.y_nb != xmp2.base_data.y_nb: + return False + if xmp1.base_data.layer_nb != xmp2.base_data.layer_nb: + return False + if xmp1.base_data.x_min != xmp2.base_data.x_min: + return False + if xmp1.base_data.x_max != xmp2.base_data.x_max: + return False + if xmp1.base_data.y_min != xmp2.base_data.y_min: + return False + if xmp1.base_data.y_max != xmp2.base_data.y_max: + return False + if xmp1.base_data.precision != xmp2.base_data.precision: + return False + for l in range(xmp1.base_data.layer_nb): + if xmp1.base_data.layer[l].layer_name != xmp2.base_data.layer[l].layer_name: + return False + if xmp1.base_data.layer[l].initial_source_power != xmp2.base_data.layer[l].initial_source_power: + return False + if xmp1.base_data.layer[l].initial_source_power_watt != xmp2.base_data.layer[l].initial_source_power_watt: + return False + if xmp1.base_data.layer[l].initial_source_power_lumen != xmp2.base_data.layer[l].initial_source_power_lumen: + return False + for y in range(xmp1.base_data.y_nb): + for x in range(xmp1.base_data.x_nb): + if xmp1.value.layer[l].y[y].x[x] != xmp2.value.layer[l].y[y].x[x]: + return False + return True + + +def test_grpc_xmp_intensity(): + with grpc.insecure_channel(f"localhost:" + str(config.get("SpeosServerPort"))) as channel: + stub = xmp_pb2_grpc.XmpIntensityServiceStub(channel) + load_request = xmp_pb2.Load_Request() + load_request.file_uri = os.path.join(test_path, "conoscopic_intensity.xmp") + load_response = xmp_pb2.Load_Response() + save_request = xmp_pb2.Save_Request() + save_request.file_uri = os.path.join(test_path, "conoscopic_intensity.xmp") + save_response = xmp_pb2.Save_Response() + + logging.debug(f"Creating xmp intensity protocol buffer") + xmp = createXmpIntensity() + response = xmp_pb2.XmpDistribution() + response.extended_map.CopyFrom(xmp) + + logging.debug(f"Sending protocol buffer to server") + import_response = xmp_pb2.Import_Response() + import_response = stub.Import(response) + + logging.debug(f"Saving {save_request.file_uri}") + save_response = stub.Save(save_request) + assert helper.does_file_exist(save_request.file_uri) + + logging.debug(f"Reading {load_request.file_uri}") + load_response = stub.Load(load_request) + helper.remove_file(load_request.file_uri) + + logging.debug(f"Export xmp intensity protocol buffer") + export_request = xmp_pb2.Export_Request() + distri = xmp_pb2.XmpDistribution() + distri = stub.Export(export_request) + xmp2 = distri.extended_map + + logging.debug(f"Comparing xmp intensity distributions") + assert compareXmpIntensityDistributions(xmp, xmp2) diff --git a/tests/test_xmp_spectral_intensity_file.py b/tests/test_xmp_spectral_intensity_file.py new file mode 100644 index 000000000..e8d3d2432 --- /dev/null +++ b/tests/test_xmp_spectral_intensity_file.py @@ -0,0 +1,218 @@ +"""This module allows pytest to perform unit testing. + +Usage: +.. code:: + $ pytest + $ pytest -vx + +With coverage. +.. code:: + $ pytest --cov ansys.pyoptics.speos + +""" +import logging +import os + +from ansys.api.speos.intensity_distributions.v1 import ( + base_map_template_pb2, + spectral_map_template_pb2, + xmp_pb2, + xmp_pb2_grpc, +) +import grpc + +from conftest import config, test_path +import helper + + +def createXmpIntensity(): + xmp = spectral_map_template_pb2.SpectralMap() + + # file description + xmp.base_data.value_type = base_map_template_pb2.ValueTypes.OptisValueTypeIntensity + xmp.base_data.unit_type = base_map_template_pb2.UnitTypes.OptisUnitTypeRadiometric + xmp.base_data.intensity_type = base_map_template_pb2.IntensityTypes.OptisIntensityConoscopic + # xmp.base_data.coordinate_unit = base_map_template_pb2.CoordinateUnits.OptisUnitDefault + xmp.base_data.colorimetric_standard = base_map_template_pb2.CIEStandard.CIE_STANDARD_UNKNOWN + xmp.base_data.map_type = base_map_template_pb2.MapTypes.OptisMapTypeSpectral + xmp.base_data.layer_type = base_map_template_pb2.LayerTypes.OptisMapLayerTypeNone + + # file dimensions + xmp.base_data.x_nb = 10 + xmp.base_data.y_nb = 10 + xmp.base_data.layer_nb = 1 + xmp.base_data.x_min = -5 + xmp.base_data.x_max = 5 + xmp.base_data.y_min = -5 + xmp.base_data.y_max = 5 + xmp.base_data.precision = 1 + + # sensor data + xmp.base_data.is_finite_distance = False + xmp.base_data.finite_difference_sensor_radius = 0 + xmp.base_data.detector_extent = False + xmp.base_data.rad_angular_resolution_radius = 0 + + # spectral data + xmp.wavelength_nb = 5 + xmp.wavelength_min = 380.0 + xmp.wavelength_max = 780.0 + xmp.spectral_data_loaded = True + xmp.depth_data_loaded = True + + # fill layer data + for l in range(xmp.base_data.layer_nb): + xmp.base_data.layer.add() + xmp.base_data.layer[l].layer_name = "0" + str(l) + xmp.base_data.layer[l].initial_source_power = 1000 + xmp.base_data.layer[l].initial_source_power_watt = 1000 + xmp.base_data.layer[l].initial_source_power_lumen = 1000 + for s in range(xmp.wavelength_nb): + xmp.base_data.layer[l].wavelength.append(380 + 80 * s) + xmp.base_data.layer[l].value.append(0.1) + + xmp.spectral_value.layer.add() + for w in range(xmp.wavelength_nb): + xmp.spectral_value.layer[l].wavelength.add() + for y in range(xmp.base_data.y_nb): + xmp.spectral_value.layer[l].wavelength[w].y.add() + for x in range(xmp.base_data.x_nb): + xmp.spectral_value.layer[l].wavelength[w].y[y].x.append(1.0) + + xmp.color_value.layer.add() + for y in range(xmp.base_data.y_nb): + xmp.color_value.layer[l].y.add() + for x in range(xmp.base_data.x_nb): + xmp.color_value.layer[l].y[y].x.add() + xmp.color_value.layer[l].y[y].x[x].color_x = 0.0 + xmp.color_value.layer[l].y[y].x[x].color_y = 0.0 + xmp.color_value.layer[l].y[y].x[x].color_z = 0.0 + xmp.color_value.layer[l].y[y].x[x].radio = 0.0 + if x == y: + xmp.color_value.layer[l].y[y].x[x].color_x = 100 + xmp.color_value.layer[l].y[y].x[x].color_y = 100.0 + xmp.color_value.layer[l].y[y].x[x].color_z = 100.0 + xmp.color_value.layer[l].y[y].x[x].radio = 100.0 + + for y in range(xmp.base_data.y_nb): + xmp.depth_value.y.add() + for x in range(xmp.base_data.x_nb): + xmp.depth_value.y[y].x.append(1.0) + + return xmp + + +def compareXmpIntensityDistributions(xmp1, xmp2): + if xmp1.base_data.value_type != xmp2.base_data.value_type: + return False + if xmp1.base_data.intensity_type != xmp2.base_data.intensity_type: + return False + if xmp1.base_data.unit_type != xmp2.base_data.unit_type: + return False + # if xmp1.coordinate_unit != xmp2.coordinate_unit: + # return False + if xmp1.base_data.colorimetric_standard != xmp2.base_data.colorimetric_standard: + return False + if xmp1.base_data.map_type != xmp2.base_data.map_type: + return False + if xmp1.base_data.layer_type != xmp2.base_data.layer_type: + return False + if xmp1.base_data.x_nb != xmp2.base_data.x_nb: + return False + if xmp1.base_data.y_nb != xmp2.base_data.y_nb: + return False + if xmp1.base_data.layer_nb != xmp2.base_data.layer_nb: + return False + if xmp1.base_data.x_min != xmp2.base_data.x_min: + return False + if xmp1.base_data.x_max != xmp2.base_data.x_max: + return False + if xmp1.base_data.y_min != xmp2.base_data.y_min: + return False + if xmp1.base_data.y_max != xmp2.base_data.y_max: + return False + if xmp1.base_data.precision != xmp2.base_data.precision: + return False + if xmp1.wavelength_nb != xmp2.wavelength_nb: + return False + if xmp1.wavelength_min != xmp2.wavelength_min: + return False + if xmp1.wavelength_max != xmp2.wavelength_max: + return False + if xmp1.spectral_data_loaded != xmp2.spectral_data_loaded: + return False + if xmp1.depth_data_loaded != xmp2.depth_data_loaded: + return False + for l in range(xmp1.base_data.layer_nb): + if xmp1.base_data.layer[l].layer_name != xmp2.base_data.layer[l].layer_name: + return False + if xmp1.base_data.layer[l].initial_source_power != xmp2.base_data.layer[l].initial_source_power: + return False + if xmp1.base_data.layer[l].initial_source_power_watt != xmp2.base_data.layer[l].initial_source_power_watt: + return False + if xmp1.base_data.layer[l].initial_source_power_lumen != xmp2.base_data.layer[l].initial_source_power_lumen: + return False + for w in range(xmp1.wavelength_nb): + if xmp1.base_data.layer[l].wavelength[w] != xmp2.base_data.layer[l].wavelength[w]: + return False + if xmp1.base_data.layer[l].value[w] != xmp2.base_data.layer[l].value[w]: + return False + for y in range(xmp1.base_data.y_nb): + for x in range(xmp1.base_data.x_nb): + if ( + xmp1.spectral_value.layer[l].wavelength[w].y[y].x[x] + != xmp2.spectral_value.layer[l].wavelength[w].y[y].x[x] + ): + return False + for y in range(xmp1.base_data.y_nb): + for x in range(xmp1.base_data.x_nb): + if xmp1.color_value.layer[l].y[y].x[x].color_x != xmp2.color_value.layer[l].y[y].x[x].color_x: + return False + if xmp1.color_value.layer[l].y[y].x[x].color_y != xmp2.color_value.layer[l].y[y].x[x].color_y: + return False + if xmp1.color_value.layer[l].y[y].x[x].color_z != xmp2.color_value.layer[l].y[y].x[x].color_z: + return False + if xmp1.color_value.layer[l].y[y].x[x].radio != xmp2.color_value.layer[l].y[y].x[x].radio: + return False + for y in range(xmp1.base_data.y_nb): + for x in range(xmp1.base_data.x_nb): + if xmp1.depth_value.y[y].x[x] != xmp2.depth_value.y[y].x[x]: + return False + return True + + +def test_grpc_xmp_intensity(): + with grpc.insecure_channel(f"localhost:" + str(config.get("SpeosServerPort"))) as channel: + stub = xmp_pb2_grpc.XmpIntensityServiceStub(channel) + load_request = xmp_pb2.Load_Request() + load_request.file_uri = os.path.join(test_path, "conoscopic_intensity_spectral.xmp") + load_response = xmp_pb2.Load_Response() + save_request = xmp_pb2.Save_Request() + save_request.file_uri = os.path.join(test_path, "conoscopic_intensity_spectral.xmp") + save_response = xmp_pb2.Save_Response() + + logging.debug(f"Creating xmp intensity protocol buffer") + xmp = createXmpIntensity() + request = xmp_pb2.XmpDistribution() + request.spectral_map.CopyFrom(xmp) + + logging.debug(f"Sending protocol buffer to server") + import_response = xmp_pb2.Import_Response() + import_response = stub.Import(request) + + logging.debug(f"Saving {save_request.file_uri}") + save_response = stub.Save(save_request) + assert helper.does_file_exist(save_request.file_uri) + + logging.debug(f"Reading {load_request.file_uri}") + load_response = stub.Load(load_request) + helper.remove_file(load_request.file_uri) + + logging.debug(f"Export xmp intensity protocol buffer") + export_request = xmp_pb2.Export_Request() + distri = xmp_pb2.XmpDistribution() + distri = stub.Export(export_request) + xmp2 = distri.spectral_map + + logging.debug(f"Comparing xmp intensity distributions") + assert compareXmpIntensityDistributions(xmp, xmp2) From 14d4056567043855d5744c904341885a56843f5b Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Fri, 31 Mar 2023 15:59:16 +0200 Subject: [PATCH 07/16] add sensor test --- .../CameraDistortion.OPTDistortion | 55 +++++++ .../CameraSensitivityBlue.spectrum | 82 ++++++++++ .../CameraSensitivityGreen.spectrum | 104 ++++++++++++ .../CameraSensitivityRed.spectrum | 96 +++++++++++ .../CameraTransmittance.spectrum | 154 ++++++++++++++++++ .../Inverse_simu.speos/Inverse_simu.speos | Bin 0 -> 4292 bytes tests/local_config.json | 4 +- tests/test_sensor.py | 146 +++++++++++++++++ 8 files changed, 639 insertions(+), 2 deletions(-) create mode 100644 tests/assets/CameraInputFiles/CameraDistortion.OPTDistortion create mode 100644 tests/assets/CameraInputFiles/CameraSensitivityBlue.spectrum create mode 100644 tests/assets/CameraInputFiles/CameraSensitivityGreen.spectrum create mode 100644 tests/assets/CameraInputFiles/CameraSensitivityRed.spectrum create mode 100644 tests/assets/CameraInputFiles/CameraTransmittance.spectrum create mode 100644 tests/assets/Inverse_simu.speos/Inverse_simu.speos create mode 100644 tests/test_sensor.py diff --git a/tests/assets/CameraInputFiles/CameraDistortion.OPTDistortion b/tests/assets/CameraInputFiles/CameraDistortion.OPTDistortion new file mode 100644 index 000000000..0c7813b78 --- /dev/null +++ b/tests/assets/CameraInputFiles/CameraDistortion.OPTDistortion @@ -0,0 +1,55 @@ +OPTIS - Optical distortion file v1.0 +created by LMR 2011-01-22 +0 +51 +0.0000 0.0000 +0.0227 0.0211 +0.0454 0.0421 +0.0681 0.0631 +0.0908 0.0840 +0.1134 0.1048 +0.1361 0.1255 +0.1588 0.1461 +0.1815 0.1665 +0.2042 0.1868 +0.2269 0.2069 +0.2496 0.2268 +0.2723 0.2465 +0.2950 0.2660 +0.3176 0.2852 +0.3403 0.3043 +0.3630 0.3231 +0.3857 0.3416 +0.4084 0.3599 +0.4311 0.3779 +0.4538 0.3956 +0.4765 0.4131 +0.4992 0.4302 +0.5219 0.4471 +0.5445 0.4637 +0.5672 0.4800 +0.5899 0.4961 +0.6126 0.5118 +0.6353 0.5273 +0.6580 0.5424 +0.6807 0.5573 +0.7034 0.5719 +0.7261 0.5862 +0.7487 0.6002 +0.7714 0.6139 +0.7941 0.6274 +0.8168 0.6406 +0.8395 0.6535 +0.8622 0.6662 +0.8849 0.6786 +0.9076 0.6907 +0.9303 0.7026 +0.9529 0.7143 +0.9756 0.7257 +0.9983 0.7368 +1.0210 0.7478 +1.0437 0.7585 +1.0664 0.7690 +1.0891 0.7792 +1.1118 0.7893 +1.1345 0.7991 diff --git a/tests/assets/CameraInputFiles/CameraSensitivityBlue.spectrum b/tests/assets/CameraInputFiles/CameraSensitivityBlue.spectrum new file mode 100644 index 000000000..9f33bef18 --- /dev/null +++ b/tests/assets/CameraInputFiles/CameraSensitivityBlue.spectrum @@ -0,0 +1,82 @@ +OPTIS - Spectrum file v1.0 +Blue +79 +380 0 +380.7 0.1294 +388.3 1.5528 +391 2.38095 +394.5 3.41615 +399.3 6.52174 +401.4 8.17805 +405.5 11.4907 +411.7 16.4596 +417.9 22.3602 +419.3 23.6801 +421.4 25.6599 +428.9 32.9193 +432.4 37.1118 +436.5 42.1429 +442.7 49.6894 +448.9 56.5217 +452.3 59.9379 +455.8 63.354 +460.6 66.9772 +462 68.0124 +466.1 70.4969 +468.2 71.7391 +470.9 72.5673 +474.4 73.6025 +475.1 73.6025 +475.8 73.6025 +479.2 73.6025 +480.6 73.2919 +484.7 72.3602 +485.4 71.9462 +488.8 69.8758 +489.5 69.3434 +491.6 67.7462 +493.7 66.1491 +498.5 61.5295 +499.2 60.8696 +504 55.2795 +504.7 54.2236 +507.4 50 +508.1 49.0683 +508.8 48.1366 +513.6 41.6149 +514.3 40.6444 +518.5 34.8214 +519.1 33.8509 +521.2 30.4348 +523.3 27.0186 +524.7 25.4037 +529.5 19.7516 +530.2 18.9441 +534.3 14.2857 +535.7 12.7329 +539.1 10.2743 +540.5 9.29089 +543.3 7.32402 +543.9 6.8323 +548.8 4.03727 +549.4 3.83023 +550.1 3.62319 +552.9 2.79503 +555 2.27743 +555.6 2.1049 +559.1 1.24224 +559.8 1.18012 +561.2 1.0559 +565.3 0.68323 +566 0.621118 +570.8 0.379572 +572.2 0.310559 +576.3 0.263975 +577.7 0.248447 +582.5 0.194099 +586 0.15528 +588 0.131988 +590.1 0.108696 +594.2 0.0621118 +594.9 0.0543478 +599.7 0 diff --git a/tests/assets/CameraInputFiles/CameraSensitivityGreen.spectrum b/tests/assets/CameraInputFiles/CameraSensitivityGreen.spectrum new file mode 100644 index 000000000..44866f7e7 --- /dev/null +++ b/tests/assets/CameraInputFiles/CameraSensitivityGreen.spectrum @@ -0,0 +1,104 @@ +OPTIS - Spectrum file v1.0 +Green +101 +380 0 +380.7 0 +388.3 0.455487 +391 0.621118 +394.5 0.842946 +399.3 1.1535 +401.4 1.2866 +405.5 1.5528 +411.7 2.25155 +417.9 2.95031 +419.3 3.10559 +421.4 3.49788 +428.9 4.93625 +432.4 5.59006 +436.5 6.58385 +442.7 8.07453 +448.9 10.071 +452.3 11.1801 +455.8 13.1211 +460.6 15.8385 +462 17.3913 +466.1 22.0497 +468.2 24.4454 +470.9 27.6398 +474.4 31.4108 +475.1 32.165 +475.8 32.9193 +479.2 35.5812 +480.6 36.646 +484.7 38.5093 +485.4 38.8199 +488.8 41.4079 +489.5 41.9255 +491.6 44.5652 +493.7 47.205 +498.5 53.7267 +499.2 55.0725 +504 64.4928 +504.7 65.8385 +507.4 72.4638 +508.1 74.1201 +508.8 75.7764 +513.6 85.2873 +514.3 86.646 +518.5 93.1677 +519.1 93.9441 +521.2 96.2733 +523.3 98.1366 +524.7 98.5507 +529.5 100 +530.2 99.8669 +534.3 99.0683 +535.7 98.3585 +539.1 96.5839 +540.5 95.2381 +543.3 92.5466 +543.9 91.96 +548.8 87.8537 +549.4 87.2671 +550.1 86.413 +552.9 82.9969 +555 80.4348 +555.6 79.4341 +559.1 74.4306 +559.8 73.43 +561.2 71.4286 +565.3 64.7737 +566 63.6646 +570.8 54.9689 +572.2 53.1056 +576.3 47.5155 +577.7 45.5832 +582.5 38.8199 +586 33.5792 +588 30.4348 +590.1 27.7433 +594.2 22.3602 +594.9 21.6011 +599.7 16.2871 +600.4 15.528 +604.5 12.1739 +607.3 9.93789 +610.1 8.32298 +614.2 5.90062 +620.4 3.72671 +628 2.58799 +628.6 2.48447 +636.9 1.86335 +641 1.5528 +644.5 1.294 +649.3 0.931677 +654.1 0.931677 +657.6 0.931677 +661 0.759144 +667.9 0.414079 +670 0.310559 +676.2 0.25974 +683.1 0.203275 +692 0.12987 +704.4 0.0282326 +707.9 0 diff --git a/tests/assets/CameraInputFiles/CameraSensitivityRed.spectrum b/tests/assets/CameraInputFiles/CameraSensitivityRed.spectrum new file mode 100644 index 000000000..91058b12d --- /dev/null +++ b/tests/assets/CameraInputFiles/CameraSensitivityRed.spectrum @@ -0,0 +1,96 @@ +OPTIS - Spectrum file v1.0 +Red +93 +401.4 0 +405.5 0.0642536 +411.7 0.160634 +417.9 0.257014 +419.3 0.278432 +421.4 0.310559 +428.9 0.15528 +432.4 0.0846979 +436.5 0 +442.7 0.149734 +448.9 0.299468 +452.3 0.382653 +455.8 0.465839 +460.6 0.582298 +462 0.615572 +466.1 0.715395 +468.2 0.765306 +470.9 0.831854 +474.4 0.91504 +475.1 0.931677 +475.8 0.892857 +479.2 0.698758 +480.6 0.621118 +484.7 0.388199 +485.4 0.349379 +488.8 0.15528 +489.5 0.11646 +491.6 0 +493.7 0.0388199 +498.5 0.1294 +499.2 0.14234 +504 0.232919 +504.7 0.245859 +507.4 0.297619 +508.1 0.310559 +508.8 0.336439 +513.6 0.517598 +514.3 0.543478 +518.5 0.698758 +519.1 0.724638 +521.2 0.802277 +523.3 0.879917 +524.7 0.931677 +529.5 0.742641 +530.2 0.715636 +534.3 0.553605 +535.7 0.499595 +539.1 0.364569 +540.5 0.310559 +543.3 0.310559 +543.9 0.310559 +548.8 0.310559 +549.4 0.310559 +550.1 0.310559 +552.9 1.24224 +555 1.94099 +555.6 2.17391 +559.1 4.7619 +559.8 5.2795 +561.2 7.76398 +565.3 15.2174 +566 16.677 +570.8 26.8944 +572.2 29.8137 +576.3 38.8975 +577.7 41.9255 +582.5 48.7578 +586 50.9317 +588 51.2422 +590.1 51.5528 +594.2 52.6176 +594.9 52.795 +599.7 53.1056 +600.4 52.9281 +604.5 51.8634 +607.3 50.1553 +610.1 48.4472 +614.2 44.9689 +620.4 39.7516 +628 32.9193 +628.6 32.4415 +636.9 26.7081 +641 24.1671 +644.5 22.0497 +649.3 19.2547 +654.1 16.4596 +657.6 14.7516 +661 13.0435 +667.9 8.69565 +670 7.45342 +676.2 3.72671 +683.1 1.5528 +692 0 diff --git a/tests/assets/CameraInputFiles/CameraTransmittance.spectrum b/tests/assets/CameraInputFiles/CameraTransmittance.spectrum new file mode 100644 index 000000000..3a1fa3c10 --- /dev/null +++ b/tests/assets/CameraInputFiles/CameraTransmittance.spectrum @@ -0,0 +1,154 @@ +OPTIS - Spectrum file v1.0 +Transmittance +151 +350 0 +373.478039 0 +378.695847 0 +378.983182 1.154534 +379.850646 2.387713 +380.138821 3.374897 +381.006285 4.608076 +381.004395 5.719172 +381.581794 7.076263 +381.869338 8.433812 +382.446528 9.914359 +383.022667 12.012181 +383.599646 13.616183 +384.466270 15.343182 +385.042830 17.194094 +385.620229 18.551186 +385.906093 20.896375 +385.322603 23.119482 +385.318822 25.341673 +385.895381 27.192585 +385.892231 29.044412 +387.048290 31.017864 +386.464799 33.240971 +387.041358 35.091883 +387.618338 36.695884 +388.194897 38.546796 +388.193217 39.534437 +388.770406 41.014984 +389.636400 43.112349 +389.923314 44.840263 +390.210229 46.568177 +391.656353 48.417717 +392.810101 51.749176 +393.675255 54.340361 +395.120329 56.807177 +395.406403 59.028911 +395.982122 61.373644 +396.848747 63.100643 +397.423836 65.815741 +397.709490 68.284386 +397.705499 70.630033 +397.701508 72.975679 +398.856097 75.813318 +400.012576 77.539860 +401.168845 79.389857 +403.484744 81.114571 +405.511628 82.345921 +407.539142 83.206906 +410.436221 84.066519 +412.754010 84.680137 +416.231219 85.291926 +419.128928 85.781174 +422.316912 86.023054 +425.214831 86.388847 +427.822475 87.002007 +430.719974 87.614710 +433.907328 88.226956 +437.674812 88.591377 +441.732781 88.584976 +445.790750 88.578575 +451.007508 88.940710 +456.512651 90.166573 +461.728990 90.775618 +465.206829 91.017041 +470.134572 90.885813 +474.772251 90.878497 +478.250720 90.749555 +481.149480 90.621528 +486.367288 90.366387 +491.004757 90.482527 +495.352581 90.475668 +500.280114 90.467895 +543.758562 90.275854 +547.526046 90.640275 +552.162885 91.126779 +556.220014 91.614198 +561.146077 92.470611 +566.651010 93.819929 +571.288269 94.059524 +577.955142 93.925552 +583.174211 92.929681 +589.262844 91.932438 +593.032219 91.185763 +597.670107 91.054992 +602.887916 90.799852 +608.394529 91.161530 +613.320173 92.264852 +618.826156 92.996895 +624.042074 93.852851 +626.939993 94.218644 +632.736041 94.826774 +638.531880 95.558360 +643.458783 95.920952 +648.676172 95.912722 +652.444706 95.659867 +657.663985 94.540541 +661.433989 93.423501 +665.204833 91.812641 +668.395548 90.449605 +671.007393 88.593664 +671.301239 86.247559 +672.175634 83.406721 +672.468640 81.554437 +673.341985 79.330873 +674.505186 77.106853 +675.088466 75.007202 +676.831796 72.535356 +677.704512 70.682158 +677.709343 67.842691 +679.162188 65.741668 +680.324968 63.764557 +681.197054 62.281725 +681.200204 60.429898 +681.204195 58.084251 +682.367185 55.983686 +682.370336 54.131859 +684.114506 51.166193 +684.409612 48.079359 +684.414863 44.992981 +685.287999 42.892873 +686.451199 40.668852 +687.323914 38.815654 +687.907825 36.345638 +690.229605 34.613608 +690.233596 32.267962 +690.526181 30.662588 +691.110722 27.822206 +692.564197 25.350818 +694.017253 23.126340 +695.760163 20.901405 +698.953398 18.056908 +700.986163 15.831516 +703.018508 13.853034 +705.051273 11.627641 +708.242408 10.017695 +712.302477 8.776743 +717.232321 7.410964 +723.031520 6.167268 +727.671089 5.048856 +732.019333 4.795087 +736.657852 4.293951 +740.716451 3.917184 +747.674859 2.795115 +753.472798 2.292150 +759.561012 1.541817 +763.909255 1.288048 +768.836999 1.156820 +773.764953 0.902137 +777.532857 1.019648 +800 0.1 +850 0 \ No newline at end of file diff --git a/tests/assets/Inverse_simu.speos/Inverse_simu.speos b/tests/assets/Inverse_simu.speos/Inverse_simu.speos new file mode 100644 index 0000000000000000000000000000000000000000..1cce0437d3c27b90f457f780e7ff6ea3bca7f5c5 GIT binary patch literal 4292 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 mtemuguAd2e6?|~?4$S6r%7{e^WK$b+cM Date: Mon, 3 Apr 2023 08:12:52 +0200 Subject: [PATCH 08/16] Maint: add the ansys-api-speos dependency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1a58a83ae..2a79b94d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers=[ dependencies=[ "grpcio==1.51.3", "grpcio-tools==1.48.2", - "ansys-api-speos==1.0.0", + "ansys-api-speos==0.2.0", ] [project.optional-dependencies] From 66caadc31883d500a1da1856fe7e8a529ef79d9d Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Mon, 3 Apr 2023 10:47:08 +0200 Subject: [PATCH 09/16] . --- tests/test_job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_job.py b/tests/test_job.py index 6389dcf31..4897c2e60 100644 --- a/tests/test_job.py +++ b/tests/test_job.py @@ -86,7 +86,7 @@ def test_job(): assert job_information.title == "Direct Simulation Processing" assert job_information.name == "ASSEMBLY1.DS (0)" - # Get results + # Get the results get_results_res = job_stub.GetResults(job__v1__pb2.GetResults_Request(guid=job_create_res.guid)) assert len(get_results_res.results) == 2 for result in get_results_res.results: From 6de921842aebfc99c06df3fd2b9140bf14c6b773 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Mon, 3 Apr 2023 12:36:28 +0200 Subject: [PATCH 10/16] MAint: debug with licence --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 535f614fc..ea9a285db 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -90,7 +90,7 @@ jobs: docker kill optics_speos-rpc docker rm optics_speos-rpc env: - LICENSE_SERVER: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} + LICENSE_SERVER: ${{ secrets.LICENSE_SERVER) }} - name: Upload wheel uses: actions/upload-artifact@v3 From b8939d80c222efb2b77aecdd4919069841294cc3 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Mon, 3 Apr 2023 12:38:11 +0200 Subject: [PATCH 11/16] MAint: debug with licence typo --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index ea9a285db..8d49ada5c 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -90,7 +90,7 @@ jobs: docker kill optics_speos-rpc docker rm optics_speos-rpc env: - LICENSE_SERVER: ${{ secrets.LICENSE_SERVER) }} + LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} - name: Upload wheel uses: actions/upload-artifact@v3 From e221f2b515a125392d941b3d5ce900bb66c827d9 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Mon, 3 Apr 2023 12:45:21 +0200 Subject: [PATCH 12/16] Maint: revert the changes --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 8d49ada5c..535f614fc 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -90,7 +90,7 @@ jobs: docker kill optics_speos-rpc docker rm optics_speos-rpc env: - LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} + LICENSE_SERVER: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} - name: Upload wheel uses: actions/upload-artifact@v3 From bb0b399ca29cc0cc0875ef57a7fab718ea7da7a8 Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Mon, 3 Apr 2023 14:23:22 +0200 Subject: [PATCH 13/16] speos-rpc:2023.2.0.604 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index ca1a25260..f6e22cead 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.4" services: optics_speos-rpc: - image: ghcr.io/pyansys/pyoptics/speos-rpc:2023.2.0.666 + image: ghcr.io/pyansys/pyoptics/speos-rpc:2023.2.0.604 container_name: optics_speos-rpc ports: - "50051:50051" From e4c207dbc0caf116e160412272de67f7a5146b43 Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Mon, 3 Apr 2023 14:33:38 +0200 Subject: [PATCH 14/16] speos-rpc:2023.2.0.517 --- .github/workflows/ci_cd.yml | 58 ++++++++++++++++++------------------- docker-compose.yml | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 535f614fc..4c0123921 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -20,39 +20,39 @@ concurrency: jobs: - style: - name: Code style - runs-on: ubuntu-latest - steps: - - name: PyAnsys code style checks - uses: pyansys/actions/code-style@v4 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - docs-style: - name: Documentation Style Check - runs-on: ubuntu-latest - steps: - - name: PyAnsys documentation style checks - uses: pyansys/actions/doc-style@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - docs-build: - - name: Doc building - runs-on: ubuntu-latest - needs: docs-style - steps: - - name: "Run Ansys documentation building action" - uses: pyansys/actions/doc-build@v4 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} + #style: + # name: Code style + # runs-on: ubuntu-latest + # steps: + # - name: PyAnsys code style checks + # uses: pyansys/actions/code-style@v4 + # with: + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + + #docs-style: + # name: Documentation Style Check + # runs-on: ubuntu-latest + # steps: + # - name: PyAnsys documentation style checks + # uses: pyansys/actions/doc-style@v4 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + + #docs-build: + + # name: Doc building + # runs-on: ubuntu-latest + # needs: docs-style + # steps: + # - name: "Run Ansys documentation building action" + # uses: pyansys/actions/doc-build@v4 + # with: + # python-version: ${{ env.MAIN_PYTHON_VERSION }} tests: name: Build and testing runs-on: ubuntu-latest - needs: [style,docs-build] + #needs: [style,docs-build] steps: - uses: actions/checkout@v3 diff --git a/docker-compose.yml b/docker-compose.yml index f6e22cead..db3f5e3d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.4" services: optics_speos-rpc: - image: ghcr.io/pyansys/pyoptics/speos-rpc:2023.2.0.604 + image: ghcr.io/pyansys/pyoptics/speos-rpc:2023.2.0.517 container_name: optics_speos-rpc ports: - "50051:50051" From 9c0779beafc012887fb7e545af81b21ec2243e6f Mon Sep 17 00:00:00 2001 From: Elodie Chamblas Date: Mon, 3 Apr 2023 14:37:31 +0200 Subject: [PATCH 15/16] speos-rpc:2023.2.0.305 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index db3f5e3d8..9d66404eb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.4" services: optics_speos-rpc: - image: ghcr.io/pyansys/pyoptics/speos-rpc:2023.2.0.517 + image: ghcr.io/pyansys/pyoptics/speos-rpc:2023.2.0.305 container_name: optics_speos-rpc ports: - "50051:50051" From 4bb2618abfed1de3fd60398caf6acca92b0d3995 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Mon, 3 Apr 2023 14:53:13 +0200 Subject: [PATCH 16/16] Feat: chnage secret name --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 4c0123921..bb4fbc42d 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -90,7 +90,7 @@ jobs: docker kill optics_speos-rpc docker rm optics_speos-rpc env: - LICENSE_SERVER: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} + LICENSE_SERVER: ${{ format('1055@{0}', secrets.LICENSE_SERVER_OPTICS) }} - name: Upload wheel uses: actions/upload-artifact@v3