From 075f1b568a0f843e893c44866174a9e6127671c5 Mon Sep 17 00:00:00 2001 From: Matthew Young <86373761+myoung301@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:45:46 -0500 Subject: [PATCH 1/3] Fix active design selection behavior for Emit designs If the project and design names are not specified, the active project and active design are supposed to be used. However, a new project is always being created when the Emit() object is created. --- pyaedt/emit.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyaedt/emit.py b/pyaedt/emit.py index 70b37b3fa13..e9c47a07fc0 100644 --- a/pyaedt/emit.py +++ b/pyaedt/emit.py @@ -114,8 +114,6 @@ def __init__( port=0, aedt_process_id=None, ): - if projectname is None: - projectname = generate_unique_project_name() self.__emit_api_enabled = False self.results = None """Constructor for the ``FieldAnalysisEmit`` class""" From 83d3e9da659f6dc3535e33b2b0b5e6f02ec8aeda Mon Sep 17 00:00:00 2001 From: Matthew Young <86373761+myoung301@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:53:26 -0500 Subject: [PATCH 2/3] Remove unused import in emit.py --- pyaedt/emit.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyaedt/emit.py b/pyaedt/emit.py index e9c47a07fc0..f67e403be6e 100644 --- a/pyaedt/emit.py +++ b/pyaedt/emit.py @@ -3,7 +3,6 @@ import warnings from pyaedt import emit_core -from pyaedt import generate_unique_project_name from pyaedt.application.Design import Design from pyaedt.emit_core.Couplings import CouplingsEmit from pyaedt.emit_core.emit_constants import EMIT_VALID_UNITS From f89c709caf9fdde20596579b762ecdaf2eebbb3a Mon Sep 17 00:00:00 2001 From: myoung <86373761+myoung301@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:13:35 -0500 Subject: [PATCH 3/3] Use a new EMIT design for unit tests that require it --- _unittest_solvers/test_26_emit.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/_unittest_solvers/test_26_emit.py b/_unittest_solvers/test_26_emit.py index 91cfc2b9fff..adabbac4cc8 100644 --- a/_unittest_solvers/test_26_emit.py +++ b/_unittest_solvers/test_26_emit.py @@ -7,6 +7,7 @@ import pytest from pyaedt import Emit +from pyaedt import generate_unique_project_name from pyaedt.emit_core.emit_constants import EmiCategoryFilter from pyaedt.emit_core.emit_constants import InterfererType from pyaedt.emit_core.emit_constants import ResultType @@ -373,7 +374,7 @@ def test_07_antenna_component(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_08_revision_generation(self, add_app): - self.aedtapp = add_app(application=Emit) + self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) assert len(self.aedtapp.results.revisions) == 0 # place components and generate the appropriate number of revisions rad1 = self.aedtapp.modeler.components.create_component("UE - Handheld") @@ -443,7 +444,7 @@ def test_08_revision_generation(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_09_manual_revision_access_test_getters(self, add_app): - self.aedtapp = add_app(application=Emit) + self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) rad1 = self.aedtapp.modeler.components.create_component("UE - Handheld") ant1 = self.aedtapp.modeler.components.create_component("Antenna") rad2 = self.aedtapp.modeler.components.create_component("Bluetooth") @@ -512,7 +513,7 @@ def test_09_manual_revision_access_test_getters(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_10_radio_band_getters(self, add_app): - self.aedtapp = add_app(application=Emit) + self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) rad1, ant1 = self.aedtapp.modeler.components.create_radio_antenna("New Radio") rad2, ant2 = self.aedtapp.modeler.components.create_radio_antenna("Bluetooth Low Energy (LE)") rad3, ant3 = self.aedtapp.modeler.components.create_radio_antenna("WiFi - 802.11-2012") @@ -729,7 +730,7 @@ def test_14_version(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_15_basic_run(self, add_app): - self.aedtapp = add_app(application=Emit) + self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) assert len(self.aedtapp.results.revisions) == 0 # place components and generate the appropriate number of revisions rad1 = self.aedtapp.modeler.components.create_component("UE - Handheld") @@ -811,7 +812,7 @@ def test_15_basic_run(self, add_app): reason="Skipped on versions earlier than 2024.1", ) def test_16_optimal_n_to_1_feature(self, add_app): - self.aedtapp = add_app(application=Emit) + self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) # place components and generate the appropriate number of revisions rad1 = self.aedtapp.modeler.components.create_component("Bluetooth") ant1 = self.aedtapp.modeler.components.create_component("Antenna") @@ -867,7 +868,7 @@ def test_16_optimal_n_to_1_feature(self, add_app): reason="Skipped on versions earlier than 2023.2", ) def test_17_availability_1_to_1(self, add_app): - self.aedtapp = add_app(application=Emit) + self.aedtapp = add_app(application=Emit, project_name=generate_unique_project_name()) # place components and generate the appropriate number of revisions rad1 = self.aedtapp.modeler.components.create_component("MD400C") ant1 = self.aedtapp.modeler.components.create_component("Antenna")