Skip to content

Conversation

@daquinteroflex
Copy link
Collaborator

@daquinteroflex daquinteroflex commented Nov 20, 2025

  • from tidy3d.rf import *
  • Backwards compatible changes

Greptile Overview

Greptile Summary

This PR introduces a new tidy3d.rf namespace to consolidate all RF-related classes from the microwave and smatrix plugins, making them accessible via from tidy3d.rf import *. The PR also adds backwards compatibility aliases for renamed path integral classes in both the top-level package and microwave plugin.

Key changes:

  • Created new tidy3d/rf.py module that exports all RF classes from microwave and smatrix plugins
  • Added backwards compatibility aliases in tidy3d/__init__.py for four renamed integral classes
  • Added backwards compatibility aliases in tidy3d/plugins/microwave/__init__.py for all five renamed integral classes
  • Updated CHANGELOG.md to document the new namespace and reorganize breaking changes into "Breaking Changes" and "Planned Deprecation" sections

Critical issue found: The new tidy3d.rf module is missing the CustomPathIntegral2D backwards compatibility alias that exists in the microwave plugin. This breaks backwards compatibility for users importing from the new RF namespace.

Confidence Score: 2/5

  • This PR has a critical backwards compatibility issue that will cause runtime errors for users
  • Score reflects a critical missing backwards compatibility alias (CustomPathIntegral2D) in the new RF namespace that exists in the microwave plugin, which will break user code that relies on the deprecated class name when importing from tidy3d.rf. Additionally, the warning message contains emojis which violates the codebase style guidelines.
  • Pay close attention to tidy3d/rf.py which has critical missing backwards compatibility alias and style violation

Important Files Changed

File Analysis

Filename Score Overview
tidy3d/rf.py 2/5 New RF namespace module missing CustomPathIntegral2D backwards compatibility alias and contains emoji in warning message
tidy3d/init.py 5/5 Added backwards compatibility aliases for renamed integral classes, properly exported in __all__
tidy3d/plugins/microwave/init.py 5/5 Added all backwards compatibility aliases including CustomPathIntegral2D, properly exported in __all__
CHANGELOG.md 5/5 Added entry for new tidy3d.rf namespace and reorganized breaking changes into proper sections

Sequence Diagram

sequenceDiagram
    participant User
    participant tidy3d.rf
    participant tidy3d.__init__
    participant microwave_plugin
    participant components

    Note over User,components: New RF Namespace Consolidation

    User->>tidy3d.rf: from tidy3d.rf import *
    tidy3d.rf->>components: Import path integrals
    tidy3d.rf->>microwave_plugin: Import models, array_factor, rf_material_library
    tidy3d.rf->>microwave_plugin: Import smatrix components
    tidy3d.rf-->>User: Return consolidated RF classes
    
    Note over tidy3d.rf: Create backwards compatibility aliases:<br/>CurrentIntegralTypes, VoltageIntegralTypes,<br/>ComponentModeler, CustomPathIntegral2D (MISSING)

    User->>tidy3d.__init__: from tidy3d import VoltageIntegralAxisAligned
    tidy3d.__init__->>components: Import AxisAlignedVoltageIntegral
    Note over tidy3d.__init__: Create backwards compatibility alias:<br/>VoltageIntegralAxisAligned
    tidy3d.__init__-->>User: Return aliased class

    User->>microwave_plugin: from tidy3d.plugins.microwave import CustomPathIntegral2D
    microwave_plugin->>components: Import Custom2DPathIntegral
    Note over microwave_plugin: Create backwards compatibility alias:<br/>CustomPathIntegral2D
    microwave_plugin-->>User: Return aliased class
Loading

@daquinteroflex daquinteroflex force-pushed the dario/rf_namespace branch 2 times, most recently from 698242d to f7545c2 Compare November 20, 2025 11:31
@daquinteroflex daquinteroflex marked this pull request as ready for review November 20, 2025 14:15
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@daquinteroflex daquinteroflex changed the title chore: rf namespace and consolidation chore: rf namespace and consolidation (FXC-3912, FXC-3965) Nov 20, 2025
Copy link
Contributor

@dmarek-flex dmarek-flex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing the dirty work!

@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

  • tidy3d/init.py (100%)
  • tidy3d/plugins/microwave/init.py (100%)
  • tidy3d/rf.py (100%)

Summary

  • Total: 48 lines
  • Missing: 0 lines
  • Coverage: 100%

Copy link
Contributor

@dmarek-flex dmarek-flex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you have got most of the rf-specific stuff

Copy link
Collaborator

@weiliangjin2021 weiliangjin2021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few others:

  • medium.py: LossyMetalMedium, SurfaceImpedanceFitterParam, HammerstadSurfaceRoughness, HuraySurfaceRoughness
  • grid_spec.py: LayerRefinementSpec, CornerFinderSpec
  • subpixel_spec.py: SurfaceImpedance

@daquinteroflex daquinteroflex force-pushed the dario/rf_namespace branch 5 times, most recently from 4a283eb to 17a9897 Compare November 21, 2025 15:02
@daquinteroflex daquinteroflex added this pull request to the merge queue Nov 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Nov 21, 2025
@daquinteroflex daquinteroflex added this pull request to the merge queue Nov 21, 2025
Merged via the queue into develop with commit 20a7f36 Nov 21, 2025
19 checks passed
@daquinteroflex daquinteroflex deleted the dario/rf_namespace branch November 21, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.10 rc3 3rd pre-release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants