Skip to content

Commit 383ef12

Browse files
committed
maint: pydantic v2 migration
1 parent c8217a8 commit 383ef12

File tree

262 files changed

+8581
-7235
lines changed

Some content is hidden

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

262 files changed

+8581
-7235
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Batch JSON files
22
batch*.json
33
*.vtu
4+
simulation.json
45

56
# Byte-compiled / optimized / DLL files
67
*$py.class

docs/api/plugins/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Plugins
22
=======
33

4+
.. warning::
5+
6+
|:warning:| The 'adjoint' plugin (legacy JAX-based adjoint plugin)
7+
was deprecated in Tidy3D 'v2.7.0' and is disabled as of 'v2.9.0'.
8+
49
.. toctree::
510
:maxdepth: 1
611

poetry.lock

Lines changed: 85 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ numpy = "*"
3333
matplotlib = "*"
3434
shapely = "^2.0"
3535
pandas = "*"
36-
pydantic = "^2.0"
36+
pydantic = ">=2.9,<3"
37+
pydantic-settings = "^2.10.0"
3738
PyYAML = "*"
3839
dask = "*"
3940
toml = "*"
@@ -296,7 +297,13 @@ banned-module-level-imports = ["scipy", "matplotlib"]
296297

297298
[tool.pytest.ini_options]
298299
# TODO: remove --assert=plain when https://github.com/scipy/scipy/issues/22236 is resolved
299-
addopts = "--cov=tidy3d --doctest-modules -n auto --dist worksteal --assert=plain -m 'not numerical'"
300+
# TODO(yaugenst-flex): Revisit adjoint plugin for pydantic v2
301+
addopts = """
302+
--doctest-modules -n auto --dist worksteal --assert=plain -m 'not numerical' \
303+
--ignore=tests/test_plugins/test_adjoint.py \
304+
--ignore=tidy3d/plugins/adjoint/
305+
--ignore=tests/test_plugins/test_adjoint.py
306+
"""
300307
markers = [
301308
"numerical: marks numerical tests for adjoint gradients that require running simulations (deselect with '-m \"not numerical\"')",
302309
]

0 commit comments

Comments
 (0)