-
Notifications
You must be signed in to change notification settings - Fork 44
/
pyproject.toml
183 lines (164 loc) · 5.93 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
[tool.poetry]
name = "tidy3d"
version = "2.6.0" # Thinking about bump2version
description = "A fast FDTD solver"
authors = ["Tyler Hughes <[email protected]>"]
license = "LGPLv2+"
readme = "README.md"
homepage = "https://github.com/flexcompute/tidy3d"
repository = "https://github.com/flexcompute/tidy3d"
classifiers = [
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
]
documentation = "https://docs.flexcompute.com/projects/tidy3d/en/latest/"
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/flexcompute/tidy3d/issues"
[tool.poetry.dependencies]
python = ">=3.9,<3.12"
pyroots = ">=0.5.0"
xarray = ">=0.16.2"
importlib-metadata = "^6.0.0"
h5netcdf = "1.0.2"
h5py = "^3.0.0"
rich = "<12.6.0"
matplotlib = "*"
shapely = "^2.0"
pydantic = "^2.0"
PyYAML = "*"
dask = "*"
toml = "*"
### NOT CORE
scipy = "*"
boto3 = "1.23.1"
requests = "*"
pyjwt = "*"
click = "8.0.3"
responses = "*"
### END NOT CORE
### Optional dependencies ###
# development core
black = {version="23.12.1", optional = true}
coverage = {version="*", optional = true}
dill = {version="*", optional = true}
ipython = {version="*", optional = true}
memory_profiler = {version="*", optional = true}
pre-commit = {version="*", optional = true}
pylint = {version="*", optional = true}
pytest = {version="*", optional = true}
pytest-timeout = {version="*", optional = true}
ruff = {version="*", optional = true}
tox = {version="*", optional = true}
# gdspy
gdspy = {version="*", optional = true}
# gdstk
gdstk = {version=">=0.9.49", optional = true}
# jax
jaxlib = [
{version = ">=0.4.1,<=0.4.14", platform = "linux", source="jaxsource", optional = true},
{version = ">=0.4.1,<=0.4.14", platform = "darwin", source="jaxsource", optional = true},
{version = ">=0.4.13,<=0.4.14", platform = "win32", source="jaxsource", python = "^3.9", optional = true}
]
jax = [
{version = ">=0.4.1,<=0.4.14", extras = ["cpu"], platform = "linux", source="jaxsource", optional = true},
{version = ">=0.4.1,<=0.4.14", extras = ["cpu"], platform = "darwin", source="jaxsource", optional = true},
{version = ">=0.4.13,<=0.4.14", extras = ["cpu"], platform = "win32", python = "^3.9", source="jaxsource", optional = true}
]
# trimesh
networkx = {version = "^2.6.3", optional = true}
rtree = {version = "1.0.1", optional = true}
trimesh = {version = "3.20.0", optional = true}
# docs
jupyter = {version="*", optional = true}
jinja2 = {version = ">=3.1.2", optional = true}
nbconvert = {version = ">=7.11.0", optional = true}
sphinx = {version=">=6", optional = true}
nbsphinx = {version = ">=0.8.7", optional = true}
sphinx-copybutton = {version=">=0.5.2", optional = true}
sphinx-book-theme = {version = ">=1.0.1", optional = true}
pydata-sphinx-theme = {version = ">=0.13.3", optional = true}
# divparams = {optional = true, git = "https://github.com/daquinteroflex/sphinxcontrib-divparams.git"} # TODO FIX
tmm = {version="*", optional = true}
grcwa = {version="*", optional = true}
sphinx-sitemap = {version=">=2.5.1", optional = true}
sphinx-tabs = {version="*", optional = true}
nbdime = {version="*", optional = true}
myst-parser = {version="*", optional = true}
optax = {version="*", optional = true}
signac = {version="*", optional = true}
sax = {version="*", optional = true}
vtk = {version="<=9.2.6", optional = true}
pyswarms = {version="*", optional = true}
sphinxemoji = {version="*", optional = true}
devsim = {version="*", optional = true}
cma = {version="*", optional = true}
[tool.poetry.extras]
dev = ['black', "coverage", 'dill', 'divparams', 'gdspy', 'gdstk', 'gdstk', 'grcwa', 'ipython', 'ipython', 'jax', 'jaxlib', 'jinja2',
'jupyter', 'jupyterblack', 'myst-parser', 'memory_profiler', 'nbconvert', 'nbdime', 'nbsphinx', 'networkx', 'optax', 'pre-commit',
'pydata-sphinx-theme', 'pylint', 'pyswarms', 'pytest', 'pytest-timeout', 'rtree', 'ruff', 'sax', 'signac', 'sphinx',
'sphinx-book-theme', 'sphinx-copybutton', 'sphinx-sitemap', 'sphinx-tabs', 'sphinxemoji', 'tmm', 'tox', 'trimesh',
'vtk', 'devsim', 'cma']
docs = ["jupyter", "jinja2", "nbconvert", "sphinx", "nbsphinx", "ipython", "divparams", "sphinx-copybutton", "sphinx-book-theme", "pydata-sphinx-theme", "tmm", "gdstk", "grcwa", "sphinx-sitemap", "nbdime", "optax", "signac", "sax", "pylint", "jupyterblack", "sphinx-tabs", "sphinxemoji", "myst-parser", "devsim", "cma"]
gdspy = ["gdspy"]
gdstk = ["gdstk"]
jax = ["jaxlib", "jax"]
trimesh = ["trimesh", "networkx", "rtree"]
vtk = ["vtk"]
[tool.poetry.scripts]
tidy3d = "tidy3d.web.cli:tidy3d_cli"
[[tool.poetry.source]]
name = "PyPI"
priority = "default"
[[tool.poetry.source]]
name = "jaxsource"
url = "https://storage.googleapis.com/jax-releases/jax_releases.html"
priority = "primary"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 100
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.ruff]
ignore-init-module-imports = true
typing-modules = ["tidy3d.components.types"] # without this Literal["something fails"]
line-length = 100
fix = true
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"UP007", # use x | y instead of union[x,y] (does not work)
"B905", # `zip()` without an explicit `strict=` parameter
"C408", # C408 Unnecessary `dict` call (rewrite as a literal)
"B904",
"B028", # stacklevel
"UP006", # typy annotation with Tuple[float] messes up pydantic
"UP038", # TODO decide what to do here
"UP035", # TODO decide what to do here
]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP"
]
target-version = "py310"