Skip to content

Conversation

momchil-flex
Copy link
Collaborator

@momchil-flex momchil-flex commented Jun 20, 2025

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.

  • Added validate_mode_object helper in tidy3d/components/simulation.py to centralize validation for both mode sources and monitors
  • Removed redundant mode plane radius validation from ModeSimulation._post_init_validators in favor of consolidated checks
  • Updated test_validation_from_simulation() to validate anisotropic media and infinite geometries against mode sources instead of monitors
  • Simplified structure rotation validation in ModeSolver by extracting it into a reusable static helper function

Copy link

@greptile-apps greptile-apps bot left a 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

Copy link
Contributor

github-actions bot commented Jun 20, 2025

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

  • tidy3d/components/mode/mode_solver.py (100%)
  • tidy3d/components/simulation.py (100%)

Summary

  • Total: 32 lines
  • Missing: 0 lines
  • Coverage: 100%

@momchil-flex momchil-flex force-pushed the momchil/mode_validation branch from 2152f6e to 864a69c Compare June 20, 2025 14:17
@yaugenst-flex yaugenst-flex force-pushed the momchil/mode_validation branch from 81bc18a to de4ebf1 Compare June 23, 2025 08:43
Copy link
Collaborator

@yaugenst-flex yaugenst-flex left a 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

@yaugenst-flex yaugenst-flex force-pushed the momchil/mode_validation branch from de4ebf1 to 7a12a9d Compare June 23, 2025 10:06
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
@yaugenst-flex yaugenst-flex force-pushed the momchil/mode_validation branch from 7a12a9d to 904019d Compare June 23, 2025 10:06
@yaugenst-flex yaugenst-flex merged commit 6e5dd73 into develop Jun 23, 2025
19 of 21 checks passed
@yaugenst-flex yaugenst-flex deleted the momchil/mode_validation branch June 23, 2025 10:07
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants