Skip to content

Commit 1197f39

Browse files
Start modification to class based structure
1 parent 85c8df0 commit 1197f39

7 files changed

Lines changed: 1029 additions & 8 deletions

File tree

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "packages/tidy3d"]
2+
path = packages/tidy3d
3+
url = git@github.com:flexcompute/tidy3d.git

autoflex/extractors/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from typing import Any, Callable, Dict, List, Optional, Type
55

66
from pydantic import BaseModel, ConfigDict, create_model, Field
7+
from pydantic._internal.
78
from pydantic.fields import FieldInfo
89
from typing_extensions import TypeGuard
910

autoflex/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from autoflex.types.input import AutoflexInputClassTypes
12
from autoflex.types.property import PhysicalProperty, Property, PropertyTypes
23
from autoflex.types.descriptors import Symbolic, SymbolicTypes, Unit, UnitTypes
34
from autoflex.types.field_info import PhysicalFieldInfo, FieldTypes

autoflex/types/input.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pydantic as pd
2+
import pydantic.v1 as pd1
3+
4+
AutoflexInputClassTypes = \
5+
pd._internal._model_construction.ModelMetaclass |
6+
pd1._internal._model_construction.ModelMetaclass |
7+
pd.BaseModel |
8+
pd1.BaseModel
9+
10+

docs/examples/tidy3d.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44

55
.. currentmodule:: tidy3d
66

7+
.. autoflex:: tidy3d.Simulation

0 commit comments

Comments
 (0)