-
Notifications
You must be signed in to change notification settings - Fork 66
Partially reverting #2534 and reorganizing mode validation #2590
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
4 files reviewed, no comments
Edit PR Review Bot Settings | Greptile
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
|
2152f6e
to
864a69c
Compare
81bc18a
to
de4ebf1
Compare
yaugenst-flex
approved these changes
Jun 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thanks, already ported over to the v2 branch
de4ebf1
to
7a12a9d
Compare
fix: Python 3.9 compatibility for isinstance with Union types Use get_args() to extract types from IsotropicUniformMediumType Union for isinstance check. Fixes test_validation_from_simulation failure. Related to PR #2534
7a12a9d
to
904019d
Compare
yaugenst-flex
added a commit
that referenced
this pull request
Jun 23, 2025
…eSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator
yaugenst-flex
added a commit
that referenced
this pull request
Jun 23, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError)
yaugenst-flex
added a commit
that referenced
this pull request
Jun 25, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError)
yaugenst-flex
added a commit
that referenced
this pull request
Jun 26, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency
yaugenst-flex
added a commit
that referenced
this pull request
Jul 2, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp
yaugenst-flex
added a commit
that referenced
this pull request
Jul 2, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp
yaugenst-flex
added a commit
that referenced
this pull request
Jul 2, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp
yaugenst-flex
added a commit
that referenced
this pull request
Jul 2, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp
yaugenst-flex
added a commit
that referenced
this pull request
Jul 4, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 7, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 8, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 8, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 8, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 10, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 10, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 14, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 15, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 15, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 16, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 16, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 21, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 22, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
yaugenst-flex
added a commit
that referenced
this pull request
Jul 28, 2025
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 fix python 3.9 compat same behavior as v1 for `FreqArray` Also updating FieldDataset in monitor_data/charge.py Make `FreqArray` pure `ArrayFloat1D` remove old material_libray.py replace deprecated symbols disable adjoint plugin pin pydantic>2.8 fixing warnings fix modesolver validators Updating TriangularGridDataset.normal_axis and TemperatureData validator Warning adjoint removal in apidocs pin pydantic>=2.9, fix literal types fixing stuff fix: resolve circular validator dependency between Simulation and ModeSimulation Port fix from PR #2590 to Pydantic v2 branch. The circular dependency that wasn't problematic in Pydantic v1 becomes a real issue in v2. Changes: - Extract mode validation logic into centralized validate_mode_object function - Remove circular validator from ModeSimulation._validate_mode_plane_radius - Add static ModeSolver._validate_mode_plane_radius and _make_rotated_structures - Update _warn_thick_pml parameter name for consistency - Fix missing return self in _warn_rf_license validator fix: update test expectations for Pydantic v2 validation behavior - Update warning count in test_logging_warning_capture from 31 to 34 The additional warnings are duplicates caused by Pydantic v2's different validation execution order - Add missing bend radius validator to ModeSolver class The _validate_bend_radius model validator ensures bend radius validation occurs during ModeSolver initialization fix: complete Pydantic v2 migration fixes for failing tests - Fix circular validator dependency in ModeSimulation by moving _boundaries_for_zero_dims validator to the beginning of the class - Make SolidSpec.capacity field optional to match develop branch behavior - Fix pd.ValidationError references in test_heat_charge.py - Update test_mode.py to handle both SetupError and pd.ValidationError for Pydantic v2 compatibility - Clean up imports and remove duplicate ValidationError imports fix: additional Pydantic v2 migration fixes - Fixed merge conflict marker in mode_solver.py - Fixed pd.Field reference in wave.py (should be Field) - Fixed pd.ValidationError reference in test (should be ValidationError) add dropped dependency Speeding up slanted polyslab validation parse_obj -> model_validate tmp remove all v1 remnants fix resource contention issues in web tests copy for colocation points Bumping version
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greptile Summary
Reorganizes mode validation logic across the codebase by extracting validation from ModeSolver into dedicated functions and consolidating checks for mode sources and monitors.
validate_mode_object
helper intidy3d/components/simulation.py
to centralize validation for both mode sources and monitorsModeSimulation._post_init_validators
in favor of consolidated checkstest_validation_from_simulation()
to validate anisotropic media and infinite geometries against mode sources instead of monitorsModeSolver
by extracting it into a reusable static helper function