Skip to content

Commit 2e56ace

Browse files
daquinteroflexyaugenst-flexdmarek-flex
committed
feat: RF refactor, GUI-python interoperability
Co-authored-by: yaugenst-flex <yannick@flexcompute.com> Co-authored-by: dmarek-flex <damian@flexcompute.com>
1 parent 4abf725 commit 2e56ace

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+4519
-8144
lines changed

.github/workflows/tidy3d-python-client-tests.yml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,37 @@ jobs:
4343
uses: actions/github-script@v7
4444
with:
4545
script: |
46-
const {owner, repo} = context.repo
47-
const number = context.payload.pull_request.number
48-
const reviews = await github.rest.pulls.listReviews({owner, repo, pull_number: number})
49-
50-
const latestByUser = {}
51-
reviews.data.forEach(r => latestByUser[r.user.id] = r)
52-
53-
const approved = Object.values(latestByUser)
54-
.some(r => r.state === 'APPROVED')
55-
core.setOutput('approved', approved ? 'true' : 'false')
46+
const {owner, repo} = context.repo;
47+
const number = context.payload.pull_request.number;
48+
49+
// Fetch all reviews across all pages
50+
const allReviews = await github.paginate(github.rest.pulls.listReviews, {
51+
owner,
52+
repo,
53+
pull_number: number,
54+
per_page: 100,
55+
});
56+
57+
core.info(`Found ${allReviews.length} total review events.`);
58+
59+
// Process the array to get only the latest review per user
60+
const latestByUser = {};
61+
allReviews.forEach(review => {
62+
if (review.state !== 'COMMENTED') {
63+
latestByUser[review.user.id] = review;
64+
}
65+
});
66+
67+
const latestStates = Object.values(latestByUser).map(review => review.state);
68+
core.info(`Final review states from unique reviewers: [${latestStates.join(', ')}]`);
69+
70+
// The rest of the logic remains the same
71+
const isBlocked = latestStates.includes('CHANGES_REQUESTED');
72+
const isApproved = latestStates.includes('APPROVED');
73+
const finalStatus = isApproved && !isBlocked;
74+
75+
core.info(`🏁 Final determined approval status is: ${finalStatus}`);
76+
core.setOutput('approved', finalStatus ? 'true' : 'false');
5677
- name: determine-test-type
5778
id: determine-test-type
5879
env:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Added `VerticalNaturalConvectionCoeffModel`, a model for heat transfer due to natural convection from a vertical plate. It can be used in `ConvectionBC` to compute the heat transfer coefficient from fluid properties, using standard Nusselt number correlations for both laminar and turbulent flow.
2424
- Added `BroadbandModeABCSpec` class for setting broadband absorbing boundary conditions that can absorb waveguide modes over a specified frequency range using a pole-residue pair model.
2525
- `Scene.plot_3d()` method to make 3D rendering of scene.
26+
- Added native web and batch support to run `ModalComponentModeler` and `TerminalComponentModeler` workflows.
27+
- Added `SimulationMap` and `SimulationDataMap` immutable dictionary-like containers for managing collections of simulations and results.
28+
- Added `TerminalComponentModelerData`, `ComponentModelerData`, `MicrowaveSMatrixData`, and introduced multiple DataArrays for modeler workflow data structures.
2629

2730
### Changed
2831
- Validate mode solver object for large number of grid points on the modal plane.
2932
- Adaptive minimum spacing for `PolySlab` integration is now wavelength relative and a minimum discretization is set for computing gradients for cylinders.
3033
- The `TerminalComponentModeler` defaults to the pseudo wave definition of scattering parameters. The new field `s_param_def` can be used to switch between either pseudo or power wave definitions.
34+
- Restructured the smatrix plugin with backwards-incompatible changes for a more robust architecture. Notably, `ComponentModeler` has been renamed to `ModalComponentModeler` and internal web API methods have been removed. Please see our migration guide for details on updating your workflows.
3135

3236
### Fixed
3337
- Fixed missing amplitude factor and handling of negative normal direction case when making adjoint sources from `DiffractionMonitor`.

docs/api/plugins/smatrix.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Scattering Matrix Calculator
77
:toctree: ../_autosummary/
88
:template: module.rst
99

10-
tidy3d.plugins.smatrix.ComponentModeler
10+
tidy3d.plugins.smatrix.ModalComponentModeler
1111
tidy3d.plugins.smatrix.Port
1212
tidy3d.plugins.smatrix.ModalPortDataArray
1313

schemas/EMESimulation.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

schemas/HeatChargeSimulation.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

schemas/HeatSimulation.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

schemas/ModeSimulation.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

schemas/Simulation.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)