Skip to content

Pydantic v2 #2433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Pydantic v2 #2433

wants to merge 3 commits into from

Conversation

yaugenst-flex
Copy link
Collaborator

@yaugenst-flex yaugenst-flex commented May 8, 2025

No description provided.

@yaugenst-flex yaugenst-flex self-assigned this May 8, 2025
@yaugenst-flex yaugenst-flex added the 2.9 will go into version 2.9.* label May 8, 2025
@yaugenst-flex yaugenst-flex linked an issue May 8, 2025 that may be closed by this pull request
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch from 0a529f4 to a7e7a49 Compare May 9, 2025 07:10
@yaugenst-flex yaugenst-flex mentioned this pull request May 9, 2025
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch 2 times, most recently from 348a931 to 5ecc9f9 Compare May 9, 2025 20:08
@momchil-flex
Copy link
Collaborator

It seems like fundamentally there's just a few things that change? Maybe I'm missing something important/tricky. Could you explain if there's anything like that, and what changes going forward?

Also very important - we will certainly need to update the backend python code too and might need to update denormalizer, metadata api, and who knows what else.

@yaugenst-flex
Copy link
Collaborator Author

Yes the biggest changes are related to custom types and serialization, everything else is relatively straightforward. I'll write something up.

@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch from 93ce359 to dd10b26 Compare May 14, 2025 15:36
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch 3 times, most recently from dd0cd2b to 38d502a Compare May 16, 2025 10:50
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch from ea3b4cb to 29234a6 Compare May 19, 2025 12:06
@momchil-flex momchil-flex added the rc1 1st pre-release label May 19, 2025
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch 4 times, most recently from 6d3f88a to 2967f74 Compare May 22, 2025 08:58
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch 4 times, most recently from 0a72b9c to 715c758 Compare May 26, 2025 20:24
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch 3 times, most recently from 82e8615 to abaf39d Compare May 27, 2025 07:37
@yaugenst-flex
Copy link
Collaborator Author

yaugenst-flex commented May 27, 2025

This is ready for initial review. plugins/adjoint still has failing tests but everything else is passing and rebased. i'll work on fixing adjoint and incrementally fixing warnings.

@yaugenst-flex yaugenst-flex marked this pull request as ready for review May 27, 2025 11:16
@@ -24,6 +24,7 @@

# Store an example of every minor release simulation to test updater in the future
SIM_DIR = "tests/sims"
SIM_STATIC = SIM.to_static()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason we test with sim static? might be worth a comment for future reference

Copy link
Collaborator Author

@yaugenst-flex yaugenst-flex May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right yeah it's because i fixed (i think?) the equality check (Tidy3dBaseModel.__eq__). so when you compare a model with and without tracers, then they will not compare equal. i think this behavior is correct?

basically if we run these tests with SIM instead of SIM_STATIC, then we get the following failures:

FAILED tests/test_components/test_IO.py::test_simulation_load_export_hdf5 - AssertionError: original and loaded simulations are not the same
FAILED tests/test_components/test_IO.py::test_simulation_load_export_hdf5_explicit - AssertionError: original and loaded simulations are not the same
FAILED tests/test_components/test_IO.py::test_simulation_load_export - AssertionError: original and loaded from hdf5 simulations are not the same
FAILED tests/test_components/test_IO.py::test_simulation_load_export_hdf5_gz - AssertionError: original and loaded simulations are not the same
FAILED tests/test_components/test_IO.py::test_simulation_load_export_hdf5_gz_explicit - AssertionError: original and loaded simulations are not the same

@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch 2 times, most recently from c4e9567 to d2c816f Compare May 27, 2025 14:01
add somefiles

replacing v1

more replacements

copy methods and ordering of basemodel

update get_submodels_by_hash

basemodel done (except for docs)

basemodel and modespec done

slowly but surely..

progress

next batch

going going

getting started on medium

more refactoring

new structure for medium.py

add medium

why it no work

fix medium

upgrade material library

most of it

first pass

add pydantic-settings

fixes to validators, mutable assignment, ...:

remove skip_if_fields_missing

cleaning up types & type serializaton

fix printing and serialization of autograd types

more type serialization updates

Fix traced ndarray serialization

fix equality check in basemodel

fix some v1 leftovers

fix some tests

fix equality check

sim_data tests passing

make serializer more robust and another fix for equality comparison

fix warn if none validators

Check for pydantic v2 ValidationErrors

Canonicalize coordinate handling of unstructured datasets

Simulation data tests passing

material library tests passing

fix bad name

fix material libray -> library

lotsa fixes, tests_web & test_package passing

fix remaining web test warnings

everything importable for doctests

rebase, wip

fix mutation

safer ndarray coercion and expressions fix

working on post init validation

fix multiphysics medium attribute lookup

remove test script from vcs

doctests passing

fix NedeljkovicSorefMashanovich

fix non-component tests

fix tracer serialization

remove unnecessary to_static call

the smallest changes really do take the longest

all of test_IO passing

fix caching and copy update

docstring for __init_subclass__

passing: IO, base, beam, boundaries, custom, eme, field_projection, geometry, log

passing: grid, grid_spec, heat, heat_charge, layerrefinement, lumped_element, medium

passing: meshgenerate, microwave, mode

passing: monitor, packaging, parameter_perturbation, perturbation_medium, scene, sidewall

passing: expressions

passing: smatrix, array_factor, design, dispersion_fitter, microwave, mode_solver

wip: adjoint & invdes

passing: source, structure, time_modulation

passing: types

add helpers to filter model fields

add tests for new basemodel helpers

small fixes

wip: autograd

fix waveguide

passing: autograd

rebase fixes

no more post-init validators

fix dataarray json schema

rework array constraints

wip: adjoint

ruff

chore(github): improve script  to determine test scope (#2510)

* chore(github): add script  to determine whether a PR was already approved

This step results in a full test suite run if an already approved PR receives changes to prevent breaking the main branch.

* cancel parallel triggers of the remote tests

* fix group assignment

* add python version to group assignment

fix bug when inserting snapping points near sim min boundary

fix contains check for lumped element, which was too strict (#2511)

fix[web]: use dedicated endpoint for `web.delete_old()`

Upgrade ruff 0.5.5 -> 0.11.11

Run `ruff check . --fix`

Run `ruff format .`

Move test-specifc `ruff.toml` to `per-file-ignores`

Sort test imports

Import `Literal` from `typing`

Force `from __future__ import annotations` import

Rewrite `dict()` as literal (2x faster)

Disallow function calls in default arguments

Be intentional about exception context

Upgrade all (compatible) generics to built-in types

Sort `__all__` blocks

Enable `RUF` ruleset

Prefer tuple unpacking over concatenation

Forbid implicit optional

No explicit string concatenation

Remove unnecessary `pass` statements

Remove unnecessary parantheses on raised exceptions

Disallow relative imports from parent modules

Remove unused import aliases

Add lint rule comments

Revert "Disallow function calls in default arguments"

This reverts commit 12a0a6a.

Fix some stragglers

Updated ruff version in workflow

Lint `data/` dirs

rebase fixes

sentinel pattern for function calls in default arguments

rebase fixes
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch from 135b262 to 0afc42d Compare May 27, 2025 18:43
Copy link
Contributor

github-actions bot commented May 27, 2025

badge

Code Coverage Summary

Filename                                                      Stmts    Miss  Cover    Missing
----------------------------------------------------------  -------  ------  -------  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
tidy3d/__init__.py                                               78       0  100.00%
tidy3d/__main__.py                                               52       1  98.08%   115
tidy3d/compat.py                                                 10       4  60.00%   7-8, 12-13
tidy3d/config.py                                                 18       0  100.00%
tidy3d/constants.py                                              91       0  100.00%
tidy3d/exceptions.py                                             18       0  100.00%
tidy3d/log.py                                                   189      21  88.89%   54, 91-92, 218, 227, 256-257, 300, 304, 370, 408, 412-417, 421, 425-427, 444
tidy3d/packaging.py                                              78      17  78.21%   109, 146-149, 175-180, 194-204
tidy3d/updater.py                                               196     120  38.78%   30, 35-36, 50, 58-62, 66-70, 74, 78, 96-112, 117-118, 125, 130-134, 138-141, 148-154, 158, 180, 195-204, 211-223, 230-276, 282-284, 291-296, 303-329, 336-341
tidy3d/version.py                                                 2       0  100.00%
tidy3d/components/__init__.py                                     0       0  100.00%
tidy3d/components/apodization.py                                 41       0  100.00%
tidy3d/components/base.py                                       513      21  95.91%   78, 85, 94, 495, 548-549, 765-766, 867-868, 992, 1004, 1021, 1025, 1028, 1120, 1200-1201, 1246, 1250-1251
tidy3d/components/bc_placement.py                                30       2  93.33%   51, 74
tidy3d/components/beam.py                                       190      23  87.89%   148, 292-294, 298-300, 314, 319-322, 328, 331-335, 345-351
tidy3d/components/boundary.py                                   188       2  98.94%   926-927
tidy3d/components/dispersion_fitter.py                          419      22  94.75%   110-116, 202, 289, 382, 456, 476-480, 600, 675-676, 708, 844, 872, 929-930, 955, 977
tidy3d/components/field_projection.py                           352      32  90.91%   150, 219, 254, 334-337, 420-421, 433, 521, 525-552, 624-640, 798-804
tidy3d/components/file_util.py                                   21       0  100.00%
tidy3d/components/frequencies.py                                105      49  53.33%   51-65, 67-71, 74, 76, 78-104
tidy3d/components/lumped_element.py                             457       6  98.69%   552-556, 1034, 1084, 1118, 1156
tidy3d/components/medium.py                                    2335     153  93.45%   163, 173, 685, 700, 848, 892, 953, 1390, 1397-1408, 1707, 1720-1721, 1920, 2023, 2026, 2039, 2042, 2052, 2137-2150, 2208-2211, 2215-2218, 2235, 2237, 2241, 2302, 2308-2309, 2315, 2328, 2409, 2441, 2497, 2814, 2824, 2864, 2917, 2926-2927, 3080, 3262, 3338, 3500, 3504, 3522, 3535, 3601, 3636, 3653, 3766-3770, 3870, 3888, 3893, 3896, 4039-4044, 4204, 4291, 4293, 4295, 4320, 4325, 4380, 4568, 4570, 4634-4638, 4690, 4695, 4700, 4705, 4860, 4862, 4888-4892, 4944, 4949, 4954, 5012, 5015, 5112, 5114, 5155-5159, 5211, 5216, 5221, 5547, 5601, 5609, 5647-5665, 5810, 6073-6075, 6110-6111, 6178-6192, 6281, 6386, 6636, 6854, 7068, 7200, 7378, 7387-7390
tidy3d/components/mode_spec.py                                   64       1  98.44%   234
tidy3d/components/monitor.py                                    355      25  92.96%   75, 83, 260, 305-314, 368, 397-400, 421, 532-533, 757, 764-766, 808, 818, 858, 987
tidy3d/components/parameter_perturbation.py                     437      26  94.05%   1542, 1565-1591, 1599-1619, 1776
tidy3d/components/run_time_spec.py                                6       0  100.00%
tidy3d/components/scene.py                                      599     148  75.29%   70-71, 157, 350-354, 379, 381, 518-519, 534, 546, 553, 926, 936, 956-965, 969-981, 987, 1021, 1131-1210, 1245, 1276, 1287, 1426-1432, 1499, 1530-1531, 1573, 1587-1593, 1611, 1624, 1706-1712, 1804, 1818-1851, 1870-1925
tidy3d/components/simulation.py                                1779     132  92.58%   135-136, 141-142, 199, 206, 214, 222, 367, 402, 420, 435, 769-773, 821-825, 1044-1055, 1383, 1509-1510, 1547, 1553, 1594, 1599, 1611, 1684-1690, 1750, 2947, 2955, 2963, 2992, 3106, 3159, 3217, 3265, 3327, 3356, 3364, 3377, 3420, 3439, 3458-3467, 3493, 3501, 3533, 3561, 3596, 3617, 3623, 3630, 3650, 3721, 3858, 4006, 4189, 4214, 4350-4351, 4356, 4484-4488, 4505, 4593, 4601, 4603, 4624, 4661, 4675-4680, 4722, 4731-4734, 4736-4739, 4788-4789, 4850, 4855, 4859-4911, 4935, 4974-4976, 5014-5015, 5045, 5155, 5161-5172, 5206, 5227
tidy3d/components/structure.py                                  223      17  92.38%   45-46, 133, 275, 307, 330, 360, 511-515, 569-570, 599, 605, 620, 630, 725
tidy3d/components/subpixel_spec.py                               45       2  95.56%   204, 208
tidy3d/components/time.py                                        75       2  97.33%   79, 89
tidy3d/components/time_modulation.py                             86       0  100.00%
tidy3d/components/transformation.py                              83       5  93.98%   69, 103, 154, 172, 188
tidy3d/components/type_util.py                                    8       0  100.00%
tidy3d/components/types.py                                      154       5  96.75%   23-24, 41, 59, 61
tidy3d/components/types_extra.py                                  7       1  85.71%   14
tidy3d/components/validators.py                                 225      10  95.56%   63, 133-140, 259, 275, 367
tidy3d/components/autograd/__init__.py                            6       0  100.00%
tidy3d/components/autograd/boxes.py                              58      11  81.03%   31, 72, 79, 87-88, 92, 95-96, 134, 142, 147
tidy3d/components/autograd/derivative_utils.py                  125       5  96.00%   193, 201, 208, 213, 295
tidy3d/components/autograd/functions.py                          63       0  100.00%
tidy3d/components/autograd/types.py                              61      12  80.33%   60-74
tidy3d/components/autograd/utils.py                              28       0  100.00%
tidy3d/components/base_sim/__init__.py                            0       0  100.00%
tidy3d/components/base_sim/monitor.py                            33       0  100.00%
tidy3d/components/base_sim/simulation.py                        163       6  96.32%   166, 604-608, 670-674, 699
tidy3d/components/base_sim/source.py                             12       0  100.00%
tidy3d/components/base_sim/data/__init__.py                       0       0  100.00%
tidy3d/components/base_sim/data/monitor_data.py                  10       0  100.00%
tidy3d/components/base_sim/data/sim_data.py                      57       0  100.00%
tidy3d/components/data/__init__.py                                0       0  100.00%
tidy3d/components/data/data_array.py                            445      24  94.61%   81, 88, 111, 115-116, 155, 205, 225, 288-292, 296-299, 413-418, 422-430, 624, 649
tidy3d/components/data/dataset.py                               181       4  97.79%   295, 397-400
tidy3d/components/data/monitor_data.py                         1364      58  95.75%   115, 167, 177, 321, 446, 457, 491, 635-647, 658, 805, 851, 1184-1185, 1189-1190, 1204, 1375, 1631, 1750, 1767, 2052, 2061, 2075-2076, 2197, 2205-2216, 2277, 2502, 2581, 2594, 2709, 3056, 3168, 3190-3191, 3357, 3391, 3603-3604, 3711
tidy3d/components/data/sim_data.py                              419      24  94.27%   309, 355, 402, 407, 424, 433, 527, 535, 568, 572, 619, 631, 642, 940, 986, 1051, 1058, 1067, 1094, 1296, 1298, 1302, 1321-1322
tidy3d/components/data/utils.py                                  46       4  91.30%   43, 54, 75, 83
tidy3d/components/data/validators.py                             43       1  97.67%   53
tidy3d/components/data/zbf.py                                    50       4  92.00%   118-119, 130-131
tidy3d/components/data/unstructured/__init__.py                   0       0  100.00%
tidy3d/components/data/unstructured/base.py                     655      38  94.20%   76, 88, 99, 109, 133, 146, 157, 197, 199-209, 390, 397, 404, 407, 440, 601-606, 615, 624, 646, 873, 876, 882, 920-924, 997, 1249, 1549, 1615, 1688, 1715, 1740, 1767
tidy3d/components/data/unstructured/tetrahedral.py              109       4  96.33%   109, 213, 327, 346
tidy3d/components/data/unstructured/triangular.py               194      11  94.33%   14-15, 145, 162, 292, 353, 483-484, 487, 503, 522
tidy3d/components/eme/__init__.py                                 0       0  100.00%
tidy3d/components/eme/grid.py                                   304       2  99.34%   127, 173
tidy3d/components/eme/monitor.py                                 41       0  100.00%
tidy3d/components/eme/simulation.py                             483       8  98.34%   56-57, 666, 746, 962, 976, 991, 999
tidy3d/components/eme/sweep.py                                   40       0  100.00%
tidy3d/components/eme/data/__init__.py                            0       0  100.00%
tidy3d/components/eme/data/dataset.py                            28       0  100.00%
tidy3d/components/eme/data/monitor_data.py                       14       0  100.00%
tidy3d/components/eme/data/sim_data.py                          220       8  96.36%   253-258, 281-284
tidy3d/components/geometry/__init__.py                            0       0  100.00%
tidy3d/components/geometry/base.py                             1037      82  92.09%   69-70, 139, 563-566, 591, 595, 720-729, 795, 1251-1255, 1269-1272, 1393-1397, 1435-1436, 1449, 1464, 1466, 1472-1476, 1481, 1487, 1493, 1499, 1505, 1510, 1514, 1520, 1829, 1874-1878, 2077, 2306-2335, 2403, 2747, 2902, 2913, 2940-2944, 2992, 3046-3048, 3147, 3298
tidy3d/components/geometry/bound_ops.py                          29       0  100.00%
tidy3d/components/geometry/mesh.py                              254      23  90.94%   81, 199, 211-213, 252, 294, 298, 353, 357, 375, 502, 549-553, 608-622
tidy3d/components/geometry/polyslab.py                          784      35  95.54%   110, 344-350, 468, 598, 624, 966-971, 1143, 1172, 1175, 1352-1361, 1437, 1520-1543, 1562, 1924, 1983
tidy3d/components/geometry/primitives.py                        317      67  78.86%   98, 251, 315, 318, 328-331, 361, 392-465
tidy3d/components/geometry/triangulation.py                      64       2  96.88%   135, 149
tidy3d/components/geometry/utils.py                             184       6  96.74%   65, 275, 293, 296-299
tidy3d/components/geometry/utils_2d.py                          103       0  100.00%
tidy3d/components/grid/__init__.py                                0       0  100.00%
tidy3d/components/grid/corner_finder.py                          77       0  100.00%
tidy3d/components/grid/grid.py                                  209      10  95.22%   145, 255-261, 594, 699
tidy3d/components/grid/grid_spec.py                             758      21  97.23%   219, 237-240, 671, 768, 1420-1422, 1427-1428, 1442, 1487, 1489, 1497, 1512, 2587-2591, 2665, 2673
tidy3d/components/grid/mesher.py                                484      10  97.93%   813, 907, 996, 998, 1000, 1066, 1115, 1194, 1266, 1317
tidy3d/components/material/__init__.py                            0       0  100.00%
tidy3d/components/material/multi_physics.py                      34       1  97.06%   147
tidy3d/components/material/solver_types.py                       10       0  100.00%
tidy3d/components/material/types.py                               6       0  100.00%
tidy3d/components/material/tcad/__init__.py                       0       0  100.00%
tidy3d/components/material/tcad/charge.py                        30       3  90.00%   38, 41, 44
tidy3d/components/material/tcad/heat.py                          35       0  100.00%
tidy3d/components/microwave/__init__.py                           0       0  100.00%
tidy3d/components/microwave/data/__init__.py                      0       0  100.00%
tidy3d/components/microwave/data/monitor_data.py                 52       0  100.00%
tidy3d/components/microwave/formulas/__init__.py                  0       0  100.00%
tidy3d/components/microwave/formulas/circuit_parameters.py       35       0  100.00%
tidy3d/components/mode/__init__.py                                0       0  100.00%
tidy3d/components/mode/derivatives.py                           128       2  98.44%   173, 230
tidy3d/components/mode/mode_solver.py                           891     237  73.40%   82-84, 113, 188-189, 199, 210, 260-262, 346-349, 380, 434, 464-470, 475-546, 554-560, 566-604, 610-614, 648-730, 850-971, 976-983, 991-995, 1000-1033, 1044-1046, 1114, 1290-1294, 1347-1359, 1376-1377, 1400-1401, 1451, 1508, 1582, 1700, 1715, 1720-1722, 1727-1733, 1741-1747, 1758, 1760, 1769, 1840, 2283, 2345-2347, 2510
tidy3d/components/mode/simulation.py                            137       0  100.00%
tidy3d/components/mode/solver.py                                416      72  82.69%   118, 125, 141-142, 147-152, 165, 240, 250-251, 257, 281, 393, 479-485, 503, 510-512, 551-552, 561-591, 598-604, 651, 654, 896, 920, 977, 988, 1002, 1007-1020, 1028-1034, 1039, 1047
tidy3d/components/mode/transforms.py                             32       0  100.00%
tidy3d/components/mode/data/__init__.py                           0       0  100.00%
tidy3d/components/mode/data/sim_data.py                          18       0  100.00%
tidy3d/components/source/__init__.py                              0       0  100.00%
tidy3d/components/source/base.py                                 53       6  88.68%   93-100
tidy3d/components/source/current.py                              32       0  100.00%
tidy3d/components/source/field.py                               177      13  92.66%   124, 455-460, 525-531, 542
tidy3d/components/source/time.py                                147       9  93.88%   171-172, 185-187, 262, 365, 401, 433
tidy3d/components/source/utils.py                                 5       0  100.00%
tidy3d/components/spice/__init__.py                               0       0  100.00%
tidy3d/components/spice/types.py                                  4       0  100.00%
tidy3d/components/spice/analysis/__init__.py                      0       0  100.00%
tidy3d/components/spice/analysis/dc.py                           14       0  100.00%
tidy3d/components/spice/sources/__init__.py                       0       0  100.00%
tidy3d/components/spice/sources/dc.py                            20       0  100.00%
tidy3d/components/spice/sources/types.py                          5       0  100.00%
tidy3d/components/tcad/__init__.py                                0       0  100.00%
tidy3d/components/tcad/bandgap.py                                 9       0  100.00%
tidy3d/components/tcad/doping.py                                123      29  76.42%   21-28, 36-38, 51, 56-58, 63-64, 119-130, 229-232, 316
tidy3d/components/tcad/generation_recombination.py               22       0  100.00%
tidy3d/components/tcad/grid.py                                   51       6  88.24%   101-103, 129-132
tidy3d/components/tcad/mobility.py                               14       0  100.00%
tidy3d/components/tcad/types.py                                  17       0  100.00%
tidy3d/components/tcad/viz.py                                    11       0  100.00%
tidy3d/components/tcad/analysis/__init__.py                       0       0  100.00%
tidy3d/components/tcad/analysis/heat_simulation_type.py          10       0  100.00%
tidy3d/components/tcad/boundary/__init__.py                       0       0  100.00%
tidy3d/components/tcad/boundary/abstract.py                       4       0  100.00%
tidy3d/components/tcad/boundary/charge.py                        10       0  100.00%
tidy3d/components/tcad/boundary/heat.py                          11       0  100.00%
tidy3d/components/tcad/boundary/specification.py                 10       0  100.00%
tidy3d/components/tcad/data/__init__.py                           0       0  100.00%
tidy3d/components/tcad/data/sim_data.py                         102       9  91.18%   208, 222, 228, 238, 273-276, 281, 304
tidy3d/components/tcad/data/types.py                              5       0  100.00%
tidy3d/components/tcad/data/monitor_data/__init__.py              0       0  100.00%
tidy3d/components/tcad/data/monitor_data/abstract.py             52       0  100.00%
tidy3d/components/tcad/data/monitor_data/charge.py              163       7  95.71%   75-78, 122-123, 226, 404
tidy3d/components/tcad/data/monitor_data/heat.py                 37       1  97.30%   82
tidy3d/components/tcad/monitors/__init__.py                       0       0  100.00%
tidy3d/components/tcad/monitors/abstract.py                      12       2  83.33%   38-39
tidy3d/components/tcad/monitors/charge.py                        11       0  100.00%
tidy3d/components/tcad/monitors/heat.py                           5       0  100.00%
tidy3d/components/tcad/simulation/__init__.py                     0       0  100.00%
tidy3d/components/tcad/simulation/heat.py                        21       0  100.00%
tidy3d/components/tcad/simulation/heat_charge.py                596     100  83.22%   79-80, 543, 576, 594-595, 631, 670, 749-751, 758, 771, 801, 898, 910, 991-1003, 1069-1070, 1075, 1090-1102, 1108-1110, 1168, 1191-1205, 1212-1214, 1217, 1231, 1237-1245, 1292-1310, 1330, 1448, 1453-1454, 1477, 1512-1513, 1531-1545, 1557-1564, 1609, 1625-1626, 1630, 1637, 1651, 1658, 1664
tidy3d/components/tcad/source/__init__.py                         0       0  100.00%
tidy3d/components/tcad/source/abstract.py                        20       1  95.00%   23
tidy3d/components/tcad/source/coupled.py                          3       0  100.00%
tidy3d/components/tcad/source/heat.py                            14       0  100.00%
tidy3d/components/viz/__init__.py                                10       0  100.00%
tidy3d/components/viz/axes_utils.py                              43       0  100.00%
tidy3d/components/viz/descartes.py                               38       4  89.47%   21-22, 64-65
tidy3d/components/viz/flex_color_palettes.py                      4       4  0.00%    1-1823
tidy3d/components/viz/flex_style.py                              27      11  59.26%   21-25, 39-40, 43-46
tidy3d/components/viz/plot_params.py                             45       0  100.00%
tidy3d/components/viz/plot_sim_3d.py                             17       2  88.24%   13-14
tidy3d/components/viz/styles.py                                  17       2  88.24%   7-8
tidy3d/components/viz/visualization_spec.py                      28       3  89.29%   11-13
tidy3d/material_library/__init__.py                               0       0  100.00%
tidy3d/material_library/material_library.py                     188       8  95.74%   86, 92, 95, 150, 153, 168, 216, 2072
tidy3d/material_library/material_reference.py                    11       0  100.00%
tidy3d/material_library/parametric_materials.py                 157       2  98.73%   232-233
tidy3d/material_library/util.py                                 131      53  59.54%   51-52, 98, 114-121, 127-139, 192-207, 213-251
tidy3d/plugins/__init__.py                                        0       0  100.00%
tidy3d/plugins/adjoint/__init__.py                               16      16  0.00%    4-31
tidy3d/plugins/adjoint/web.py                                   286     286  0.00%    3-952
tidy3d/plugins/adjoint/components/__init__.py                     9       9  0.00%    4-14
tidy3d/plugins/adjoint/components/base.py                       153     153  0.00%    3-310
tidy3d/plugins/adjoint/components/geometry.py                   379     379  0.00%    3-1066
tidy3d/plugins/adjoint/components/medium.py                     175     175  0.00%    3-451
tidy3d/plugins/adjoint/components/simulation.py                 301     301  0.00%    3-995
tidy3d/plugins/adjoint/components/structure.py                   98      98  0.00%    3-259
tidy3d/plugins/adjoint/components/types.py                       25      25  0.00%    3-55
tidy3d/plugins/adjoint/components/data/__init__.py                0       0  100.00%
tidy3d/plugins/adjoint/components/data/data_array.py            295     295  0.00%    3-529
tidy3d/plugins/adjoint/components/data/dataset.py                12      12  0.00%    3-30
tidy3d/plugins/adjoint/components/data/monitor_data.py          198     198  0.00%    3-465
tidy3d/plugins/adjoint/components/data/sim_data.py              122     122  0.00%    3-285
tidy3d/plugins/adjoint/utils/__init__.py                          0       0  100.00%
tidy3d/plugins/adjoint/utils/filter.py                           79      79  0.00%    3-225
tidy3d/plugins/adjoint/utils/penalty.py                         100     100  0.00%    3-276
tidy3d/plugins/autograd/__init__.py                               7       0  100.00%
tidy3d/plugins/autograd/constants.py                              3       0  100.00%
tidy3d/plugins/autograd/differential_operators.py                27       0  100.00%
tidy3d/plugins/autograd/functions.py                            148       6  95.95%   55, 61, 275, 282, 329, 336
tidy3d/plugins/autograd/types.py                                  4       0  100.00%
tidy3d/plugins/autograd/utilities.py                             73       4  94.52%   208, 225-226, 240
tidy3d/plugins/autograd/invdes/__init__.py                        7       0  100.00%
tidy3d/plugins/autograd/invdes/filters.py                        67       3  95.52%   58-59, 208
tidy3d/plugins/autograd/invdes/misc.py                            5       1  80.00%   25
tidy3d/plugins/autograd/invdes/parametrizations.py               26       0  100.00%
tidy3d/plugins/autograd/invdes/penalties.py                      60      21  65.00%   99, 151-153, 177-181, 202-204, 241-250
tidy3d/plugins/autograd/invdes/projections.py                    15       5  66.67%   32-36, 69
tidy3d/plugins/autograd/primitives/__init__.py                    4       0  100.00%
tidy3d/plugins/autograd/primitives/interpolate.py               263       4  98.48%   17, 616, 644, 680
tidy3d/plugins/autograd/primitives/misc.py                        5       0  100.00%
tidy3d/plugins/design/__init__.py                                 6       0  100.00%
tidy3d/plugins/design/design.py                                 227       4  98.24%   110, 146-147, 377
tidy3d/plugins/design/method.py                                 316       1  99.68%   71
tidy3d/plugins/design/parameter.py                               95       2  97.89%   38, 118
tidy3d/plugins/design/result.py                                 150       7  95.33%   100, 119, 147, 230, 272, 317, 327
tidy3d/plugins/dispersion/__init__.py                             5       0  100.00%
tidy3d/plugins/dispersion/fit.py                                269      13  95.17%   164, 414, 494, 502, 517, 524-527, 658-659, 733, 735
tidy3d/plugins/dispersion/fit_fast.py                            38       1  97.37%   149
tidy3d/plugins/dispersion/fit_web.py                              3       3  0.00%    3-7
tidy3d/plugins/dispersion/web.py                                107      23  78.50%   102, 227-230, 246-251, 276-292, 303-306, 349-353, 364-366
tidy3d/plugins/expressions/__init__.py                           21       0  100.00%
tidy3d/plugins/expressions/base.py                              131      56  57.25%   13, 39, 52-60, 84-86, 94-96, 99-100, 109, 115-117, 125, 128-130, 133-135, 146-148, 151-153, 156-158, 166-168, 171-173, 176-178, 181-183, 186-188, 191-193, 196-198, 201, 204, 207, 210, 213, 216, 219, 222, 225
tidy3d/plugins/expressions/functions.py                          38       1  97.37%   49
tidy3d/plugins/expressions/metrics.py                            46       1  97.83%   92
tidy3d/plugins/expressions/operators.py                          67       2  97.01%   33, 62
tidy3d/plugins/expressions/types.py                              14       4  71.43%   8-22
tidy3d/plugins/expressions/variables.py                          27       1  96.30%   96
tidy3d/plugins/invdes/__init__.py                                16       0  100.00%
tidy3d/plugins/invdes/base.py                                     4       0  100.00%
tidy3d/plugins/invdes/design.py                                 161      23  85.71%   56, 59, 71-74, 110-113, 174, 193-194, 196, 207-212, 217-223, 318-319
tidy3d/plugins/invdes/initialization.py                          55       7  87.27%   55, 95, 102-105, 107, 114, 121
tidy3d/plugins/invdes/optimizer.py                               97       4  95.88%   94, 171, 217, 290
tidy3d/plugins/invdes/penalty.py                                 24       1  95.83%   32
tidy3d/plugins/invdes/region.py                                 176      37  78.98%   74, 80, 101, 181-185, 189-193, 197-228, 238, 281-282
tidy3d/plugins/invdes/result.py                                  54       0  100.00%
tidy3d/plugins/invdes/transformation.py                          26       2  92.31%   25, 83
tidy3d/plugins/invdes/utils.py                                   37       0  100.00%
tidy3d/plugins/invdes/validators.py                              33       7  78.79%   17-28, 65
tidy3d/plugins/microwave/__init__.py                             10       0  100.00%
tidy3d/plugins/microwave/array_factor.py                        275       3  98.91%   177, 185, 650
tidy3d/plugins/microwave/auto_path_integrals.py                  25       0  100.00%
tidy3d/plugins/microwave/custom_path_integrals.py               135       1  99.26%   392
tidy3d/plugins/microwave/impedance_calculator.py                 48       0  100.00%
tidy3d/plugins/microwave/lobe_measurer.py                       154       0  100.00%
tidy3d/plugins/microwave/path_integrals.py                      263       4  98.48%   108, 185, 297, 417
tidy3d/plugins/microwave/rf_material_library.py                  17       0  100.00%
tidy3d/plugins/microwave/rf_material_reference.py                 3       0  100.00%
tidy3d/plugins/microwave/viz.py                                  18       0  100.00%
tidy3d/plugins/microwave/models/__init__.py                       3       0  100.00%
tidy3d/plugins/microwave/models/coupled_microstrip.py            49       0  100.00%
tidy3d/plugins/microwave/models/microstrip.py                    64       0  100.00%
tidy3d/plugins/mode/__init__.py                                   3       0  100.00%
tidy3d/plugins/mode/mode_solver.py                                7       0  100.00%
tidy3d/plugins/mode/web.py                                        3       0  100.00%
tidy3d/plugins/polyslab/__init__.py                               3       0  100.00%
tidy3d/plugins/polyslab/polyslab.py                               7       0  100.00%
tidy3d/plugins/pytorch/__init__.py                                3       0  100.00%
tidy3d/plugins/pytorch/wrapper.py                                39       1  97.44%   66
tidy3d/plugins/resonance/__init__.py                              3       0  100.00%
tidy3d/plugins/resonance/resonance.py                           172      10  94.19%   116, 145, 190, 209-210, 224, 231, 254, 260, 287
tidy3d/plugins/smatrix/__init__.py                               11       0  100.00%
tidy3d/plugins/smatrix/smatrix.py                                 4       0  100.00%
tidy3d/plugins/smatrix/component_modelers/__init__.py             0       0  100.00%
tidy3d/plugins/smatrix/component_modelers/base.py               138      24  82.61%   123-124, 126, 160-164, 176-181, 192, 197, 219-222, 246, 304-308
tidy3d/plugins/smatrix/component_modelers/modal.py              156       1  99.36%   136
tidy3d/plugins/smatrix/component_modelers/terminal.py           276       0  100.00%
tidy3d/plugins/smatrix/data/__init__.py                           0       0  100.00%
tidy3d/plugins/smatrix/data/terminal.py                          19       4  78.95%   29-33, 56-60
tidy3d/plugins/smatrix/ports/__init__.py                          0       0  100.00%
tidy3d/plugins/smatrix/ports/base_lumped.py                      41       0  100.00%
tidy3d/plugins/smatrix/ports/base_terminal.py                    33       2  93.94%   48-52
tidy3d/plugins/smatrix/ports/coaxial_lumped.py                  162       0  100.00%
tidy3d/plugins/smatrix/ports/modal.py                            14       0  100.00%
tidy3d/plugins/smatrix/ports/rectangular_lumped.py              123       1  99.19%   89
tidy3d/plugins/smatrix/ports/wave.py                            106       2  98.11%   123, 181
tidy3d/plugins/waveguide/__init__.py                              3       0  100.00%
tidy3d/plugins/waveguide/rectangular_dielectric.py              360      85  76.39%   244, 259, 266-267, 281, 297, 315, 323, 326, 452-453, 601-623, 632-667, 670-688, 791, 796, 801, 837, 887, 923, 971, 1012, 1039-1078, 1130-1142
tidy3d/web/__init__.py                                           13       0  100.00%
tidy3d/web/environment.py                                         3       3  0.00%    3-7
tidy3d/web/api/__init__.py                                        0       0  100.00%
tidy3d/web/api/asynchronous.py                                   14       2  85.71%   67, 71
tidy3d/web/api/connect_util.py                                   44      18  59.09%   38-43, 50, 55-61, 66-72
tidy3d/web/api/container.py                                     336      36  89.29%   252, 300, 348, 463, 482-484, 635, 656, 747-751, 768, 771-776, 837-857, 878-879, 941-942, 988, 994-995
tidy3d/web/api/material_fitter.py                                63      20  68.25%   87-113, 117-118, 135-136
tidy3d/web/api/material_library.py                               21       1  95.24%   49
tidy3d/web/api/material_libray.py                                21      21  0.00%    3-44
tidy3d/web/api/mode.py                                          208      66  68.27%   125-128, 133, 141, 195-198, 220, 222-231, 234-246, 342, 359, 402-405, 488-490, 494, 523-581, 615-618, 629-630, 668
tidy3d/web/api/tidy3d_stub.py                                   115      45  60.87%   70-73, 84, 108, 144, 179-202, 218, 236-262
tidy3d/web/api/webapi.py                                        349      73  79.08%   335, 365, 395, 433-451, 494-499, 513-518, 539, 548, 569, 596-599, 619-620, 701-709, 813-818, 864, 885, 918, 921-922, 979, 987-989, 1002, 1004, 1008, 1062, 1099, 1116-1124
tidy3d/web/api/autograd/__init__.py                               0       0  100.00%
tidy3d/web/api/autograd/autograd.py                             429      70  83.68%   342, 580-594, 602-612, 728, 870, 928-948, 951, 1077-1081, 1115-1116, 1119-1120, 1122, 1130-1156, 1165-1179
tidy3d/web/api/autograd/utils.py                                 47       0  100.00%
tidy3d/web/cli/__init__.py                                        3       0  100.00%
tidy3d/web/cli/app.py                                            66      35  46.97%   34-39, 59, 71-114, 120
tidy3d/web/cli/constants.py                                       9       1  88.89%   13
tidy3d/web/cli/migrate.py                                        46      35  23.91%   21-72
tidy3d/web/cli/develop/__init__.py                                8       0  100.00%
tidy3d/web/cli/develop/documentation.py                          78      54  30.77%   64-115, 144-163, 179-182, 226-230, 330-340
tidy3d/web/cli/develop/index.py                                   5       0  100.00%
tidy3d/web/cli/develop/install.py                               156     129  17.31%   38-46, 60-63, 75-98, 110-123, 140-151, 163-173, 183-184, 204-258, 283-285, 303-358, 374-375, 395-406
tidy3d/web/cli/develop/packaging.py                              35      18  48.57%   52-79, 112-118
tidy3d/web/cli/develop/tests.py                                  17       6  64.71%   29-32, 65-66
tidy3d/web/cli/develop/utils.py                                  15       6  60.00%   47-49, 68-70
tidy3d/web/core/__init__.py                                       0       0  100.00%
tidy3d/web/core/account.py                                       20       1  95.00%   66
tidy3d/web/core/cache.py                                          3       0  100.00%
tidy3d/web/core/constants.py                                     23       0  100.00%
tidy3d/web/core/core_config.py                                   13       0  100.00%
tidy3d/web/core/environment.py                                   61       8  86.89%   19, 103-110, 143, 154, 165
tidy3d/web/core/exceptions.py                                     9       0  100.00%
tidy3d/web/core/file_util.py                                     40      14  65.00%   23-25, 36-38, 44-51, 61
tidy3d/web/core/http_util.py                                    105      17  83.81%   37, 64, 66-68, 89, 99, 136-139, 158-160, 170, 178-179
tidy3d/web/core/s3utils.py                                      121      75  38.02%   51-52, 57-58, 63, 75, 102-103, 113, 137-138, 148, 159-164, 203-211, 240-279, 305-358, 386-417
tidy3d/web/core/stub.py                                          14       0  100.00%
tidy3d/web/core/task_core.py                                    183      31  83.06%   83-85, 210-216, 258, 312, 324, 332, 336, 354, 369, 392, 394, 434, 468, 498, 501, 538, 551-552, 563-564, 595, 618, 649, 674-677, 687
tidy3d/web/core/task_info.py                                     96       0  100.00%
tidy3d/web/core/types.py                                         38       1  97.37%   69
TOTAL                                                         34193    5330  84.41%

Diff against develop

Filename                                                  Stmts    Miss  Cover
------------------------------------------------------  -------  ------  --------
tidy3d/compat.py                                             +4      +2  -6.67%
tidy3d/config.py                                             -6       0  +100.00%
tidy3d/log.py                                                -1      +2  -1.11%
tidy3d/components/apodization.py                             -3       0  +100.00%
tidy3d/components/base.py                                   +15      +9  -1.68%
tidy3d/components/boundary.py                                -3       0  -0.01%
tidy3d/components/dispersion_fitter.py                       -1       0  -0.01%
tidy3d/components/field_projection.py                        -2      -1  +0.23%
tidy3d/components/lumped_element.py                          +2       0  +0.01%
tidy3d/components/medium.py                                 -22       0  -0.06%
tidy3d/components/mode_spec.py                               +1       0  +0.03%
tidy3d/components/monitor.py                                 -5       0  -0.10%
tidy3d/components/parameter_perturbation.py                  -1      -2  +0.44%
tidy3d/components/scene.py                                   +1       0  +0.04%
tidy3d/components/simulation.py                             +20     +23  -1.22%
tidy3d/components/subpixel_spec.py                           +1       0  +0.11%
tidy3d/components/time_modulation.py                         -7       0  +100.00%
tidy3d/components/type_util.py                               +2      -1  +16.67%
tidy3d/components/types.py                                   -9      -7  +4.11%
tidy3d/components/validators.py                              +5       0  +0.11%
tidy3d/components/autograd/boxes.py                          -1       0  -0.33%
tidy3d/components/autograd/derivative_utils.py               +2       0  +0.07%
tidy3d/components/autograd/types.py                         +33     +12  -19.67%
tidy3d/components/autograd/utils.py                         +17       0  +100.00%
tidy3d/components/base_sim/simulation.py                     +2      +1  -0.57%
tidy3d/components/base_sim/source.py                         +1       0  +100.00%
tidy3d/components/base_sim/data/sim_data.py                  -2       0  +100.00%
tidy3d/components/data/data_array.py                        +15      +3  -0.51%
tidy3d/components/data/monitor_data.py                       -1       0  +100.00%
tidy3d/components/data/unstructured/base.py                 +15      +1  -0.02%
tidy3d/components/eme/simulation.py                         +17      +1  -0.16%
tidy3d/components/eme/data/dataset.py                        +1       0  +100.00%
tidy3d/components/geometry/base.py                           +6      +1  -0.05%
tidy3d/components/geometry/mesh.py                           -1       0  -0.04%
tidy3d/components/geometry/polyslab.py                       +1       0  +0.01%
tidy3d/components/geometry/primitives.py                     -1       0  -0.07%
tidy3d/components/grid/grid_spec.py                          -1       0  +100.00%
tidy3d/components/material/multi_physics.py                   0      +1  -2.94%
tidy3d/components/mode/mode_solver.py                        +2       0  +0.06%
tidy3d/components/mode/simulation.py                         +9      -6  +4.69%
tidy3d/components/source/current.py                          -1       0  +100.00%
tidy3d/components/source/field.py                            +2       0  +0.09%
tidy3d/components/spice/sources/dc.py                        -1       0  +100.00%
tidy3d/components/tcad/doping.py                             -1       0  -0.19%
tidy3d/components/tcad/grid.py                               -9      -4  +4.91%
tidy3d/components/tcad/data/monitor_data/charge.py          -11       0  -0.27%
tidy3d/components/tcad/data/monitor_data/heat.py             +3      +1  -2.70%
tidy3d/components/tcad/simulation/heat_charge.py            -23       0  -0.62%
tidy3d/components/viz/visualization_spec.py                  -1       0  -0.37%
tidy3d/material_library/material_reference.py                +1       0  +100.00%
tidy3d/material_library/parametric_materials.py              -2      -1  +0.62%
tidy3d/plugins/adjoint/__init__.py                            0     +14  -87.50%
tidy3d/plugins/adjoint/web.py                                -1    +231  -80.84%
tidy3d/plugins/adjoint/components/__init__.py                -1      +9  -100.00%
tidy3d/plugins/adjoint/components/base.py                   +12    +153  -100.00%
tidy3d/plugins/adjoint/components/geometry.py                 0    +363  -95.78%
tidy3d/plugins/adjoint/components/medium.py                   0    +173  -98.86%
tidy3d/plugins/adjoint/components/simulation.py               0    +292  -97.01%
tidy3d/plugins/adjoint/components/structure.py                0     +97  -98.98%
tidy3d/plugins/adjoint/components/types.py                   +3     +23  -90.91%
tidy3d/plugins/adjoint/components/data/data_array.py         -1    +269  -91.22%
tidy3d/plugins/adjoint/components/data/dataset.py             0     +12  -100.00%
tidy3d/plugins/adjoint/components/data/monitor_data.py        0    +190  -95.96%
tidy3d/plugins/adjoint/components/data/sim_data.py            0    +118  -96.72%
tidy3d/plugins/adjoint/utils/filter.py                       +1     +78  -98.72%
tidy3d/plugins/adjoint/utils/penalty.py                       0     +97  -97.00%
tidy3d/plugins/design/result.py                              -1       0  -0.03%
tidy3d/plugins/dispersion/fit.py                             -2       0  -0.03%
tidy3d/plugins/dispersion/web.py                             -2       0  -0.40%
tidy3d/plugins/expressions/__init__.py                       +1       0  +100.00%
tidy3d/plugins/expressions/base.py                           -2      +7  -5.91%
tidy3d/plugins/expressions/functions.py                      +1       0  +0.07%
tidy3d/plugins/expressions/metrics.py                         0      -1  +2.18%
tidy3d/plugins/expressions/operators.py                      +2       0  +0.09%
tidy3d/plugins/expressions/types.py                          -1       0  -1.90%
tidy3d/plugins/invdes/__init__.py                            +6       0  +100.00%
tidy3d/plugins/invdes/design.py                              -6       0  -0.52%
tidy3d/plugins/invdes/initialization.py                      -2       0  -0.45%
tidy3d/plugins/invdes/region.py                              +4     +23  -12.88%
tidy3d/plugins/invdes/validators.py                          -2      +1  -4.07%
tidy3d/plugins/microwave/array_factor.py                     -1      +1  -0.37%
tidy3d/plugins/microwave/lobe_measurer.py                    -1       0  +100.00%
tidy3d/plugins/smatrix/component_modelers/base.py             0      +3  -2.17%
tidy3d/plugins/smatrix/component_modelers/terminal.py        +1       0  +100.00%
tidy3d/plugins/smatrix/ports/coaxial_lumped.py               -3       0  +100.00%
tidy3d/plugins/smatrix/ports/rectangular_lumped.py           -1      +1  -0.81%
tidy3d/plugins/smatrix/ports/wave.py                         -3       0  -0.06%
tidy3d/plugins/waveguide/rectangular_dielectric.py           -9      +5  -1.93%
tidy3d/web/api/material_library.py                          +21      +1  +95.24%
tidy3d/web/api/material_libray.py                             0     +20  -95.24%
tidy3d/web/api/tidy3d_stub.py                                -1       0  -0.34%
tidy3d/web/api/autograd/utils.py                             -1       0  +100.00%
tidy3d/web/core/environment.py                               +2       0  +0.45%
tidy3d/web/core/task_core.py                                 -2       0  -0.18%
tidy3d/web/core/task_info.py                                 -2       0  +100.00%
TOTAL                                                       +71   +2215  -6.46%

Results for commit: 0afc42d

Minimum allowed coverage is 90%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented May 27, 2025

badge

Changed Files Coverage

Filename                                                   Stmts    Miss  Cover    Missing
-------------------------------------------------------  -------  ------  -------  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
tidy3d/compat.py                                              10       4  60.00%   7-8, 12-13
tidy3d/config.py                                              18       0  100.00%
tidy3d/log.py                                                189      21  88.89%   54, 91-92, 218, 227, 256-257, 300, 304, 370, 408, 412-417, 421, 425-427, 444
tidy3d/updater.py                                            196     120  38.78%   30, 35-36, 50, 58-62, 66-70, 74, 78, 96-112, 117-118, 125, 130-134, 138-141, 148-154, 158, 180, 195-204, 211-223, 230-276, 282-284, 291-296, 303-329, 336-341
tidy3d/components/apodization.py                              41       0  100.00%
tidy3d/components/base.py                                    513      21  95.91%   78, 85, 94, 495, 548-549, 765-766, 867-868, 992, 1004, 1021, 1025, 1028, 1120, 1200-1201, 1246, 1250-1251
tidy3d/components/bc_placement.py                             30       2  93.33%   51, 74
tidy3d/components/beam.py                                    190      23  87.89%   148, 292-294, 298-300, 314, 319-322, 328, 331-335, 345-351
tidy3d/components/boundary.py                                188       2  98.94%   926-927
tidy3d/components/dispersion_fitter.py                       419      22  94.75%   110-116, 202, 289, 382, 456, 476-480, 600, 675-676, 708, 844, 872, 929-930, 955, 977
tidy3d/components/field_projection.py                        352      32  90.91%   150, 219, 254, 334-337, 420-421, 433, 521, 525-552, 624-640, 798-804
tidy3d/components/frequencies.py                             105      49  53.33%   51-65, 67-71, 74, 76, 78-104
tidy3d/components/lumped_element.py                          457       6  98.69%   552-556, 1034, 1084, 1118, 1156
tidy3d/components/medium.py                                 2335     153  93.45%   163, 173, 685, 700, 848, 892, 953, 1390, 1397-1408, 1707, 1720-1721, 1920, 2023, 2026, 2039, 2042, 2052, 2137-2150, 2208-2211, 2215-2218, 2235, 2237, 2241, 2302, 2308-2309, 2315, 2328, 2409, 2441, 2497, 2814, 2824, 2864, 2917, 2926-2927, 3080, 3262, 3338, 3500, 3504, 3522, 3535, 3601, 3636, 3653, 3766-3770, 3870, 3888, 3893, 3896, 4039-4044, 4204, 4291, 4293, 4295, 4320, 4325, 4380, 4568, 4570, 4634-4638, 4690, 4695, 4700, 4705, 4860, 4862, 4888-4892, 4944, 4949, 4954, 5012, 5015, 5112, 5114, 5155-5159, 5211, 5216, 5221, 5547, 5601, 5609, 5647-5665, 5810, 6073-6075, 6110-6111, 6178-6192, 6281, 6386, 6636, 6854, 7068, 7200, 7378, 7387-7390
tidy3d/components/mode_spec.py                                64       1  98.44%   234
tidy3d/components/monitor.py                                 355      25  92.96%   75, 83, 260, 305-314, 368, 397-400, 421, 532-533, 757, 764-766, 808, 818, 858, 987
tidy3d/components/parameter_perturbation.py                  437      26  94.05%   1542, 1565-1591, 1599-1619, 1776
tidy3d/components/run_time_spec.py                             6       0  100.00%
tidy3d/components/scene.py                                   599     148  75.29%   70-71, 157, 350-354, 379, 381, 518-519, 534, 546, 553, 926, 936, 956-965, 969-981, 987, 1021, 1131-1210, 1245, 1276, 1287, 1426-1432, 1499, 1530-1531, 1573, 1587-1593, 1611, 1624, 1706-1712, 1804, 1818-1851, 1870-1925
tidy3d/components/simulation.py                             1779     132  92.58%   135-136, 141-142, 199, 206, 214, 222, 367, 402, 420, 435, 769-773, 821-825, 1044-1055, 1383, 1509-1510, 1547, 1553, 1594, 1599, 1611, 1684-1690, 1750, 2947, 2955, 2963, 2992, 3106, 3159, 3217, 3265, 3327, 3356, 3364, 3377, 3420, 3439, 3458-3467, 3493, 3501, 3533, 3561, 3596, 3617, 3623, 3630, 3650, 3721, 3858, 4006, 4189, 4214, 4350-4351, 4356, 4484-4488, 4505, 4593, 4601, 4603, 4624, 4661, 4675-4680, 4722, 4731-4734, 4736-4739, 4788-4789, 4850, 4855, 4859-4911, 4935, 4974-4976, 5014-5015, 5045, 5155, 5161-5172, 5206, 5227
tidy3d/components/structure.py                               223      17  92.38%   45-46, 133, 275, 307, 330, 360, 511-515, 569-570, 599, 605, 620, 630, 725
tidy3d/components/subpixel_spec.py                            45       2  95.56%   204, 208
tidy3d/components/time.py                                     75       2  97.33%   79, 89
tidy3d/components/time_modulation.py                          86       0  100.00%
tidy3d/components/transformation.py                           83       5  93.98%   69, 103, 154, 172, 188
tidy3d/components/type_util.py                                 8       0  100.00%
tidy3d/components/types.py                                   154       5  96.75%   23-24, 41, 59, 61
tidy3d/components/validators.py                              225      10  95.56%   63, 133-140, 259, 275, 367
tidy3d/components/autograd/__init__.py                         6       0  100.00%
tidy3d/components/autograd/boxes.py                           58      11  81.03%   31, 72, 79, 87-88, 92, 95-96, 134, 142, 147
tidy3d/components/autograd/derivative_utils.py               125       5  96.00%   193, 201, 208, 213, 295
tidy3d/components/autograd/types.py                           61      12  80.33%   60-74
tidy3d/components/autograd/utils.py                           28       0  100.00%
tidy3d/components/base_sim/monitor.py                         33       0  100.00%
tidy3d/components/base_sim/simulation.py                     163       6  96.32%   166, 604-608, 670-674, 699
tidy3d/components/base_sim/source.py                          12       0  100.00%
tidy3d/components/base_sim/data/monitor_data.py               10       0  100.00%
tidy3d/components/base_sim/data/sim_data.py                   57       0  100.00%
tidy3d/components/data/data_array.py                         445      24  94.61%   81, 88, 111, 115-116, 155, 205, 225, 288-292, 296-299, 413-418, 422-430, 624, 649
tidy3d/components/data/dataset.py                            181       4  97.79%   295, 397-400
tidy3d/components/data/monitor_data.py                      1364      58  95.75%   115, 167, 177, 321, 446, 457, 491, 635-647, 658, 805, 851, 1184-1185, 1189-1190, 1204, 1375, 1631, 1750, 1767, 2052, 2061, 2075-2076, 2197, 2205-2216, 2277, 2502, 2581, 2594, 2709, 3056, 3168, 3190-3191, 3357, 3391, 3603-3604, 3711
tidy3d/components/data/sim_data.py                           419      24  94.27%   309, 355, 402, 407, 424, 433, 527, 535, 568, 572, 619, 631, 642, 940, 986, 1051, 1058, 1067, 1094, 1296, 1298, 1302, 1321-1322
tidy3d/components/data/utils.py                               46       4  91.30%   43, 54, 75, 83
tidy3d/components/data/validators.py                          43       1  97.67%   53
tidy3d/components/data/zbf.py                                 50       4  92.00%   118-119, 130-131
tidy3d/components/data/unstructured/base.py                  655      38  94.20%   76, 88, 99, 109, 133, 146, 157, 197, 199-209, 390, 397, 404, 407, 440, 601-606, 615, 624, 646, 873, 876, 882, 920-924, 997, 1249, 1549, 1615, 1688, 1715, 1740, 1767
tidy3d/components/data/unstructured/tetrahedral.py           109       4  96.33%   109, 213, 327, 346
tidy3d/components/data/unstructured/triangular.py            194      11  94.33%   14-15, 145, 162, 292, 353, 483-484, 487, 503, 522
tidy3d/components/eme/grid.py                                304       2  99.34%   127, 173
tidy3d/components/eme/monitor.py                              41       0  100.00%
tidy3d/components/eme/simulation.py                          483       8  98.34%   56-57, 666, 746, 962, 976, 991, 999
tidy3d/components/eme/sweep.py                                40       0  100.00%
tidy3d/components/eme/data/dataset.py                         28       0  100.00%
tidy3d/components/eme/data/monitor_data.py                    14       0  100.00%
tidy3d/components/eme/data/sim_data.py                       220       8  96.36%   253-258, 281-284
tidy3d/components/geometry/base.py                          1037      82  92.09%   69-70, 139, 563-566, 591, 595, 720-729, 795, 1251-1255, 1269-1272, 1393-1397, 1435-1436, 1449, 1464, 1466, 1472-1476, 1481, 1487, 1493, 1499, 1505, 1510, 1514, 1520, 1829, 1874-1878, 2077, 2306-2335, 2403, 2747, 2902, 2913, 2940-2944, 2992, 3046-3048, 3147, 3298
tidy3d/components/geometry/mesh.py                           254      23  90.94%   81, 199, 211-213, 252, 294, 298, 353, 357, 375, 502, 549-553, 608-622
tidy3d/components/geometry/polyslab.py                       784      35  95.54%   110, 344-350, 468, 598, 624, 966-971, 1143, 1172, 1175, 1352-1361, 1437, 1520-1543, 1562, 1924, 1983
tidy3d/components/geometry/primitives.py                     317      67  78.86%   98, 251, 315, 318, 328-331, 361, 392-465
tidy3d/components/geometry/triangulation.py                   64       2  96.88%   135, 149
tidy3d/components/geometry/utils.py                          184       6  96.74%   65, 275, 293, 296-299
tidy3d/components/geometry/utils_2d.py                       103       0  100.00%
tidy3d/components/grid/corner_finder.py                       77       0  100.00%
tidy3d/components/grid/grid.py                               209      10  95.22%   145, 255-261, 594, 699
tidy3d/components/grid/grid_spec.py                          758      21  97.23%   219, 237-240, 671, 768, 1420-1422, 1427-1428, 1442, 1487, 1489, 1497, 1512, 2587-2591, 2665, 2673
tidy3d/components/grid/mesher.py                             484      10  97.93%   813, 907, 996, 998, 1000, 1066, 1115, 1194, 1266, 1317
tidy3d/components/material/multi_physics.py                   34       1  97.06%   147
tidy3d/components/material/tcad/charge.py                     30       3  90.00%   38, 41, 44
tidy3d/components/material/tcad/heat.py                       35       0  100.00%
tidy3d/components/microwave/data/monitor_data.py              52       0  100.00%
tidy3d/components/mode/mode_solver.py                        891     237  73.40%   82-84, 113, 188-189, 199, 210, 260-262, 346-349, 380, 434, 464-470, 475-546, 554-560, 566-604, 610-614, 648-730, 850-971, 976-983, 991-995, 1000-1033, 1044-1046, 1114, 1290-1294, 1347-1359, 1376-1377, 1400-1401, 1451, 1508, 1582, 1700, 1715, 1720-1722, 1727-1733, 1741-1747, 1758, 1760, 1769, 1840, 2283, 2345-2347, 2510
tidy3d/components/mode/simulation.py                         137       0  100.00%
tidy3d/components/mode/solver.py                             416      72  82.69%   118, 125, 141-142, 147-152, 165, 240, 250-251, 257, 281, 393, 479-485, 503, 510-512, 551-552, 561-591, 598-604, 651, 654, 896, 920, 977, 988, 1002, 1007-1020, 1028-1034, 1039, 1047
tidy3d/components/mode/data/sim_data.py                       18       0  100.00%
tidy3d/components/source/base.py                              53       6  88.68%   93-100
tidy3d/components/source/current.py                           32       0  100.00%
tidy3d/components/source/field.py                            177      13  92.66%   124, 455-460, 525-531, 542
tidy3d/components/source/time.py                             147       9  93.88%   171-172, 185-187, 262, 365, 401, 433
tidy3d/components/spice/analysis/dc.py                        14       0  100.00%
tidy3d/components/spice/sources/dc.py                         20       0  100.00%
tidy3d/components/tcad/bandgap.py                              9       0  100.00%
tidy3d/components/tcad/doping.py                             123      29  76.42%   21-28, 36-38, 51, 56-58, 63-64, 119-130, 229-232, 316
tidy3d/components/tcad/generation_recombination.py            22       0  100.00%
tidy3d/components/tcad/grid.py                                51       6  88.24%   101-103, 129-132
tidy3d/components/tcad/mobility.py                            14       0  100.00%
tidy3d/components/tcad/analysis/heat_simulation_type.py       10       0  100.00%
tidy3d/components/tcad/boundary/charge.py                     10       0  100.00%
tidy3d/components/tcad/boundary/heat.py                       11       0  100.00%
tidy3d/components/tcad/boundary/specification.py              10       0  100.00%
tidy3d/components/tcad/data/sim_data.py                      102       9  91.18%   208, 222, 228, 238, 273-276, 281, 304
tidy3d/components/tcad/data/monitor_data/abstract.py          52       0  100.00%
tidy3d/components/tcad/data/monitor_data/charge.py           163       7  95.71%   75-78, 122-123, 226, 404
tidy3d/components/tcad/data/monitor_data/heat.py              37       1  97.30%   82
tidy3d/components/tcad/monitors/abstract.py                   12       2  83.33%   38-39
tidy3d/components/tcad/monitors/charge.py                     11       0  100.00%
tidy3d/components/tcad/monitors/heat.py                        5       0  100.00%
tidy3d/components/tcad/simulation/heat.py                     21       0  100.00%
tidy3d/components/tcad/simulation/heat_charge.py             596     100  83.22%   79-80, 543, 576, 594-595, 631, 670, 749-751, 758, 771, 801, 898, 910, 991-1003, 1069-1070, 1075, 1090-1102, 1108-1110, 1168, 1191-1205, 1212-1214, 1217, 1231, 1237-1245, 1292-1310, 1330, 1448, 1453-1454, 1477, 1512-1513, 1531-1545, 1557-1564, 1609, 1625-1626, 1630, 1637, 1651, 1658, 1664
tidy3d/components/tcad/source/abstract.py                     20       1  95.00%   23
tidy3d/components/tcad/source/heat.py                         14       0  100.00%
tidy3d/components/viz/plot_params.py                          45       0  100.00%
tidy3d/components/viz/visualization_spec.py                   28       3  89.29%   11-13
tidy3d/material_library/material_library.py                  188       8  95.74%   86, 92, 95, 150, 153, 168, 216, 2072
tidy3d/material_library/material_reference.py                 11       0  100.00%
tidy3d/material_library/parametric_materials.py              157       2  98.73%   232-233
tidy3d/plugins/adjoint/web.py                                286     286  0.00%    3-952
tidy3d/plugins/adjoint/components/__init__.py                  9       9  0.00%    4-14
tidy3d/plugins/adjoint/components/base.py                    153     153  0.00%    3-310
tidy3d/plugins/adjoint/components/geometry.py                379     379  0.00%    3-1066
tidy3d/plugins/adjoint/components/medium.py                  175     175  0.00%    3-451
tidy3d/plugins/adjoint/components/simulation.py              301     301  0.00%    3-995
tidy3d/plugins/adjoint/components/structure.py                98      98  0.00%    3-259
tidy3d/plugins/adjoint/components/types.py                    25      25  0.00%    3-55
tidy3d/plugins/adjoint/components/data/data_array.py         295     295  0.00%    3-529
tidy3d/plugins/adjoint/components/data/dataset.py             12      12  0.00%    3-30
tidy3d/plugins/adjoint/components/data/monitor_data.py       198     198  0.00%    3-465
tidy3d/plugins/adjoint/components/data/sim_data.py           122     122  0.00%    3-285
tidy3d/plugins/adjoint/utils/filter.py                        79      79  0.00%    3-225
tidy3d/plugins/adjoint/utils/penalty.py                      100     100  0.00%    3-276
tidy3d/plugins/autograd/functions.py                         148       6  95.95%   55, 61, 275, 282, 329, 336
tidy3d/plugins/autograd/utilities.py                          73       4  94.52%   208, 225-226, 240
tidy3d/plugins/autograd/invdes/filters.py                     67       3  95.52%   58-59, 208
tidy3d/plugins/autograd/invdes/parametrizations.py            26       0  100.00%
tidy3d/plugins/autograd/invdes/penalties.py                   60      21  65.00%   99, 151-153, 177-181, 202-204, 241-250
tidy3d/plugins/design/design.py                              227       4  98.24%   110, 146-147, 377
tidy3d/plugins/design/method.py                              316       1  99.68%   71
tidy3d/plugins/design/parameter.py                            95       2  97.89%   38, 118
tidy3d/plugins/design/result.py                              150       7  95.33%   100, 119, 147, 230, 272, 317, 327
tidy3d/plugins/dispersion/fit.py                             269      13  95.17%   164, 414, 494, 502, 517, 524-527, 658-659, 733, 735
tidy3d/plugins/dispersion/fit_fast.py                         38       1  97.37%   149
tidy3d/plugins/dispersion/web.py                             107      23  78.50%   102, 227-230, 246-251, 276-292, 303-306, 349-353, 364-366
tidy3d/plugins/expressions/__init__.py                        21       0  100.00%
tidy3d/plugins/expressions/base.py                           131      56  57.25%   13, 39, 52-60, 84-86, 94-96, 99-100, 109, 115-117, 125, 128-130, 133-135, 146-148, 151-153, 156-158, 166-168, 171-173, 176-178, 181-183, 186-188, 191-193, 196-198, 201, 204, 207, 210, 213, 216, 219, 222, 225
tidy3d/plugins/expressions/functions.py                       38       1  97.37%   49
tidy3d/plugins/expressions/metrics.py                         46       1  97.83%   92
tidy3d/plugins/expressions/operators.py                       67       2  97.01%   33, 62
tidy3d/plugins/expressions/types.py                           14       4  71.43%   8-22
tidy3d/plugins/expressions/variables.py                       27       1  96.30%   96
tidy3d/plugins/invdes/__init__.py                             16       0  100.00%
tidy3d/plugins/invdes/base.py                                  4       0  100.00%
tidy3d/plugins/invdes/design.py                              161      23  85.71%   56, 59, 71-74, 110-113, 174, 193-194, 196, 207-212, 217-223, 318-319
tidy3d/plugins/invdes/initialization.py                       55       7  87.27%   55, 95, 102-105, 107, 114, 121
tidy3d/plugins/invdes/optimizer.py                            97       4  95.88%   94, 171, 217, 290
tidy3d/plugins/invdes/penalty.py                              24       1  95.83%   32
tidy3d/plugins/invdes/region.py                              176      37  78.98%   74, 80, 101, 181-185, 189-193, 197-228, 238, 281-282
tidy3d/plugins/invdes/result.py                               54       0  100.00%
tidy3d/plugins/invdes/transformation.py                       26       2  92.31%   25, 83
tidy3d/plugins/invdes/utils.py                                37       0  100.00%
tidy3d/plugins/invdes/validators.py                           33       7  78.79%   17-28, 65
tidy3d/plugins/microwave/array_factor.py                     275       3  98.91%   177, 185, 650
tidy3d/plugins/microwave/custom_path_integrals.py            135       1  99.26%   392
tidy3d/plugins/microwave/impedance_calculator.py              48       0  100.00%
tidy3d/plugins/microwave/lobe_measurer.py                    154       0  100.00%
tidy3d/plugins/microwave/path_integrals.py                   263       4  98.48%   108, 185, 297, 417
tidy3d/plugins/microwave/rf_material_library.py               17       0  100.00%
tidy3d/plugins/resonance/resonance.py                        172      10  94.19%   116, 145, 190, 209-210, 224, 231, 254, 260, 287
tidy3d/plugins/smatrix/component_modelers/base.py            138      24  82.61%   123-124, 126, 160-164, 176-181, 192, 197, 219-222, 246, 304-308
tidy3d/plugins/smatrix/component_modelers/modal.py           156       1  99.36%   136
tidy3d/plugins/smatrix/component_modelers/terminal.py        276       0  100.00%
tidy3d/plugins/smatrix/data/terminal.py                       19       4  78.95%   29-33, 56-60
tidy3d/plugins/smatrix/ports/base_lumped.py                   41       0  100.00%
tidy3d/plugins/smatrix/ports/base_terminal.py                 33       2  93.94%   48-52
tidy3d/plugins/smatrix/ports/coaxial_lumped.py               162       0  100.00%
tidy3d/plugins/smatrix/ports/modal.py                         14       0  100.00%
tidy3d/plugins/smatrix/ports/rectangular_lumped.py           123       1  99.19%   89
tidy3d/plugins/smatrix/ports/wave.py                         106       2  98.11%   123, 181
tidy3d/plugins/waveguide/rectangular_dielectric.py           360      85  76.39%   244, 259, 266-267, 281, 297, 315, 323, 326, 452-453, 601-623, 632-667, 670-688, 791, 796, 801, 837, 887, 923, 971, 1012, 1039-1078, 1130-1142
tidy3d/web/api/asynchronous.py                                14       2  85.71%   67, 71
tidy3d/web/api/container.py                                  336      36  89.29%   252, 300, 348, 463, 482-484, 635, 656, 747-751, 768, 771-776, 837-857, 878-879, 941-942, 988, 994-995
tidy3d/web/api/material_fitter.py                             63      20  68.25%   87-113, 117-118, 135-136
tidy3d/web/api/material_library.py                            21       1  95.24%   49
tidy3d/web/api/mode.py                                       208      66  68.27%   125-128, 133, 141, 195-198, 220, 222-231, 234-246, 342, 359, 402-405, 488-490, 494, 523-581, 615-618, 629-630, 668
tidy3d/web/api/tidy3d_stub.py                                115      45  60.87%   70-73, 84, 108, 144, 179-202, 218, 236-262
tidy3d/web/api/webapi.py                                     349      73  79.08%   335, 365, 395, 433-451, 494-499, 513-518, 539, 548, 569, 596-599, 619-620, 701-709, 813-818, 864, 885, 918, 921-922, 979, 987-989, 1002, 1004, 1008, 1062, 1099, 1116-1124
tidy3d/web/api/autograd/autograd.py                          429      70  83.68%   342, 580-594, 602-612, 728, 870, 928-948, 951, 1077-1081, 1115-1116, 1119-1120, 1122, 1130-1156, 1165-1179
tidy3d/web/api/autograd/utils.py                              47       0  100.00%
tidy3d/web/core/account.py                                    20       1  95.00%   66
tidy3d/web/core/environment.py                                61       8  86.89%   19, 103-110, 143, 154, 165
tidy3d/web/core/http_util.py                                 105      17  83.81%   37, 64, 66-68, 89, 99, 136-139, 158-160, 170, 178-179
tidy3d/web/core/s3utils.py                                   121      75  38.02%   51-52, 57-58, 63, 75, 102-103, 113, 137-138, 148, 159-164, 203-211, 240-279, 305-358, 386-417
tidy3d/web/core/task_core.py                                 183      31  83.06%   83-85, 210-216, 258, 312, 324, 332, 336, 354, 369, 392, 394, 434, 468, 498, 501, 538, 551-552, 563-564, 595, 618, 649, 674-677, 687
tidy3d/web/core/task_info.py                                  96       0  100.00%
tidy3d/web/core/types.py                                      38       1  97.37%   69
TOTAL                                                      31953    4863  84.78%

Results for commit: 0afc42d

Minimum allowed coverage is 90%

♻️ This comment has been updated with latest results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.9 will go into version 2.9.* rc1 1st pre-release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Full Pydantic v2 upgrade ⏫
3 participants