Skip to content

📡 RF modular restructure v1 #2567

New issue

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

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

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: yaugenst-flex/pydantic-v2
Choose a base branch
from

Conversation

daquinteroflex
Copy link
Collaborator

@daquinteroflex daquinteroflex commented Jun 12, 2025

Still WIP, I'm reorganising what's shared between EM and what is RF specific still.

Discussions on slack.

  • Agreed modularization
  • Make sure on the fly imports work
  • Verify submodule imports
  • Rerun relevant notebooks to be sure.

yaugenst-flex and others added 2 commits May 31, 2025 23:22
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
@daquinteroflex daquinteroflex changed the base branch from develop to yaugenst-flex/pydantic-v2 June 12, 2025 12:43
@daquinteroflex daquinteroflex force-pushed the dario/rf_structure_refactor branch from 1b2606f to 1f1effa Compare June 12, 2025 12:52
@daquinteroflex daquinteroflex force-pushed the dario/rf_structure_refactor branch from ebb1315 to e1de4c7 Compare June 12, 2025 13:12
@yaugenst-flex yaugenst-flex force-pushed the yaugenst-flex/pydantic-v2 branch from bc3751e to 8f478bd Compare June 13, 2025 18:39
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.

3 participants