-
Notifications
You must be signed in to change notification settings - Fork 44
/
pyproject.toml
311 lines (288 loc) · 7.82 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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
[tool.poetry]
name = "tidy3d"
version = "2.7.7"
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",
"Programming Language :: Python :: 3.12",
"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,<4.0.0"
pyroots = ">=0.5.0"
xarray = ">=2023.08.0"
importlib-metadata = ">=6.0.0"
h5netcdf = "1.0.2"
h5py = "^3.0.0"
rich = "^13.0"
numpy = "<2"
matplotlib = "*"
shapely = "^2.0"
pandas = "<=2.2.1"
pydantic = "^2.0"
PyYAML = "*"
dask = "*"
toml = "*"
autograd = "1.6.2"
scipy = "*"
### NOT CORE
boto3 = "^1.28.0"
requests = "^2.31.0"
pyjwt = "*"
click = "^8.1.0"
responses = "*"
joblib = "*"
### END NOT CORE
### Optional dependencies ###
# development core
bump-my-version = { version = "*", optional = true }
ruff = { version = "0.5.5", 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 = ">=8.1", optional = true }
pytest-timeout = { version = "*", optional = true }
tox = { version = "*", optional = true }
# gdspy
gdspy = { version = "*", optional = true }
# gdstk
gdstk = { version = ">=0.9.49, <0.9.52", optional = true }
# jax
jaxlib = { version = "0.4.25", source = "jaxsource", optional = true }
jax = { version = "0.4.25", extras = [
"cpu",
], source = "jaxsource", optional = true }
# pytorch
torch = [
{ version = "^2.1.0", source = "PyPI", platform = "darwin", optional = true },
{ version = "^2.1.0", source = "torch-cpu", platform = "!=darwin", optional = true },
]
# scikit-rf
scikit-rf = { version = "*", optional = true }
# trimesh
networkx = { version = "^2.6.3", optional = true }
rtree = { version = "1.2.0", optional = true }
trimesh = { version = "^4", 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-favicon = { version = "*", optional = true }
sphinx-sitemap = { version = ">=2.5.1", optional = true }
sphinx-notfound-page = { version = "*", optional = true }
sphinx-tabs = { version = "*", optional = true }
nbdime = { version = "*", optional = true }
myst-parser = { version = "*", optional = true }
optax = { version = ">=0.2.2", optional = true }
signac = { version = "*", optional = true }
flax = { version = ">=0.8.2", optional = true }
sax = { version = "^0.11", 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 = [
'bump-my-version',
"coverage",
'dill',
'divparams',
'flax',
'gdspy',
'gdstk',
'grcwa',
'ipython',
'ipython',
'jax',
'jaxlib',
'torch',
'jinja2',
'jupyter',
'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-favicon',
'sphinx-notfound-page',
'sphinx-sitemap',
'sphinx-tabs',
'sphinxemoji',
'tmm',
'tox',
'trimesh',
'scikit-rf',
'vtk',
'devsim',
'cma',
]
docs = [
"jupyter",
"jinja2",
"nbconvert",
"sphinx",
"nbsphinx",
"ipython",
"divparams",
"sphinx-copybutton",
'sphinx-favicon',
"sphinx-book-theme",
"pydata-sphinx-theme",
"tmm",
"gdstk",
"grcwa",
"sphinx-sitemap",
'sphinx-notfound-page',
"nbdime",
"optax",
"signac",
"sax",
"pylint",
"sphinx-tabs",
"sphinxemoji",
"myst-parser",
"devsim",
"cma",
]
gdspy = ["gdspy"]
gdstk = ["gdstk"]
jax = ["jaxlib", "jax"]
scikit-rf = ["scikit-rf"]
trimesh = ["trimesh", "networkx", "rtree"]
vtk = ["vtk"]
[tool.poetry.scripts]
tidy3d = "tidy3d.web.cli:tidy3d_cli"
[[tool.poetry.source]]
name = "pypi"
priority = "primary"
[[tool.poetry.source]]
name = "jaxsource"
url = "https://storage.googleapis.com/jax-releases/jax_releases.html"
priority = "supplemental"
[[tool.poetry.source]]
name = "torch-cpu"
url = "https://download.pytorch.org/whl/cpu"
priority = "explicit"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
target-version = "py39"
line-length = 100
extend-exclude = ["docs/faq/", "docs/notebooks/"]
[tool.ruff.lint]
typing-modules = [
"tidy3d.components.types",
] # without this Literal["something fails"]
select = [
"I", # isort
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP",
"S101", # do not use asserts
"NPY201", # numpy 2.* compatibility check
]
ignore = [
"E501",
"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
]
[tool.pytest.ini_options]
addopts = "--doctest-modules"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
norecursedirs = [
"tests/_test_local",
"tests/test_cli",
"tests/_test_data",
"tests/_test_notebooks",
"tidy3d/web",
"docs/notebooks",
"docs/faq",
]
filterwarnings = "ignore::DeprecationWarning"
testpaths = ["tidy3d", "tests", "docs"]
python_files = "*.py"
[tool.bumpversion]
current_version = "2.7.7"
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.
(?P<patch>0|[1-9]\\d*)
(?:
(?P<pre_l>[a-zA-Z-]+) # pre-release label
(?P<pre_n>0|[1-9]\\d*) # pre-release version number
)? # pre-release section is optional
"""
serialize = ["{major}.{minor}.{patch}{pre_l}{pre_n}", "{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = true
ignore_missing_files = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = false
message = "Bump version: {current_version} → {new_version}"
commit_args = ""
[tool.bumpversion.parts.pre_l]
values = ["rc", ""]
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "\nversion = \"{current_version}\""
replace = "\nversion = \"{new_version}\""
[[tool.bumpversion.files]]
filename = "tidy3d/version.py"
search = "{current_version}"
replace = "{new_version}"