Skip to content

Commit 332ce71

Browse files
Revert "Reorganise based on feedback"
This reverts commit 6aeb51e.
1 parent 6aeb51e commit 332ce71

File tree

117 files changed

+117
-258
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+117
-258
lines changed

tests/test_components/test_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88

99
from tidy3d.components.base import Tidy3dBaseModel
10-
from tidy3d.components.types import ArrayLike, Complex, constrained_array
10+
from tidy3d.components.types.base import ArrayLike, Complex, constrained_array
1111

1212

1313
def _test_validate_array_like():

tidy3d/components/apodization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import numpy as np
66
import pydantic.v1 as pd
77

8-
from tidy3d.components.types import ArrayFloat1D, Ax
8+
from tidy3d.components.types.base import ArrayFloat1D, Ax
99
from tidy3d.constants import SECOND
1010
from tidy3d.exceptions import SetupError
1111

tidy3d/components/autograd/derivative_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import xarray as xr
1010

1111
from tidy3d.components.data.data_array import FreqDataArray, ScalarFieldDataArray
12-
from tidy3d.components.types import ArrayLike, Bound, tidycomplex
12+
from tidy3d.components.types.base import ArrayLike, Bound, tidycomplex
1313
from tidy3d.constants import C_0, EPSILON_0, LARGE_NUMBER, MU_0
1414
from tidy3d.log import log
1515

tidy3d/components/autograd/types.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
from autograd.builtins import dict as dict_ag
1111
from autograd.extend import Box, defvjp, primitive
1212

13-
from tidy3d.components.types import ArrayFloat2D, ArrayLike, Complex, Size1D, _add_schema
13+
from tidy3d.components.types.base import ArrayFloat2D, ArrayLike, Complex, Size1D
14+
from tidy3d.components.types.utils import _add_schema
1415

1516
# add schema to the Box
1617
_add_schema(Box, title="AutogradBox", field_type_str="autograd.tracer.Box")

tidy3d/components/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from autograd.tracer import isbox
2424
from pydantic.v1.fields import ModelField
2525

26-
from tidy3d.components.types import TYPE_TAG_STR, ComplexNumber, Literal
26+
from tidy3d.components.types.base import TYPE_TAG_STR, ComplexNumber, Literal
2727
from tidy3d.exceptions import FileError
2828
from tidy3d.log import log
2929

tidy3d/components/base_sim/data/sim_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from tidy3d.components.base_sim.simulation import AbstractSimulation
1515
from tidy3d.components.data.utils import UnstructuredGridDatasetType
1616
from tidy3d.components.monitor import AbstractMonitor
17-
from tidy3d.components.types import FieldVal
17+
from tidy3d.components.types.base import FieldVal
1818
from tidy3d.exceptions import DataError, Tidy3dKeyError, ValidationError
1919

2020

tidy3d/components/base_sim/monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from tidy3d.components.base import cached_property
1111
from tidy3d.components.geometry.base import Box
12-
from tidy3d.components.types import ArrayFloat1D, Axis, Numpy
12+
from tidy3d.components.types.base import ArrayFloat1D, Axis, Numpy
1313
from tidy3d.components.validators import _warn_unsupported_traced_argument
1414
from tidy3d.components.viz import PlotParams, plot_params_monitor
1515

tidy3d/components/base_sim/simulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from tidy3d.components.medium import Medium, MediumType3D
1414
from tidy3d.components.scene import Scene
1515
from tidy3d.components.structure import Structure
16-
from tidy3d.components.types import (
16+
from tidy3d.components.types.base import (
1717
TYPE_TAG_STR,
1818
Ax,
1919
Axis,

tidy3d/components/bc_placement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import pydantic.v1 as pd
99

10-
from tidy3d.components.types import BoxSurface
10+
from tidy3d.components.types.base import BoxSurface
1111
from tidy3d.exceptions import SetupError
1212

1313
from .base import Tidy3dBaseModel

tidy3d/components/beam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import autograd.numpy as np
1010
import pydantic.v1 as pd
1111

12-
from tidy3d.components.types import TYPE_TAG_STR, Direction, FreqArray, Numpy
12+
from tidy3d.components.types.base import TYPE_TAG_STR, Direction, FreqArray, Numpy
1313
from tidy3d.constants import C_0, ETA_0, HERTZ, MICROMETER, RADIAN
1414

1515
from .base import cached_property

0 commit comments

Comments
 (0)