-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEAT: The big documentation upgrade version 1 did not escape big rebase
🚀
- Loading branch information
1 parent
95b7d78
commit eed7e66
Showing
142 changed files
with
14,420 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
tidy3d | ||
tmm | ||
nlopt | ||
tqdm | ||
gdspy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
# Linguist-vendored files | ||
docs/* linguist-vendored | ||
notebooks/* linguist-vendored | ||
tests/* linguist-vendored | ||
|
||
# Disable linguist detection for IPython notebooks | ||
*.ipynb linguist-detectable=false | ||
|
||
# Mark IPython notebooks as generated files | ||
*.ipynb linguist-generated=true | ||
|
||
CHANGELOG.md merge=union | ||
# Specify merge attributes for CHANGELOG.md | ||
CHANGELOG.md merge=union | ||
|
||
# Specify diff and merge attributes for IPython notebooks | ||
*.ipynb diff=jupyternotebook | ||
*.ipynb merge=jupyternotebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[diff "jupyternotebook"] | ||
command = git-nbdiffdriver diff | ||
[merge "jupyternotebook"] | ||
driver = git-nbmergedriver merge %O %A %B %L %P | ||
name = jupyter notebook merge driver | ||
[difftool "nbdime"] | ||
cmd = git-nbdifftool diff \"$LOCAL\" \"$REMOTE\" \"$BASE\" | ||
[difftool] | ||
prompt = false | ||
[mergetool "nbdime"] | ||
cmd = git-nbmergetool merge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" | ||
[mergetool] | ||
prompt = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: sync-to-proxy-repo | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- latest | ||
workflow_dispatch: | ||
inputs: | ||
env: | ||
description: environment | ||
default: dev | ||
required: true | ||
jobs: | ||
set_env: | ||
outputs: | ||
env: ${{ steps.setenv.outputs.env }} | ||
dest-branch: ${{ steps.dest-branch.outputs.branch }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: setenv | ||
run: | | ||
if test -n "${{ github.event.inputs.env }}" | ||
then | ||
echo "::set-output name=env::${{ github.event.inputs.env }}" | ||
echo "ENV=${{ github.event.inputs.env }}" >> $GITHUB_ENV | ||
fi | ||
if test "${{ github.event_name }}" = 'push' -a "${{ github.ref }}" = 'refs/heads/latest' | ||
then | ||
echo "::set-output name=env::dev" | ||
echo "ENV=dev" >> $GITHUB_ENV | ||
fi | ||
if test "${{ github.event_name }}" = 'push' -a "${{ github.ref }}" = 'refs/heads/main' | ||
then | ||
echo "::set-output name=env::prod" | ||
echo "ENV=prod" >> $GITHUB_ENV | ||
fi | ||
- id: dest-branch | ||
run: | | ||
case ${{ env.ENV }} in | ||
dev) | ||
echo "::set-output name=branch::develop" | ||
;; | ||
prod) | ||
echo "::set-output name=branch::main" | ||
;; | ||
esac | ||
build-and-deploy: | ||
needs: set_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: docs/notebooks/ | ||
token: ${{ secrets.GH_PAT }} | ||
repository-name: flexcompute/tidy3d-example-library | ||
target-folder: notebooks | ||
branch: ${{ needs.set_env.outputs.dest-branch }} | ||
- run: | | ||
mkdir -p build_toc | ||
cp docs/examples.rst build_toc/examples.rst | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: build_toc | ||
token: ${{ secrets.GH_PAT }} | ||
repository-name: flexcompute/tidy3d-example-library | ||
target-folder: toc | ||
branch: ${{ needs.set_env.outputs.dest-branch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: sync-to-readthedocs-repo | ||
permissions: | ||
contents: write | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- latest | ||
- repo_merge_no_history | ||
workflow_dispatch: | ||
inputs: | ||
env: | ||
description: environment | ||
default: dev | ||
required: true | ||
jobs: | ||
set_env: | ||
outputs: | ||
env: ${{ steps.setenv.outputs.env }} | ||
dest-branch: ${{ steps.dest-branch.outputs.branch }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: setenv | ||
run: | | ||
if test -n "${{ github.event.inputs.env }}" | ||
then | ||
echo "::set-output name=env::${{ github.event.inputs.env }}" | ||
echo "ENV=${{ github.event.inputs.env }}" >> $GITHUB_ENV | ||
elif test "${{ github.event_name }}" = 'push' -a "${{ github.ref }}" = 'refs/heads/latest' | ||
then | ||
echo "::set-output name=env::dev" | ||
echo "ENV=dev" >> $GITHUB_ENV | ||
elif test "${{ github.event_name }}" = 'push' -a "${{ github.ref }}" = 'refs/heads/main' | ||
then | ||
echo "::set-output name=env::prod" | ||
echo "ENV=prod" >> $GITHUB_ENV | ||
else | ||
echo "::set-output name=env::dev" | ||
echo "ENV=dev" >> $GITHUB_ENV | ||
fi | ||
- id: dest-branch | ||
run: | | ||
case ${{ env.ENV }} in | ||
dev) | ||
echo "::set-output name=branch::repo_merge_no_history" | ||
;; | ||
prod) | ||
echo "::set-output name=branch::main" | ||
;; | ||
esac | ||
build-and-deploy: | ||
needs: set_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: . | ||
token: ${{ secrets.GH_PAT }} | ||
repository-name: flexcompute-readthedocs/tidy3d-docs-demo | ||
target-folder: . | ||
branch: ${{ needs.set_env.outputs.dest-branch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: build&sync | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
env: | ||
description: environment | ||
default: dev | ||
required: true | ||
jobs: | ||
set_env: | ||
outputs: | ||
env: ${{ steps.setenv.outputs.env }} | ||
dest-branch: ${{ steps.dest-branch.outputs.branch }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: setenv | ||
run: | | ||
if test -n "${{ github.event.inputs.env }}" | ||
then | ||
echo "::set-output name=env::${{ github.event.inputs.env }}" | ||
echo "ENV=${{ github.event.inputs.env }}" >> $GITHUB_ENV | ||
fi | ||
if test "${{ github.event_name }}" = 'push' -a "${{ github.ref }}" = 'refs/heads/develop' | ||
then | ||
echo "::set-output name=env::dev" | ||
echo "ENV=dev" >> $GITHUB_ENV | ||
fi | ||
if test "${{ github.event_name }}" = 'push' -a "${{ github.ref }}" = 'refs/heads/main' | ||
then | ||
echo "::set-output name=env::prod" | ||
echo "ENV=prod" >> $GITHUB_ENV | ||
fi | ||
- id: dest-branch | ||
run: | | ||
case ${{ env.ENV }} in | ||
dev) | ||
echo "::set-output name=branch::develop" | ||
;; | ||
prod) | ||
echo "::set-output name=branch::main" | ||
;; | ||
esac | ||
build-and-deploy: | ||
needs: set_env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: echo environment | ||
run: | | ||
echo "::notice ::env:${{needs.set_env.outputs.env}}" | ||
echo "::notice ::dest-branch:${{needs.set_env.outputs.dest-branch}}" | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- run: cd ${{ github.workspace }}/docs && pip install beautifulsoup4 nbformat nbconvert pyyaml | ||
- run: cd ${{ github.workspace }}/docs/notebooks && mkdir html && python convert.py | ||
- shell: bash | ||
run: | | ||
cd ${{ github.workspace }} | ||
mkdir -p build && rsync -r ${{ github.workspace }}/docs/notebooks/html/ build | ||
mkdir -p build/css && rsync -r build/css/ build-css | ||
mkdir -p build/image && rsync -r build/image/ build-image | ||
mkdir -p build-source && cp docs/source/notebooks/*.ipynb build-source | ||
rm -rf build/css | ||
rm -rf build/image | ||
ls -la build | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: build | ||
token: ${{ secrets.GH_PAT }} | ||
repository-name: cmsflexc/flexcompute.com | ||
target-folder: tidy3d/examples/notebooks | ||
branch: ${{ needs.set_env.outputs.dest-branch }} | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: build-css | ||
token: ${{ secrets.GH_PAT }} | ||
repository-name: cmsflexc/flexcompute.com | ||
target-folder: /assets/tidy3d/examples/css | ||
branch: ${{ needs.set_env.outputs.dest-branch }} | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: build-image | ||
token: ${{ secrets.GH_PAT }} | ||
repository-name: cmsflexc/flexcompute.com | ||
target-folder: /assets/tidy3d/examples/image | ||
branch: ${{ needs.set_env.outputs.dest-branch }} | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: build-source | ||
token: ${{ secrets.GH_PAT }} | ||
repository-name: cmsflexc/flexcompute.com | ||
target-folder: /assets/tidy3d/examples/notebooks | ||
branch: ${{ needs.set_env.outputs.dest-branch }} | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: output | ||
path: build/ | ||
retention-days: 7 |
Oops, something went wrong.