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

Merge develop into 2.8 #1905

Merged
merged 79 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
3ab33eb
autograd geometry group
tylerflex Jun 17, 2024
9db42c4
Update notebooks submodule
lucas-flexcompute Jun 20, 2024
b860a4f
Fix for #1778 (#1779)
lucas-flexcompute Jun 20, 2024
ed943f1
fix finite precision bug when placing current path integral for coaxi…
dmarek-flex Jun 20, 2024
bb07574
update notebook submodule
dmarek-flex Jun 21, 2024
25a0ad3
Removed no sources in simulation log info.
e-g-melo Jun 22, 2024
a69d2c4
fixed bug when coaxial ports are snapped to grid cell boundaries. add…
dmarek-flex Jun 24, 2024
515495d
fix polyslab autograd when sidewall_angle or dilation
tylerflex Jun 29, 2024
92dc295
Support older version of xarray in EME smatrix_in_basis
caseyflex Jul 3, 2024
a28bc3a
update submodule
tylerflex Jul 4, 2024
abbbb1a
add runtimespec to API ref
tylerflex Jul 4, 2024
27150a7
autograd support for dispersive mediums
tylerflex Jun 13, 2024
a85eb02
notebook submodule
tylerflex Jul 4, 2024
0b875ae
fix box gradients < 3d
tylerflex Jul 4, 2024
d961248
Added: mode plane plotting functions (#1397).
e-g-melo Jul 1, 2024
fefb97d
feat: Differentiable interp for DataArray
yaugenst-flex Jul 6, 2024
0fb0f8f
Updating point dipole power docstring and faq
momchil-flex Jul 5, 2024
ff9e686
Updating notebooks
momchil-flex Jul 9, 2024
120ef72
:wrench: Improve sync action between frontend and docs repos
daquinteroflex Jul 7, 2024
f4b87ca
Lazily load `scipy.io` in `SimulationData.to_mat_file()` to speed up …
yaugenst-flex Jul 8, 2024
53193a8
dummy version updater for base simulation
dbochkov-flexcompute Jul 9, 2024
e4df688
fix changelog for 2.7.1
tylerflex Jul 10, 2024
6230efa
Version, changelog, pre-release script for 2.7.1
momchil-flex Jul 10, 2024
d216b54
Updating notebooks
momchil-flex Jul 10, 2024
9ec151d
Updating notebooks
momchil-flex Jul 11, 2024
2b046dc
Making _esp_bounds and _get_structure_eps_plot_params static methods
momchil-flex Jul 11, 2024
8988637
Speeding up num_mediums test
momchil-flex Jul 11, 2024
3589d91
fix batch
tylerflex Jul 10, 2024
3bdb953
Fixing DataArray.tracers for zero-sized data
momchil-flex Jul 11, 2024
6845aa4
:test_tube: Move the import benchmark to scripts
daquinteroflex Jul 12, 2024
8d31f3e
fix: remove `autograd.py`
yaugenst-flex Jul 15, 2024
d8ba58e
Fixed plot_pml to mode plane symmetry.
e-g-melo Jul 14, 2024
953bc80
Added support for EMESimulation in ModeSolver plugin
caseyflex Jul 5, 2024
3cbc6ac
Frontend fix for field projection in 2D simulations
QimingFlex Jul 8, 2024
e9317bf
:wrench: Fix the develop cli action
daquinteroflex Jul 16, 2024
fde0d20
Improved mesh repair options in TriangleMesh
caseyflex Jul 9, 2024
9e2eaa6
refc: replace `assert` statements
yaugenst-flex Jul 15, 2024
285bb5c
Updating notebooks
momchil-flex Jul 23, 2024
029e122
Add progress bar for EME
caseyflex Jun 6, 2024
42c1902
Small fix to changelog
momchil-flex Jul 23, 2024
85bc872
simulation.subsection to include PML
weiliangjin2021 Jul 15, 2024
092b209
Update to [email protected]
yaugenst-flex Jul 29, 2024
b5a9cd1
Updating notebooks
momchil-flex Jul 30, 2024
f1b1a3a
Fix bug when running the same mode solver both locally and remote
momchil-flex Jul 31, 2024
6f598fd
reorganize autograd web API into local and remote pathways
tylerflex Jun 12, 2024
65f61bd
Refactoring things for proper server-side support
momchil-flex Jul 16, 2024
c025b7f
removing emulated runs from test_invdes; using imported from test_aut…
momchil-flex Jul 26, 2024
955f72b
Only passing sim_fields.keys() and not the full sim_fields
momchil-flex Jul 29, 2024
fa7be81
Fixing monkeypatching in some tests
tylerflex Jul 29, 2024
d4621f0
Writing sim_fields_keys to file and fixing last tests
momchil-flex Jul 30, 2024
514a6cf
broadband adjoint support for autograd
tylerflex Jun 17, 2024
29dea7d
submodule
tylerflex Aug 1, 2024
2e2c27a
fix serverside autograd with broadband adjoint sources
tylerflex Jul 31, 2024
46bd3ef
Courtesy notebook submodule bump
tylerflex Aug 1, 2024
b9e101c
update notebooks
tylerflex Aug 2, 2024
8bd6b65
fix async local gradient task_ids
tylerflex Aug 2, 2024
f1c45d5
:books: Fix image rendering
daquinteroflex Jul 25, 2024
f1612ce
:hammer: Update the submoudle checks as discussed
daquinteroflex Jul 31, 2024
8ea39ee
:robot: More straightforward submodule checks as discussed
daquinteroflex Aug 1, 2024
860c1d1
:wrench: Propagate pre/2.8 sync fix to develop
daquinteroflex Aug 5, 2024
f1b299e
add units to IndexPerturbation.frequency
tylerflex Jul 31, 2024
310f49b
Add subsection for EMESimulation
caseyflex Jul 30, 2024
cf4dfe7
Move some EME validators to pre_upload
caseyflex Jul 31, 2024
3de1e67
Added a validator to enable FieldProjectionCartesianMonitor for 2D si…
QimingFlex Jul 22, 2024
430e223
fix jobs cached in adjoint batch
tylerflex Aug 6, 2024
371882a
Alloing monitors and sources as a mode plane type
momchil-flex Aug 6, 2024
ea8ccf6
Restricting allowed ModeSolver.plane types
momchil-flex Aug 6, 2024
003b37a
return modes info table even if fields not available
dbochkov-flexcompute Aug 6, 2024
b151969
feat: flux and poynting properties for FieldProjectionCartesianData
yaugenst-flex Aug 1, 2024
932b29c
Version, submodules, schema, changelog for 2.7.2
momchil-flex Aug 7, 2024
562e551
:wrench: Remove latest notebook submodule checks
daquinteroflex Aug 7, 2024
0ff800e
feat: `value_and_grad` with support for auxiliary data
yaugenst-flex Aug 7, 2024
61966a9
clarifying the documentation for ApodizationSpec
FilipeFcp Aug 6, 2024
6f63716
removed a redundant change log for 2d projection
QimingFlex Aug 9, 2024
20e838a
:package: Remove flax from bug-pip-install on base dependencies
daquinteroflex Aug 9, 2024
61d1c53
:wrench: Fix tag sync alongside branch sync
daquinteroflex Aug 8, 2024
eaf9bc6
fix: make sure coordinates retain correct ordering after autograd interp
yaugenst-flex Aug 13, 2024
526f04f
Fix CustomSourceTime with times completely outside envelope definitio…
caseyflex Aug 13, 2024
d3cc9ac
Merge branch 'develop' into pre/2.8
momchil-flex Aug 16, 2024
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
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,68 @@ on:
- 'v*.*.*'

jobs:
test-latest-submodules:
runs-on: ubuntu-latest
steps:
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
# This fetches only a single branch by default, so additional fetch is needed
fetch-depth: 0 # Optionally, set to 0 to fetch all history for all branches and tags

- name: Initialize and update submodule
run: |
git submodule update --init --recursive

- name: Check if submodules are up to date
shell: bash
run: |
NOTEBOOKS_PATH=docs/notebooks
FAQ_PATH=docs/faq

# Checking out Notebooks submodule with the same branch as the main project/develop
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)
if git show-ref --verify refs/remotes/origin/develop; then
echo "Branch develop exists."
else
echo "::error::Branch develop does not exist on remote."
exit 1
fi
NOTEBOOKS_LATEST_COMMIT=$(git rev-parse refs/remotes/origin/develop)
echo "NOTEBOOKS_LATEST_COMMIT: $NOTEBOOKS_LATEST_COMMIT"
echo "NOTEBOOKS_CURRENT_COMMIT: $NOTEBOOKS_CURRENT_COMMIT"


cd ../..
if [ "$NOTEBOOKS_LATEST_COMMIT" != "$NOTEBOOKS_CURRENT_COMMIT" ]; then
echo "::error ::Submodule $NOTEBOOKS_PATH is not up to date with the develop branch. Please update it."
exit 1
else
echo "Submodule $NOTEBOOKS_PATH is up to date with the develop branch."
fi

# Checking FAQs only on the develop branch.
echo "Checking $FAQ_PATH for updates..."
cd $FAQ_PATH
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

github-release:
runs-on: ubuntu-latest
steps:
Expand Down
80 changes: 0 additions & 80 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,86 +27,6 @@ jobs:
pip install pre-commit
pre-commit run # this should be really more agressive

test-latest-submodules:
runs-on: ubuntu-latest
steps:
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
# This fetches only a single branch by default, so additional fetch is needed
fetch-depth: 0 # Optionally, set to 0 to fetch all history for all branches and tags

- name: Determine current branch or PR ref
id: get_branch
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# Extract the base branch of the PR
BRANCH_NAME="${{ github.event.pull_request.base.ref }}"
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
else
# 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
# 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: |
git submodule update --init --recursive

- name: Check if submodules are up to date
shell: bash
run: |
NOTEBOOKS_PATH=docs/notebooks
FAQ_PATH=docs/faq

# 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)
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 }})
echo "NOTEBOOKS_LATEST_COMMIT: $NOTEBOOKS_LATEST_COMMIT"
echo "NOTEBOOKS_CURRENT_COMMIT: $NOTEBOOKS_CURRENT_COMMIT"


cd ../..
if [ "$NOTEBOOKS_LATEST_COMMIT" != "$NOTEBOOKS_CURRENT_COMMIT" ]; then
echo "::error ::Submodule $NOTEBOOKS_PATH is not up to date with the ${{ env.BRANCH_NAME }} branch. Please update it."
exit 1
else
echo "Submodule $NOTEBOOKS_PATH is up to date with the ${{ env.BRANCH_NAME }} branch."
fi

# Checking FAQs only on the develop branch.
echo "Checking $FAQ_PATH for updates..."
cd $FAQ_PATH
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: Python ${{ matrix.python-version }} - ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/sync-to-readthedocs-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ jobs:
token: ${{ secrets.GH_PAT }}
ref: ${{ needs.extract_branch_or_tag.outputs.ref_name }}

- name: Push corresponding reference to mirror repo if a branch
if: contains(github.ref, 'refs/heads/')
run: |
git fetch --unshallow origin ${{ needs.extract_branch_or_tag.outputs.ref_name }}
git pull origin ${{ needs.extract_branch_or_tag.outputs.ref_name }}
git remote add mirror https://github.com/flexcompute-readthedocs/tidy3d-docs.git
git push mirror ${{ needs.extract_branch_or_tag.outputs.ref_name }} --force # overwrites always
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Conditional Checkout for Tag
- name: Checkout Tag if tag-triggered-sync
if: contains(github.ref, 'refs/tags/')
Expand All @@ -53,11 +63,11 @@ jobs:
ref: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
fetch-tags: true

- name: Push corresponding reference to mirror repo

- name: Push corresponding reference to mirror repo if a tag
if: contains(github.ref, 'refs/tags/')
run: |
git fetch --unshallow origin ${{ needs.extract_branch_or_tag.outputs.ref_name }}
git pull origin ${{ needs.extract_branch_or_tag.outputs.ref_name }}
git remote add mirror https://github.com/flexcompute-readthedocs/tidy3d-docs.git
git push mirror ${{ needs.extract_branch_or_tag.outputs.ref_name }} --force # overwrites always
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107 changes: 107 additions & 0 deletions .github/workflows/test_daily_latest_submodule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: "tidy3d-submodule-daily-tests"

on:
workflow_dispatch:
schedule:
- cron: '0 9 * * *' # Runs at 9am UK-time every day


jobs:
test-latest-submodules:
runs-on: ubuntu-latest
steps:
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
# This fetches only a single branch by default, so additional fetch is needed
fetch-depth: 0 # Optionally, set to 0 to fetch all history for all branches and tags

- name: Initialize and update submodule
run: |
git submodule update --init --recursive

- name: Determine the latest pre/2.* branch
id: get_latest_pre_branch
run: |
# Fetch all branches
git fetch --all --quiet

# List all remote branches for debugging purposes
echo "Available branches:"
git branch -r

# List branches matching the pre/2.* pattern
BRANCHES=$(git branch -r | grep 'origin/pre/2\.' | sed 's|origin/||' | sort -V)

# Debugging: Print out the matched branches
echo "Matched branches with pre/2.* pattern:"
echo "$BRANCHES"

# Identify the latest branch
LATEST_BRANCH=$(echo "$BRANCHES" | tail -n 1)

# Set the latest branch as an environment variable
echo "LATEST_BRANCH=$LATEST_BRANCH" >> $GITHUB_ENV
echo "Latest pre/2.* branch is: $LATEST_BRANCH"

- name: Check submodules for multiple branches
shell: bash
run: |
BRANCHES=("develop" $LATEST_BRANCH) # Add your branches here

for BRANCH in "${BRANCHES[@]}"; do
echo "Analyzing branch: $BRANCH"

# Fetch all branches and tags
git fetch --all --verbose

# Checkout the branch
git checkout $BRANCH

NOTEBOOKS_PATH=docs/notebooks
FAQ_PATH=docs/faq

# Checking Notebooks submodule
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)
if git show-ref --verify refs/remotes/origin/$BRANCH; then
echo "Branch $BRANCH exists."
else
echo "::error::Branch $BRANCH does not exist on remote."
exit 1
fi
NOTEBOOKS_LATEST_COMMIT=$(git rev-parse refs/remotes/origin/${BRANCH})
echo "NOTEBOOKS_LATEST_COMMIT: $NOTEBOOKS_LATEST_COMMIT"
echo "NOTEBOOKS_CURRENT_COMMIT: $NOTEBOOKS_CURRENT_COMMIT"

cd ../..
if [ "$NOTEBOOKS_LATEST_COMMIT" != "$NOTEBOOKS_CURRENT_COMMIT" ]; then
echo "::error::Submodule $NOTEBOOKS_PATH is not up to date with the $BRANCH branch. Please update it."
exit 1
else
echo "Submodule $NOTEBOOKS_PATH is up to date with the $BRANCH branch."
fi

# Checking FAQs only on the develop branch
if [[ "$BRANCH" == "develop" ]]; then
echo "Checking $FAQ_PATH for updates..."
cd $FAQ_PATH
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
fi
done
72 changes: 72 additions & 0 deletions .github/workflows/test_pr_latest_submodule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: "tidy3d-submodule-PR-tests"

on:
workflow_dispatch:
push:
branches: [ latest ]
pull_request:
branches:
- latest

jobs:
test-latest-submodules:
runs-on: ubuntu-latest
steps:
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
# This fetches only a single branch by default, so additional fetch is needed
fetch-depth: 0 # Optionally, set to 0 to fetch all history for all branches and tags

- name: Initialize and update submodule
run: |
git submodule update --init --recursive

- name: Check if submodules are up to date
shell: bash
run: |
NOTEBOOKS_PATH=docs/notebooks
FAQ_PATH=docs/faq

# 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)
if git show-ref --verify refs/remotes/origin/develop; then
echo "Branch develop exists."
else
echo "::error::Branch develop does not exist on remote."
exit 1
fi
NOTEBOOKS_LATEST_COMMIT=$(git rev-parse refs/remotes/origin/develop)
echo "NOTEBOOKS_LATEST_COMMIT: $NOTEBOOKS_LATEST_COMMIT"
echo "NOTEBOOKS_CURRENT_COMMIT: $NOTEBOOKS_CURRENT_COMMIT"


cd ../..
if [ "$NOTEBOOKS_LATEST_COMMIT" != "$NOTEBOOKS_CURRENT_COMMIT" ]; then
echo "::error ::Submodule $NOTEBOOKS_PATH is not up to date with the develop branch. Please update it."
exit 1
else
echo "Submodule $NOTEBOOKS_PATH is up to date with the develop branch."
fi

# Checking FAQs only on the develop branch.
echo "Checking $FAQ_PATH for updates..."
cd $FAQ_PATH
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.8"
rev: "v0.5.5"
hooks:
- id: ruff
args: [ --fix ]
Expand Down
Loading
Loading