Skip to content

Commit 1cb8c34

Browse files
authored
Merge branch 'develop' into damiano/natural_convection_BC
2 parents 3744687 + 8d4c6a4 commit 1cb8c34

File tree

122 files changed

+11908
-1456
lines changed

Some content is hidden

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

122 files changed

+11908
-1456
lines changed

.github/workflows/tidy3d-docs-sync-readthedocs-repo.yml

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: "docs/tidy3d/sync-to-readthedocs-repo"
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
target_branch:
7+
description: 'Target mirror repo branch. Defaults to source branch/tag.'
8+
required: false
9+
type: string
510
push:
611
branches:
712
- main
@@ -24,7 +29,7 @@ jobs:
2429
shell: bash
2530
run: |
2631
REF_NAME="${GITHUB_REF#refs/*/}"
27-
echo "::set-output name=ref_name::$REF_NAME"
32+
echo "ref_name=$REF_NAME" >> $GITHUB_OUTPUT
2833
echo "Extracted ref: $REF_NAME"
2934
3035
build-and-deploy:
@@ -33,41 +38,30 @@ jobs:
3338
needs: extract_branch_or_tag
3439
runs-on: ubuntu-latest
3540
steps:
36-
# Conditional Checkout for Branch
37-
- name: Checkout Branch if branch-triggered-sync
38-
if: contains(github.ref, 'refs/heads/')
39-
uses: actions/checkout@v3
40-
with:
41-
submodules: true
42-
token: ${{ secrets.GH_PAT }}
43-
ref: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
44-
45-
- name: Push corresponding reference to mirror repo if a branch
46-
if: contains(github.ref, 'refs/heads/')
47-
run: |
48-
git fetch --unshallow origin ${{ needs.extract_branch_or_tag.outputs.ref_name }}
49-
git pull origin ${{ needs.extract_branch_or_tag.outputs.ref_name }}
50-
git remote add mirror https://github.com/flexcompute-readthedocs/tidy3d-docs.git
51-
git push mirror ${{ needs.extract_branch_or_tag.outputs.ref_name }} --force # overwrites always
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
54-
55-
# Conditional Checkout for Tag
56-
- name: Checkout Tag if tag-triggered-sync
57-
if: contains(github.ref, 'refs/tags/')
58-
uses: actions/checkout@v3
41+
- name: full-checkout
42+
uses: actions/checkout@v4
5943
with:
6044
submodules: true
6145
token: ${{ secrets.GH_PAT }}
6246
fetch-depth: 0
6347
ref: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
6448
fetch-tags: true
6549

66-
67-
- name: Push corresponding reference to mirror repo if a tag
68-
if: contains(github.ref, 'refs/tags/')
69-
run: |
70-
git remote add mirror https://github.com/flexcompute-readthedocs/tidy3d-docs.git
71-
git push mirror ${{ needs.extract_branch_or_tag.outputs.ref_name }} --force # overwrites always
50+
- name: push-mirror-repo
7251
env:
7352
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
53+
SOURCE_REF: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
54+
TARGET_BRANCH_INPUT: ${{ github.event.inputs.target_branch }}
55+
run: |
56+
echo "Source reference: $SOURCE_REF"
57+
git pull origin "$SOURCE_REF"
58+
git remote add mirror https://github.com/flexcompute-readthedocs/tidy3d-docs.git
59+
60+
if [[ -n "$TARGET_BRANCH_INPUT" && "${{ github.event_name }}" == "workflow_dispatch" ]]; then
61+
echo "Manual trigger detected. Pushing contents of '$SOURCE_REF' to remote branch '$TARGET_BRANCH_INPUT'."
62+
git push mirror "$SOURCE_REF:refs/heads/$TARGET_BRANCH_INPUT" --force
63+
else
64+
echo "Automatic trigger or manual run without target. Pushing '$SOURCE_REF' to the same ref on the mirror."
65+
# This preserves the original behavior: pushes a branch to a branch, or a tag to a tag.
66+
git push mirror "$SOURCE_REF" --force
67+
fi

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,7 @@ jobs:
247247
needs: determine-test-scope
248248
if: needs.determine-test-scope.outputs.local_tests == 'true'
249249
name: python-${{ matrix.python-version }}-self-hosted-runner
250-
runs-on: [ slurm-runner, 4xcpu ]
251-
container:
252-
image: ghcr.io/astral-sh/uv:debian
253-
options: --user 31001:61001 # Required slurm-batch UID: slurm GID for tmp/ file removal
250+
runs-on: [ slurm-runner, 4xcpu, container=ghcr.io/astral-sh/uv:debian ]
254251
concurrency:
255252
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name }}-${{ matrix.python-version }}-local
256253
cancel-in-progress: true

CHANGELOG.md

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

dev.Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM ghcr.io/astral-sh/uv:0.8-debian AS tidy3d-python-client-dev
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
RUN apt-get update && \
6+
apt-get install -y --no-install-recommends \
7+
curl \
8+
git \
9+
pandoc \
10+
xsel \
11+
xclip
12+
13+
ENV POETRY_HOME=/opt/poetry
14+
RUN curl -sSL https://install.python-poetry.org | python3 -
15+
ENV PATH="/root/.local/bin:${POETRY_HOME}/bin:${PATH}"
16+
17+
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" TZ="America/New_York" apt-get install -y curl \
18+
&& curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz \
19+
&& tar -C /opt -xzf nvim-linux-x86_64.tar.gz \
20+
&& rm nvim-linux-x86_64.tar.gz
21+
ENV PATH="/opt/nvim-linux-x86_64/bin:$PATH"
22+
23+
RUN addgroup --gid 1000 flexdaemon && \
24+
adduser --uid 1000 --gid 1000 \
25+
--home /home/flexdaemon \
26+
--shell /bin/bash \
27+
--disabled-password \
28+
flexdaemon \
29+
&& if getent group video >/dev/null 2>&1; then usermod -aG video flexdaemon; fi \
30+
&& if getent group render >/dev/null 2>&1; then usermod -aG render flexdaemon; fi \
31+
&& mkdir -p /home/flexdaemon \
32+
&& chown -R flexdaemon:flexdaemon /home/flexdaemon \
33+
&& chmod a+rX /home \
34+
&& chmod a+rwX /home/flexdaemon
35+
36+
USER flexdaemon
37+
WORKDIR /home/flexdaemon
38+
CMD ["sleep", "infinity"]

docs/api/boundary_conditions.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Types of Absorbers
3939
tidy3d.PML
4040
tidy3d.StablePML
4141
tidy3d.Absorber
42+
tidy3d.ABCBoundary
43+
tidy3d.ModeABCBoundary
4244

4345
Absorber Parameters
4446
^^^^^^^^^^^^^^^^^^^
@@ -48,4 +50,14 @@ Absorber Parameters
4850
:template: module.rst
4951

5052
tidy3d.AbsorberParams
51-
tidy3d.PMLParams
53+
tidy3d.PMLParams
54+
55+
56+
Internal Absorbers
57+
------------------
58+
59+
.. autosummary::
60+
:toctree: _autosummary/
61+
:template: module.rst
62+
63+
tidy3d.InternalAbsorber

docs/api/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ API |:computer:|
2323
output_data
2424
scene
2525
logging
26+
utilities
2627
submit_simulations
2728
mesh/index
2829
heat/index
@@ -37,6 +38,7 @@ API |:computer:|
3738
viz
3839

3940
.. include:: /api/simulation.rst
41+
.. include:: /api/utilities.rst
4042
.. include:: /api/boundary_conditions.rst
4143
.. include:: /api/geometry.rst
4244
.. include:: /api/mediums.rst
@@ -62,4 +64,4 @@ API |:computer:|
6264
.. include:: /api/constants.rst
6365
.. include:: /api/abstract_base.rst
6466
.. include:: /api/abstract_models.rst
65-
.. include:: /api/viz.rst
67+
.. include:: /api/viz.rst

docs/api/plugins/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Plugins
1515
./design
1616
./waveguide
1717
./microwave
18+
./klayout
1819

1920

2021
.. include:: /api/plugins/mode_solver.rst
@@ -27,4 +28,5 @@ Plugins
2728
.. include:: /api/plugins/invdes.rst
2829
.. include:: /api/plugins/design.rst
2930
.. include:: /api/plugins/waveguide.rst
30-
.. include:: /api/plugins/microwave.rst
31+
.. include:: /api/plugins/microwave.rst
32+
.. include:: /api/plugins/klayout.rst

docs/api/plugins/klayout.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.. currentmodule:: tidy3d
2+
3+
KLayout Integration
4+
-------------------
5+
6+
.. toctree::
7+
8+
./../../../tidy3d/plugins/klayout/README.md
9+
10+
DRC
11+
~~~
12+
13+
.. toctree::
14+
15+
./../../../tidy3d/plugins/klayout/drc/README.md
16+
17+
DRC Configuration
18+
^^^^^^^^^^^^^^^^^
19+
20+
.. autosummary::
21+
:toctree: ../_autosummary/
22+
:template: module.rst
23+
24+
tidy3d.plugins.klayout.DRCConfig
25+
26+
DRC Runner
27+
^^^^^^^^^^
28+
29+
.. autosummary::
30+
:toctree: ../_autosummary/
31+
:template: module.rst
32+
33+
tidy3d.plugins.klayout.DRCRunner
34+
tidy3d.plugins.klayout.run_drc_on_gds
35+
36+
DRC Results
37+
^^^^^^^^^^^
38+
39+
.. autosummary::
40+
:toctree: ../_autosummary/
41+
:template: module.rst
42+
43+
tidy3d.plugins.klayout.DRCResults
44+
tidy3d.plugins.klayout.drc.DRCViolation
45+
46+
DRC Markers
47+
^^^^^^^^^^^
48+
49+
.. autosummary::
50+
:toctree: ../_autosummary/
51+
:template: module.rst
52+
53+
tidy3d.plugins.klayout.drc.EdgeMarker
54+
tidy3d.plugins.klayout.drc.EdgePairMarker
55+
tidy3d.plugins.klayout.drc.MultiPolygonMarker
56+
57+
Utilities
58+
~~~~~~~~~
59+
60+
.. autosummary::
61+
:toctree: ../_autosummary/
62+
:template: module.rst
63+
64+
tidy3d.plugins.klayout.check_installation

docs/api/simulation.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ Simulation
88
:template: module.rst
99

1010
tidy3d.Simulation
11-
tidy3d.RunTimeSpec

docs/api/sources.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,13 @@ Angled Plane Wave Specifications
4444

4545
tidy3d.FixedInPlaneK
4646
tidy3d.FixedAngle
47+
48+
49+
Source Frames
50+
-------------
51+
52+
.. autosummary::
53+
:toctree: _autosummary/
54+
:template: module.rst
55+
56+
tidy3d.PECFrame

0 commit comments

Comments
 (0)