Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 35 additions & 11 deletions .github/workflows/tidy3d-python-client-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,37 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const {owner, repo} = context.repo
const number = context.payload.pull_request.number
const reviews = await github.rest.pulls.listReviews({owner, repo, pull_number: number})

const latestByUser = {}
reviews.data.forEach(r => latestByUser[r.user.id] = r)

const approved = Object.values(latestByUser)
.some(r => r.state === 'APPROVED')
core.setOutput('approved', approved ? 'true' : 'false')
const {owner, repo} = context.repo;
const number = context.payload.pull_request.number;

// Fetch all reviews across all pages
const allReviews = await github.paginate(github.rest.pulls.listReviews, {
owner,
repo,
pull_number: number,
per_page: 100,
});

core.info(`Found ${allReviews.length} total review events.`);

// Process the array to get only the latest review per user
const latestByUser = {};
allReviews.forEach(review => {
if (review.state !== 'COMMENTED') {
latestByUser[review.user.id] = review;
}
});

const latestStates = Object.values(latestByUser).map(review => review.state);
core.info(`Final review states from unique reviewers: [${latestStates.join(', ')}]`);

// The rest of the logic remains the same
const isBlocked = latestStates.includes('CHANGES_REQUESTED');
const isApproved = latestStates.includes('APPROVED');
const finalStatus = isApproved && !isBlocked;

core.info(`🏁 Final determined approval status is: ${finalStatus}`);
core.setOutput('approved', finalStatus ? 'true' : 'false');
- name: determine-test-type
id: determine-test-type
env:
Expand Down Expand Up @@ -381,7 +402,7 @@ jobs:
uses: snok/install-poetry@v1
with:
version: 2.1.1
virtualenvs-create: true
virtualenvs-create: false
virtualenvs-in-project: true

- name: set-python-${{ matrix.python-version }}
Expand All @@ -391,6 +412,9 @@ jobs:

- name: install-project
run: |
which python
python -m venv .venv/
python --version
poetry --version
poetry env use python
poetry env info
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 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.
- 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.
- `Scene.plot_3d()` method to make 3D rendering of scene.
- Added native web and batch support to run `ModalComponentModeler` and `TerminalComponentModeler` workflows.
- Added `SimulationMap` and `SimulationDataMap` immutable dictionary-like containers for managing collections of simulations and results.
- Added `TerminalComponentModelerData`, `ComponentModelerData`, `MicrowaveSMatrixData`, and introduced multiple DataArrays for modeler workflow data structures.

### Changed
- Validate mode solver object for large number of grid points on the modal plane.
- Adaptive minimum spacing for `PolySlab` integration is now wavelength relative and a minimum discretization is set for computing gradients for cylinders.
- 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.
- 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.

### Fixed
- Fixed missing amplitude factor and handling of negative normal direction case when making adjoint sources from `DiffractionMonitor`.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/plugins/smatrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Scattering Matrix Calculator
:toctree: ../_autosummary/
:template: module.rst

tidy3d.plugins.smatrix.ComponentModeler
tidy3d.plugins.smatrix.ModalComponentModeler
tidy3d.plugins.smatrix.Port
tidy3d.plugins.smatrix.ModalPortDataArray

Expand Down
Loading