Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ descartes
pydantic
PyYAML
boto3
requests

# required to get xarray to not complain
dask
dask
19 changes: 19 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python

from distutils.core import setup

# with open('./requirements.txt') as f:
# required = f.read().splitlines()

# with open('tests/requirements.txt') as f:
# required += f.read().splitlines()

setup(name='Tidy3D',
version='0.1.1',
description='Front end for Tidy3D.',
author='Flexcompute inc.',
author_email='tyler@flexcompute.com',
url='flexcompute.com',
# install_requires=required,
packages=['tidy3d'],
)
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# required for development
black
pylint
tox
pytest
8 changes: 4 additions & 4 deletions tests/test_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ def test_names_default():
for i, source in enumerate(sim.sources):
assert source.name == f"sources[{i}]"

distinct_mediums = [f"mediums[{i}]" for i in range(len(sim.mediums))]
for i, medium in enumerate(sim.mediums):
assert medium.name in distinct_mediums
distinct_mediums.pop(distinct_mediums.index(medium.name))
# distinct_mediums = [f"mediums[{i}]" for i in range(len(sim.mediums))]
# for i, medium in enumerate(sim.mediums):
# assert medium.name in distinct_mediums
# distinct_mediums.pop(distinct_mediums.index(medium.name))


def test_names_unique():
Expand Down
4 changes: 2 additions & 2 deletions tidy3d/components/pml.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""Defines profile of Perfectly-matched layers (absorber)"""
from typing import Union, Literal
from typing import Union
from abc import ABC

import pydantic

from .base import Tidy3dBaseModel

from .types import Literal

# TODO: More explanation on parameters, when to use various PMLs.

Expand Down
4 changes: 2 additions & 2 deletions tidy3d/components/source.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""Defines electric current sources for injecting light into simulation."""

from abc import ABC, abstractmethod
from typing import Union, Literal
from typing import Union

import pydantic
import numpy as np

from .base import Tidy3dBaseModel
from .types import Direction, Polarization, Ax, FreqBound, Array
from .types import Direction, Polarization, Ax, FreqBound, Array, Literal
from .validators import assert_plane, validate_name_str
from .geometry import Box
from .mode import Mode
Expand Down
154 changes: 154 additions & 0 deletions to-uninstall.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
alabaster==0.7.12
anyio==3.3.2
appnope==0.1.2
argon2-cffi==21.1.0
astroid==2.8.2
attrs==21.2.0
autodoc-pydantic==1.5.0
autograd==1.3
aws-requests-auth==0.4.3
Babel==2.9.1
backcall==0.2.0
backports.entry-points-selectable==1.1.1
bcrypt==3.2.0
black==21.9b0
bleach==4.1.0
boto3==1.15.18
botocore==1.18.18
certifi==2021.5.30
cffi==1.14.6
chardet==3.0.4
charset-normalizer==2.0.6
click==7.1.2
cloudpickle==2.0.0
colorama==0.4.4
commonmark==0.9.1
cycler==0.10.0
dask==2021.9.1
debugpy==1.5.0
decorator==5.1.0
defusedxml==0.7.1
descartes==1.1.0
distlib==0.3.3
docutils==0.17.1
entrypoints==0.3
erdantic==0.2.1
ffmpeg==1.4
ffmpeg-python==0.2.0
filelock==3.4.0
fsspec==2021.10.0
future==0.18.2
gdspy==1.6.1
h5py==3.4.0
idna==2.8
imagesize==1.2.0
iniconfig==1.1.1
ipykernel==6.4.1
ipython==7.28.0
ipython-genutils==0.2.0
ipywidgets==7.6.5
isort==5.9.3
jedi==0.18.0
Jinja2==3.0.2
jmespath==0.10.0
json5==0.9.6
jsonschema==4.0.1
jsonschema2md==0.2.1
jupyter==1.0.0
jupyter-client==7.0.6
jupyter-console==6.4.0
jupyter-core==4.8.1
jupyter-server==1.11.1
jupyterlab==3.1.18
jupyterlab-pygments==0.1.2
jupyterlab-server==2.8.2
jupyterlab-widgets==1.0.2
kiwisolver==1.3.2
lazy-object-proxy==1.6.0
locket==0.2.1
m2r2==0.3.1
MarkupSafe==2.0.1
matplotlib==3.4.3
matplotlib-inline==0.1.3
mccabe==0.6.1
mistune==0.8.4
mypy-extensions==0.4.3
nbclassic==0.3.2
nbclient==0.5.4
nbconvert==6.2.0
nbformat==5.1.3
nbsphinx==0.8.7
nest-asyncio==1.5.1
nlopt==2.7.0
notebook==6.4.4
numpy==1.21.2
packaging==21.0
pandas==1.3.3
pandocfilters==1.5.0
parso==0.8.2
partd==1.2.0
pathspec==0.9.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.3.2
platformdirs==2.4.0
pluggy==1.0.0
prometheus-client==0.11.0
prompt-toolkit==3.0.20
ptyprocess==0.7.0
py==1.10.0
pycparser==2.20
pydantic==1.8.2
Pygments==2.10.0
pygraphviz==1.7
pylint==2.11.1
pyparsing==2.4.7
pyrsistent==0.18.0
pytest==6.2.5
python-dateutil==2.8.2
pytz==2021.3
PyYAML==5.4.1
pyzmq==22.3.0
qtconsole==5.1.1
QtPy==1.11.2
regex==2021.10.8
requests==2.22.0
requests-unixsocket==0.2.0
rich==10.12.0
s3transfer==0.3.7
scipy==1.7.1
Send2Trash==1.8.0
Shapely==1.7.1
six==1.16.0
sniffio==1.2.0
snowballstemmer==2.1.0
Sphinx==4.2.0
sphinx-autodoc-typehints==1.12.0
sphinx-copybutton==0.4.0
sphinx-rtd-theme==1.0.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
terminado==0.12.1
testpath==0.5.0
tk==0.1.0
toml==0.10.2
tomli==1.2.1
toolz==0.11.1
tornado==6.1
tox==3.24.4
tqdm==4.62.3
traitlets==5.1.0
typer==0.4.0
typing-extensions==3.10.0.2
urllib3==1.25.11
virtualenv==20.10.0
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.2.1
widgetsnbextension==3.5.1
wrapt==1.12.1
xarray==0.19.0
23 changes: 23 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tox]
envlist =
py37
py38
py39

[testenv]
deps =
-rrequirements.txt
-rtests/requirements.txt
commands =
pip install requests
pytest -rA tests/test_components.py
pytest -rA tests/test_IO.py
pytest -rA tests/test_material_library.py
pytest -rA tests/test_core.py
pytest -rA tests/test_plugins.py
pytest --doctest-modules tidy3d \
--ignore=tidy3d/__main__.py \
--ignore=tidy3d/log.py \
--ignore=tidy3d/components/base.py \
--ignore=tidy3d/web/webapi.py \
--ignore=tidy3d/web/container.py