Skip to content
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

2.7 branch #1492

Merged
130 commits merged into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
0d2b506
2.7 branch
tylerflex Feb 23, 2024
b0ec77f
made changelog for 2.7
tylerflex Feb 23, 2024
b267be8
FIX: Latest submodules actions
daquinteroflex Feb 23, 2024
0b638c6
FIX: Does this sort out the submodule state?
daquinteroflex Feb 23, 2024
0c86ddc
Add uniaxial medium lithium niobate to material library
weiliangjin2021 Jan 29, 2024
3d2f8a7
more accurate adjoint run_time
tylerflex Feb 15, 2024
374daea
Support conformal mesh for PEC structures
weiliangjin2021 Oct 26, 2023
e9db741
Merge branch 'develop' into pre/2.7
weiliangjin2021 Feb 27, 2024
e5c1439
- added lumped ports in the component modeler and lumped resistors to…
shashwat-sh Oct 3, 2023
b59c8e7
modified voltage computation to avoid interpolation at conductor inte…
dmarek-flex Mar 5, 2024
05e33a3
Merge branch 'develop' into pre/2.7
momchil-flex Mar 11, 2024
5d1927c
Fix PolySlab intersections when bounds contain inf
weiliangjin2021 Mar 14, 2024
fd861ed
Add validator for geometry transformations (#1538)
lucas-flexcompute Mar 13, 2024
601cc41
2D heat simulations:
marc-flex Mar 12, 2024
821bfb7
fix bug in port snapping and correct bounds for current integral
dmarek-flex Mar 15, 2024
4645bca
unstructured custom medium
dbochkov-flexcompute Feb 23, 2024
251e07a
polishing unstructured custom medium
dbochkov-flexcompute Mar 18, 2024
5da91b9
fix logger assignment in web core
dbochkov-flexcompute Mar 27, 2024
79cb716
add unstructured datasets in docs
dbochkov-flexcompute Mar 27, 2024
e04b4cd
Bump trimesh version to >=4,<4.2
caseyflex Mar 18, 2024
6952466
Restrict number of time points for non-0D field time monitors
momchil-flex Mar 15, 2024
2797fe6
adding microwave plugin with path integrals for computing voltage/cur…
dmarek-flex Mar 8, 2024
cd7bb00
adjoint run_local disables restrictive validators
tylerflex Apr 1, 2024
16d6102
Merge branch 'develop' into pre/2.7
momchil-flex Apr 5, 2024
983c7f1
Fixing real_cost to only show the early shutoff message for FDTD runs
momchil-flex Apr 4, 2024
a419339
Added EME solver
caseyflex Jan 10, 2024
44d8239
add units to dl_min in mesher
tylerflex Apr 8, 2024
8ba10d4
update faq submodule
tylerflex Apr 10, 2024
f23abb5
backwards compatible imports for smatrix
tylerflex Apr 10, 2024
853520f
fix interpolation for unstructured data
dbochkov-flexcompute Apr 11, 2024
e91519a
mkdir in to_gds_file calls if they dont exist
tylerflex Apr 8, 2024
d6eddbc
handle all input_structures in JaxSimulation.epsilon
tylerflex Apr 11, 2024
a4aea79
JaxSimulation properties to check adjoint run_time
tylerflex Apr 12, 2024
a0fd07d
Minor improvements to EME
caseyflex Apr 12, 2024
84b33be
recursively update nested compoennts with updated_copy path kwarg
tylerflex Apr 10, 2024
951e353
Merge branch 'develop' into momchil/poetry_lock
momchil-flex Apr 12, 2024
cb85379
adjoint `JaxFieldData.flux` returns `float` for single frequency and …
tylerflex Apr 12, 2024
d2a6465
import scipy only when needed
dbochkov-flexcompute Apr 15, 2024
3164c9f
adding utility functions for estimating microstrip transmission line …
dmarek-flex Mar 8, 2024
96b8611
improved docstrings and moved to a namespace/module based approach fo…
dmarek-flex Apr 16, 2024
1e7568e
:package: BUILD: Update python to 3.12 and dependencies
tylerflex Apr 10, 2024
3c11643
warning and changelog for JaxPolySlab.vertices no longer tracing grad…
tylerflex Apr 18, 2024
93beb89
Merge branch 'develop' into pre/2.7
momchil-flex Apr 19, 2024
4a3bccd
proper error when computing poynting vector of adjoint field
tylerflex Apr 11, 2024
07b3c81
Changelog, schema, sample
momchil-flex Apr 22, 2024
96ffb1c
Note about new PEC conformal in changelog
momchil-flex Apr 22, 2024
be96816
fix missing doc references for smatrix
dmarek-flex Apr 22, 2024
0a180a4
Comments after docs revision
momchil-flex Apr 22, 2024
95919b8
Updating Anderson notebook and notebook tests
momchil-flex Apr 22, 2024
4180e20
Zero thickness for volumetric equivalence of 2D material
weiliangjin2021 Jan 23, 2024
fb95ac4
:package: BUILD: Fix automatic merge avoided on rc release
daquinteroflex Apr 24, 2024
844bcf8
:wrench: FIX: bumpmyversion pyproject.toml match
daquinteroflex Apr 23, 2024
0f92238
:package: BUILD: Update rich for flow360 full compatibility
daquinteroflex Apr 26, 2024
959e869
support gz in updater
tylerflex Apr 26, 2024
2a12b64
fixed an issue with plotting transformed objects with 0 thickness
dmarek-flex Apr 26, 2024
905f855
heat solver improvements
dbochkov-flexcompute Apr 26, 2024
44036bc
Changing MAX_STRING_LENGTH from float to int
momchil-flex Apr 30, 2024
d2f905a
:package: BUILD: Update actions for MacOS 14
daquinteroflex Apr 30, 2024
f260578
Fixing mode pml sign and better parameters
momchil-flex Mar 23, 2024
e25b55e
:package: BUILD: Fix bump-to-version matching
daquinteroflex Apr 30, 2024
126db25
Buming to 2.7.0rc2
momchil-flex Apr 30, 2024
ed0b3f0
refactored web containers (Job & Batch) for simplicity and added expl…
tylerflex Apr 22, 2024
7f5a82b
multi-threaded Batch.upload() and Batch.download()
tylerflex Apr 22, 2024
3b3bc3f
Warning if a nonuniform custom medium is intersecting certain sources…
weiliangjin2021 Apr 8, 2024
cbd2349
add metadata attrs
tylerflex Feb 23, 2024
9f7d7f0
fix: GDS export wrappers in `JaxSimulation` (#1334)
yaugenst-flex May 2, 2024
79f068d
Revert "fix: GDS export wrappers in `JaxSimulation` (#1334)"
tylerflex May 2, 2024
844b6ba
fix unused log_capture error in tests
tylerflex May 2, 2024
83dd364
fix: Handle case of gds_layer_dtype_map=None in to_gdstk and to_gdspy
yaugenst-flex May 2, 2024
1fe777b
feat: Handle all GDS export functions in `JaxSimulation`
yaugenst-flex May 2, 2024
a2f7e83
remove converter
alec-flexcompute May 2, 2024
05cd0e4
`Simulation.run_time` accepts `RunTimeSpec` to set run time automatic…
tylerflex Feb 23, 2024
f1e4832
Change default EME constraint to 'passive'
caseyflex May 1, 2024
19e9fd3
bugfix: add task_id to JaxSimulationData
tylerflex May 3, 2024
b1fef3f
feat: Support selection by nearest value in `JaxDataArray`
yaugenst May 3, 2024
0262c0d
More options in DispersionFitter and fit constant loss tangent model
weiliangjin2021 Apr 30, 2024
7671664
validate that the number of cells in a mode source is sufficient
dmarek-flex May 3, 2024
ec571fa
handle edge case when estimate_cost() returns None for some jobs in B…
tylerflex May 3, 2024
413d9a5
multiprocess -> joblib in adjoint
tylerflex May 2, 2024
d8561f1
test: Fix all lint warnings in tests
yaugenst-flex May 6, 2024
815590f
Introduces `invdes` plugin
tylerflex Mar 19, 2024
59c810f
Fix to mode pml warning when num_pml==0 on any side
momchil-flex May 8, 2024
484ca86
Fast Dispersion Fitter: keep poles slightly away from input freqs
caseyflex May 3, 2024
5c8825a
Relax smallest triangle area restriction in TriangleMesh
weiliangjin2021 May 3, 2024
2b18197
support for additional geometries with 2d materials
dmarek-flex Apr 25, 2024
169b1c0
fixed floating point comparison in test_custom using np.isclose
dmarek-flex May 8, 2024
6b30dba
Merge branch 'develop' into pre/2.7
momchil-flex May 9, 2024
0c6ce7f
Updating notebooks submodule
momchil-flex May 9, 2024
2f6f8c6
Show cost for EME, HEAT, and MODE. Remove URL from EME webapi.
caseyflex Apr 24, 2024
6316bad
Adding num_proc arg to adjoint run_local, and properly avoiding valid…
momchil-flex May 7, 2024
4ebc781
fix component modeler to and from file after web container refactor
tylerflex May 12, 2024
9aa3035
fix visualization of polarization vector for analytic sources
dbochkov-flexcompute May 9, 2024
09c4e93
fix xarray data access in SpatialDataArray reflection
dbochkov-flexcompute May 13, 2024
49b1a20
Only try/except jax import and set `jax_enable_x64`
yaugenst-flex May 14, 2024
6ad528b
Add JaxComplexPolySlab
yaugenst-flex May 14, 2024
ed9d778
schema, changelog, test_samples for 2.7.0rc2
tylerflex May 14, 2024
776341f
:package: BUILD: Sync tags to readthedocs repo
daquinteroflex May 14, 2024
2cee466
final notebook state 2.7.0rc2
tylerflex May 14, 2024
9dd89f6
docs: Add `JaxComplexPolySlab`
yaugenst-flex May 14, 2024
e9ed1df
added the scikit-rf package which is needed for some microwave plugin…
dmarek-flex May 15, 2024
939214b
:package: BUILD: Force sync tags from frontend to readthedocs repo
daquinteroflex May 17, 2024
fc47a01
Geometry edges over field plots and fix mode solver plot return (#1628)
lucas-flexcompute May 20, 2024
29b9659
Add support for layered cladding in waveguide plugin (#1628, #1599)
lucas-flexcompute May 21, 2024
a5d945a
Add tests, avoid breaking changes
lucas-flexcompute May 22, 2024
3996b01
fix notebook submodule?
tylerflex May 23, 2024
38b9f93
Fix tests in Windows (#1712)
lucas-flexcompute May 24, 2024
50f5e3e
Added multi-threaded mode solver via `mode.run_batch`
prashkh May 1, 2024
c528295
fix ruff tests since last check
tylerflex May 15, 2024
d1fc216
Validate Medium2D components to be either both PEC or non-PEC
weiliangjin2021 May 23, 2024
b3d2f82
improved test coverage of microstrip plugin and removed deprecated ty…
dmarek-flex May 23, 2024
b54df57
adding support for coaxial lumped ports and elements
dmarek-flex May 1, 2024
c061859
support automatic differentiation natively in tidy3d through autograd
tylerflex May 10, 2024
dceb0e0
Introduce SubpixelSpec to allow for selecting subpixel averaging meth…
weiliangjin2021 May 8, 2024
aefb080
fix adjoint if refractive index of 0
tylerflex May 30, 2024
d7e8a3b
100% test coverage for autograd web pipeline
tylerflex May 30, 2024
45d30a9
robust Batch.monitor
tylerflex May 30, 2024
a4675e3
Bumping version to 2.7.0
momchil-flex May 31, 2024
a5b14a1
Update url example in DispersionFitter.from_url
weiliangjin2021 May 31, 2024
c9f064e
Moving scipy into core deps
momchil-flex May 30, 2024
2cf9de0
Adding DataArray validators for CustomFieldSource and CustomMedium,
marc-flex May 7, 2024
fb44160
fix: Skip interpolation validator if tracing for autograd
yaugenst-flex Jun 3, 2024
053f61b
update docs/notebooks
tylerflex Jun 3, 2024
f2d5ceb
Fix edge case where autograd vjp test would fail on some machines
yaugenst-flex Jun 3, 2024
7998818
Validate sources and monitors that are exactly at the simulation doma…
momchil-flex Jun 3, 2024
16192f5
Various improvements to EME solver.
caseyflex Apr 10, 2024
869c224
Add more checks and add tests for missing functions in functions.py a…
yaugenst-flex Jun 5, 2024
89215f8
Merge pull request #1739 from flexcompute/yaugenst-flex/autograd-plug…
yaugenst-flex Jun 5, 2024
4533274
Add lossless Green2008 cSi and modify default SiO2 in material_library
weiliangjin2021 Jun 3, 2024
f051aca
relax stability condition in 2d
QimingFlex Jun 5, 2024
1828f7c
refc: Replace black with ruff format
yaugenst-flex May 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/autograd_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Autograd Bug Report
about: Create a report to help us improve our autograd feature
title: 'Autograd Bug'
labels: 'autograd'
assignees: 'tylerflex'

---

**Description**
Please paste the error message displayed in your warning when running `tidy3d.web.run()` or `tidy3d.web.run_async()`

**Simulation Setup**

Please describe your simulation setup as specifically as you can, including code snippets or uploading the `simulation.to_file('sim.json')` file.

Also please include what options were passed to the `web` function.

**Other information**
Anything else you'd like to add to help us look into it?
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
ref: ${{ github.ref }}
- name: Exit if any RC release
if: contains(${{ github.ref }}, 'rc') == false
if: contains(github.ref, 'rc') == false
uses: everlytic/branch-merge@1.1.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
with:
ref: "latest"
- name: Exit if any RC release
if: contains(${{ github.ref }}, 'rc') == false
if: contains(github.ref, 'rc') == false
uses: everlytic/branch-merge@1.1.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
38 changes: 28 additions & 10 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ on:
- 'pre/*'

jobs:

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
submodules: 'recursive'
- name: Test pre-commit hooks
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit run # this should be really more agressive

test-latest-submodules:
runs-on: ubuntu-latest
steps:
Expand All @@ -39,12 +41,19 @@ jobs:
id: get_branch
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "BRANCH_NAME=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
# Extract the base branch of the PR
BRANCH_NAME="${{ github.event.pull_request.base.ref }}"
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
else
echo "BRANCH_NAME=$(echo $GITHUB_REF | sed 's|refs/heads/||')" >> $GITHUB_ENV
# Assume it's a push event, extract the branch name from $GITHUB_REF
BRANCH_NAME=$(echo $GITHUB_REF | sed 's|refs/heads/||')
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
fi
echo $BRANCH_NAME
# Now echoing the BRANCH_NAME to verify
echo "BRANCH_NAME: $BRANCH_NAME"
shell: bash
env:
GITHUB_REF: ${{ github.ref }}

- name: Initialize and update submodule
run: |
Expand All @@ -59,17 +68,18 @@ jobs:
# Checking out Notebooks submodule with the same branch as the main project
echo "Checking $NOTEBOOKS_PATH for updates..."
cd $NOTEBOOKS_PATH
NOTEBOOKS_CURRENT_COMMIT=$(git rev-parse HEAD)
echo $(git fetch --all --verbose)
echo $(git remote get-url origin)
git checkout origin/$BRANCH_NAME
if git show-ref --verify refs/remotes/origin/$BRANCH_NAME; then
echo "Branch $BRANCH_NAME exists."
else
echo "::error::Branch $BRANCH_NAME does not exist on remote."
exit 1
fi
NOTEBOOKS_LATEST_COMMIT=$(git rev-parse refs/remotes/origin/${{ env.BRANCH_NAME }})
NOTEBOOKS_CURRENT_COMMIT=$(git rev-parse HEAD)
echo "NOTEBOOKS_LATEST_COMMIT: $NOTEBOOKS_LATEST_COMMIT"
echo "NOTEBOOKS_CURRENT_COMMIT: $NOTEBOOKS_CURRENT_COMMIT"


cd ../..
Expand All @@ -83,22 +93,27 @@ jobs:
# Checking FAQs only on the develop branch.
echo "Checking $FAQ_PATH for updates..."
cd $FAQ_PATH
FAQ_LATEST_COMMIT=$(git rev-parse origin/develop)
FAQ_CURRENT_COMMIT=$(git rev-parse HEAD)
echo $(git fetch --all --verbose)
echo $(git remote get-url origin)
FAQ_LATEST_COMMIT=$(git rev-parse refs/remotes/origin/develop)
echo "FAQ_LATEST_COMMIT: $FAQ_LATEST_COMMIT"
echo "FAQ_CURRENT_COMMIT: $FAQ_CURRENT_COMMIT"
cd ../..
if [ "$FAQ_LATEST_COMMIT" != "$FAQ_CURRENT_COMMIT" ]; then
echo "::error ::Submodule $FAQ_PATH is not up to date. Please update it."
exit 1
else
echo "Submodule $FAQ_PATH is up to date."
fi

build:
name: test ${{ matrix.python-version }} - ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
platform: [ubuntu-latest, windows-latest, macos-latest]
defaults:
run:
shell: bash
Expand All @@ -124,13 +139,16 @@ jobs:
- name: Install library
run: |
poetry --version
poetry run pip install --upgrade pip wheel setuptools
poetry run pip install gdstk --only-binary gdstk
poetry install -E dev

#----------------------------------------------
# add matrix specifics and run test suite
#----------------------------------------------
- name: Run tests
run: |
poetry run black . --check --diff
poetry run ruff format . --check --diff
poetry run ruff check tidy3d --fix --exit-non-zero-on-fix
poetry run pytest -rA tests
poetry run pytest -rA tests/_test_data/_test_datasets_no_vtk.py
58 changes: 43 additions & 15 deletions .github/workflows/sync-to-readthedocs-repo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: "sync-to-readthedocs-repo"
permissions:
contents: write

on:
workflow_dispatch:
push:
Expand All @@ -9,43 +8,72 @@ on:
- latest
- develop
- 'pre/*'
- 'v*'
- 'production/test/*'
tags:
- 'v*'
- 'demo/*'

jobs:
extract_branch:
extract_branch_or_tag:
outputs:
branch: ${{ steps.extractbranch.outputs.branch }}
ref_name: ${{ steps.extract.outputs.ref_name }}
runs-on: ubuntu-latest
steps:
- id: extractbranch
name: Extract branch name
- id: extract
name: Extract branch or tag name
shell: bash
run: |
echo "::set-output name=branch::${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
echo "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
echo "${{ steps.extractbranch.outputs.branch }}"
REF_NAME="${GITHUB_REF#refs/*/}"
echo "::set-output name=ref_name::$REF_NAME"
echo "Extracted ref: $REF_NAME"

build-and-deploy:
needs: extract_branch
permissions:
contents: write
needs: extract_branch_or_tag
runs-on: ubuntu-latest
steps:
- name: Checkout
# Conditional Checkout for Branch
- name: Checkout Branch
if: contains(github.ref, 'refs/heads/')
uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.GH_PAT }}
ref: ${{ needs.extract_branch_or_tag.outputs.ref_name }}

# Conditional Checkout for Tag
- name: Checkout Tag
if: contains(github.ref, 'refs/tags/')
uses: actions/checkout@v3
with:
submodules: true
- name: Create new branch if doesn't exist
token: ${{ secrets.GH_PAT }}
fetch-depth: 0
ref: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
fetch-tags: true

- name: Create new branch or tag
uses: GuillaumeFalourd/create-other-repo-branch-action@v1.5
if: contains(github.ref, 'refs/heads/')
with:
repository_owner: flexcompute-readthedocs
repository_name: tidy3d-docs
new_branch_name: ${{ needs.extract_branch.outputs.branch }}
new_branch_name: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
access_token: ${{ secrets.GH_PAT }}
new_branch_ref: default_clean_sync_branch
ignore_branch_exists: true

- name: Tag and push
if: contains(github.ref, 'refs/tags/')
run: |
git push --force --tags https://${{ secrets.GH_PAT }}@github.com/flexcompute-readthedocs/tidy3d-docs.git

- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .
token: ${{ secrets.GH_PAT }}
repository-name: flexcompute-readthedocs/tidy3d-docs
target-folder: .
branch: ${{ needs.extract_branch.outputs.branch }}
branch: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
force: true
2 changes: 1 addition & 1 deletion .github/workflows/update_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Run tests
run: |
source $VENV
black . --check --diff
ruff format . --check --diff
ruff check tidy3d --fix --exit-non-zero-on-fix
coverage run -m pytest -rA tests
coverage report -m
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ pip-log.txt
.dmypy.json
.mypy_cache/

# pickle files
*.pkl

# PyInstaller
*.manifest
*.spec
Expand Down Expand Up @@ -109,6 +112,7 @@ _autosummary

# Test and temporary files
tests/tmp/*
tests/data/invdes_history.*

# Translations
*.mo
Expand All @@ -129,3 +133,7 @@ htmlcov/

# Specific file and folder exclusions
.idea
.vscode

# cProfile output
*.prof
11 changes: 3 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
repos:
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
name: black <<< NOTE:, if you get a message stating that "All done! n file(s) reformatted", you must git add and commit the changes again to complete the commit. >>>

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.2"
rev: "v0.4.8"
hooks:
- id: ruff
args: [ --fix ]
args: [ --fix ]
- id: ruff-format
Loading
Loading