-
Notifications
You must be signed in to change notification settings - Fork 64
📡 RF modular restructure v1 #2567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
122bab6
7ea70be
417b98f
3dce16a
1e86be9
571572f
5bdca9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"""Imports from microwave plugin.""" | ||
|
||
from __future__ import annotations | ||
|
||
from tidy3d.components.microwave import models | ||
from tidy3d.components.microwave.array_factor import ( | ||
RectangularAntennaArrayCalculator, | ||
) | ||
from tidy3d.microwave.lobe_measurer import LobeMeasurer | ||
|
||
__all__ = [ | ||
"AxisAlignedPathIntegral", | ||
"CurrentIntegralAxisAligned", | ||
"CurrentIntegralTypes", | ||
"CustomCurrentIntegral2D", | ||
"CustomPathIntegral2D", | ||
"CustomVoltageIntegral2D", | ||
"ImpedanceCalculator", | ||
"LobeMeasurer", | ||
"RectangularAntennaArrayCalculator", | ||
"VoltageIntegralAxisAligned", | ||
"VoltageIntegralTypes", | ||
"models", | ||
"path_integrals_from_lumped_element", | ||
"rf_material_library", | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,24 +2,28 @@ | |
|
||
from __future__ import annotations | ||
|
||
from . import models | ||
from .array_factor import ( | ||
from tidy3d.components.microwave import models | ||
from tidy3d.components.microwave.array_factor import ( | ||
RectangularAntennaArrayCalculator, | ||
) | ||
from .auto_path_integrals import path_integrals_from_lumped_element | ||
from .custom_path_integrals import ( | ||
from tidy3d.components.microwave.auto_path_integrals import path_integrals_from_lumped_element | ||
from tidy3d.components.microwave.custom_path_integrals import ( | ||
CustomCurrentIntegral2D, | ||
CustomPathIntegral2D, | ||
CustomVoltageIntegral2D, | ||
) | ||
from .impedance_calculator import CurrentIntegralTypes, ImpedanceCalculator, VoltageIntegralTypes | ||
from .lobe_measurer import LobeMeasurer | ||
from .path_integrals import ( | ||
from tidy3d.components.microwave.impedance_calculator import ( | ||
CurrentIntegralTypes, | ||
ImpedanceCalculator, | ||
VoltageIntegralTypes, | ||
) | ||
from tidy3d.components.microwave.path_integrals import ( | ||
AxisAlignedPathIntegral, | ||
CurrentIntegralAxisAligned, | ||
VoltageIntegralAxisAligned, | ||
) | ||
from .rf_material_library import rf_material_library | ||
from tidy3d.components.microwave.rf_material_library import rf_material_library | ||
from tidy3d.microwave.lobe_measurer import LobeMeasurer | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Inconsistent module placement - LobeMeasurer is imported from tidy3d.microwave while all other components are moved to tidy3d.components.microwave. This breaks the modularization pattern. |
||
|
||
__all__ = [ | ||
"AxisAlignedPathIntegral", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,17 @@ | |
|
||
import warnings | ||
|
||
from .component_modelers.modal import AbstractComponentModeler, ComponentModeler, ModalPortDataArray | ||
from .component_modelers.terminal import TerminalComponentModeler | ||
from .data.terminal import PortDataArray, TerminalPortDataArray | ||
from .ports.coaxial_lumped import CoaxialLumpedPort | ||
from .ports.modal import Port | ||
from .ports.rectangular_lumped import LumpedPort | ||
from .ports.wave import WavePort | ||
from tidy3d.components.microwave.component_modelers.modal import ( | ||
AbstractComponentModeler, | ||
ComponentModeler, | ||
ModalPortDataArray, | ||
) | ||
from tidy3d.components.microwave.component_modelers.terminal import TerminalComponentModeler | ||
from tidy3d.components.microwave.data.terminal import PortDataArray, TerminalPortDataArray | ||
from tidy3d.components.microwave.ports.coaxial_lumped import CoaxialLumpedPort | ||
from tidy3d.components.microwave.ports.modal import Port | ||
from tidy3d.components.microwave.ports.rectangular_lumped import LumpedPort | ||
from tidy3d.components.microwave.ports.wave import WavePort | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Consider grouping these imports by type (component modelers, data, ports) using separate import blocks with newlines for better readability |
||
|
||
# Instantiate on plugin import till we unite with toplevel | ||
warnings.filterwarnings( | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||||||||||||||||||||
# backwards compatibility support for ``from tidy3d.plugins.smatrix.smatrix import `` | ||||||||||||||||||||||||
from __future__ import annotations | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
from .component_modelers.modal import ComponentModeler | ||||||||||||||||||||||||
from .ports.modal import Port | ||||||||||||||||||||||||
from tidy3d.components.microwave.component_modelers.modal import ComponentModeler | ||||||||||||||||||||||||
from tidy3d.components.microwave.ports.modal import Port | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
__all__ = ["ComponentModeler", "Port"] | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Add explicit version deprecation warning using warnings.warn to notify users about future path changes
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Several symbols listed in all are not imported anywhere in this file (e.g., AxisAlignedPathIntegral, ImpedanceCalculator)