Repository navigation
feat(fdtd)!: default to static 2D previews with smooth boundaries - #508
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #508 +/- ##
=======================================
Coverage 91.61% 91.62%
=======================================
Files 204 204
Lines 28179 28260 +81
Branches 5324 5345 +21
=======================================
+ Hits 25816 25892 +76
- Misses 1354 1355 +1
- Partials 1009 1013 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d2568983a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Alisama20
left a comment
There was a problem hiding this comment.
The P1 inline comment on plot_2d is right. 0.9.0 announced a deprecation with two feature releases and about 12 months of retention. This PR flips the default in 0.10.0, and plot_2d(height=...) and plot_2d(zoom_to_cursor=...) now raise TypeError. AGENTS.md allows a shorter window only for a correctness or safety problem and none is stated. Please keep the alias until the window ends, or state the shorter window in the description and keep a warning path for the old keywords.
The grating notebook change is not preview-only. z_bounds goes from (-1, 1.55) to (-4, 1.55) and config.json gains a Si substrate group with shifted phys_groups, so the mesh and the cache key change and results probably do too. Please say so or split it out.
In 13 slices of the grating, a ring, a bend and a holed rectangle the new fill differs from the old only on material edges.
|
@Alisama20 Addressed both points:
All 92 focused visualization tests and applicable pre-commit checks pass. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96d1042dbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Alisama20
left a comment
There was a problem hiding this comment.
Approving. Legacy plot_2d(height=...) and plot_2d(zoom_to_cursor=...) return the viewer with one DeprecationWarning that names plot_2d_interactive() and the 0.12.0 removal target. Mixing them with static-only options raises a TypeError before meshing. The default call returns an Axes without a warning.
The warning, docstring, migration docs, AGENTS.md and tests state the same removal condition, so the :303 finding is resolved. The grating notebook is no longer in this PR.
tests/fdtd and tests/common pass. I rendered the static previews of the grating side view and an mmi top view and they look right.
Two optional notes: the docs date the first warning to 0.10.0 though 0.9.0 already warned on plot_2d(), and AGENTS.md now lowers the general window to about 3 months while other pages still say 12.
Merge mesh cells and consecutive equally colored physical groups before antialiasing to remove repeated edge shading below grating teeth. Preserve holes, material priority, group filters, legends and vector material boundaries in SVG/PDF exports.
Add
outline_only=Truetoplot_2d_static()andplot_2d()for material outlines over field plots, preserving existing field axes and colorbars without additional notebook geometry imports.Breaking default change targeted for 0.10.0:
plot_2d()returns a static MatplotlibAxes. Useplot_2d_interactive()for the previous HTML viewer, including.htmland.save(). Legacyheightandzoom_to_cursorcalls still return the HTML viewer with a migration warning. Their removal targets 0.12.0 or later, after two feature releases and at least three months since the first released warning in 0.10.0; it moves later if those conditions are not met.The owner approved shortening the plotting API transition to improve setup usability and customer-facing examples. AGENTS.md now specifies the normal retention window as two feature releases and roughly three months, with a documented usability exception. The 0.10.0 default change uses that exception rather than claiming the earlier retention promise has elapsed; the legacy keywords retain the updated minimum window.
Notebook and simulation changes, including the grating's silicon substrate and extended domain, are excluded and will follow separately.
Validated with 92 focused visualization tests, applicable pre-commit hooks including type checking, and an overlay on saved grating-coupler fields.