Skip to content

Commit e4e0aa6

Browse files
authored
Merge pull request #472 from gdsfactory/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents f290b98 + c80df21 commit e4e0aa6

12 files changed

+19
-31
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
- id: trailing-whitespace
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: "v0.5.7"
19+
rev: "v0.6.1"
2020
hooks:
2121
- id: ruff
2222
- id: ruff-format

notebooks/21_schematic_driven_layout_lumerical.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"from gplugins.spice.spice_to_yaml import spice_to_yaml\n",
3434
"from gplugins.spice.tests.test_interconnect import spice_netlist_interconnect\n",
3535
"\n",
36-
"\n",
3736
"netlist_path = GDSDIR_TEMP / \"test_interconnect.sp\"\n",
3837
"netlist_path.write_text(spice_netlist_interconnect)\n",
3938
"picyaml_path = GDSDIR_TEMP / \"test_interconnect.sp\"\n",

notebooks/elmer_01_electrostatic.ipynb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
},
3838
"outputs": [],
3939
"source": [
40-
"import os\n",
4140
"from math import inf\n",
42-
"from pathlib import Path\n",
4341
"\n",
4442
"import gdsfactory as gf\n",
4543
"import pyvista as pv\n",
@@ -49,7 +47,6 @@
4947
"from gdsfactory.generic_tech import LAYER, get_generic_pdk\n",
5048
"from gdsfactory.technology import LayerStack\n",
5149
"from gdsfactory.technology.layer_stack import LayerLevel\n",
52-
"from IPython.display import display\n",
5350
"\n",
5451
"from gplugins.elmer import run_capacitive_simulation_elmer\n",
5552
"\n",

notebooks/fdtdz_01.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"c = gf.Component()\n",
7777
"waveguide_rib = c << gf.components.straight(length=length, cross_section=rib)\n",
7878
"nitride_feature = c << gf.components.circle(radius=2, layer=LAYER.WGN)\n",
79-
"nitride_feature.dx= 5\n",
79+
"nitride_feature.dx = 5\n",
8080
"padding = c << gf.components.bbox(\n",
8181
" waveguide_rib.bbox, top=2, bottom=2, layer=LAYER.WAFER\n",
8282
")\n",

notebooks/femwell_01_modes.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@
6666
" }\n",
6767
")\n",
6868
"\n",
69-
"filtered_layer_stack.layers[\"core\"].thickness = (\n",
70-
" 0.22 # Perturb the layer_stack before simulating\n",
71-
")\n",
69+
"filtered_layer_stack.layers[\n",
70+
" \"core\"\n",
71+
"].thickness = 0.22 # Perturb the layer_stack before simulating\n",
7272
"\n",
73-
"filtered_layer_stack.layers[\"slab90\"].thickness = (\n",
74-
" 0.09 # Perturb the layer_stack before simulating\n",
75-
")\n",
73+
"filtered_layer_stack.layers[\n",
74+
" \"slab90\"\n",
75+
"].thickness = 0.09 # Perturb the layer_stack before simulating\n",
7676
"\n",
7777
"resolutions = {\n",
7878
" \"core\": {\"resolution\": 0.02, \"distance\": 1, \"SizeMax\": 0.2},\n",

notebooks/lumerical_1_fdtd_sparameters.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@
414414
"metadata": {},
415415
"outputs": [],
416416
"source": [
417-
"\n",
418417
"c = gf.components.straight()\n",
419418
"s = sim.write_sparameters_lumerical(c, layer_stack=layer_stack, run=False, session=s)"
420419
]

notebooks/meep_01_sparameters.ipynb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@
10011001
"import gdsfactory as gf\n",
10021002
"import meep as mp\n",
10031003
"\n",
1004-
"from gplugins.gmeep.get_simulation import get_simulation\n"
1004+
"from gplugins.gmeep.get_simulation import get_simulation"
10051005
]
10061006
},
10071007
{
@@ -1030,8 +1030,6 @@
10301030
"metadata": {},
10311031
"outputs": [],
10321032
"source": [
1033-
"import matplotlib.pyplot as plt\n",
1034-
"\n",
10351033
"component = gf.add_padding_container(\n",
10361034
" c,\n",
10371035
" default=0,\n",
@@ -1060,7 +1058,7 @@
10601058
"outputs": [],
10611059
"source": [
10621060
"sim.init_sim()\n",
1063-
"sim.solve_cw(1e-6, 10000, 10)\n"
1061+
"sim.solve_cw(1e-6, 10000, 10)"
10641062
]
10651063
},
10661064
{
@@ -1084,7 +1082,6 @@
10841082
"metadata": {},
10851083
"outputs": [],
10861084
"source": [
1087-
"\n",
10881085
"import numpy as np\n",
10891086
"\n",
10901087
"eps_data = sim.get_array(vol=nonpml_vol, component=mp.Dielectric)\n",
@@ -1112,7 +1109,6 @@
11121109
"metadata": {},
11131110
"outputs": [],
11141111
"source": [
1115-
"\n",
11161112
"sim.run(until=400)"
11171113
]
11181114
},

notebooks/path_length_analysis.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
"metadata": {},
2424
"outputs": [],
2525
"source": [
26-
"import gplugins.path_length_analysis.path_length_analysis_from_gds as pl\n",
27-
"import gdsfactory as gf"
26+
"import gdsfactory as gf\n",
27+
"\n",
28+
"import gplugins.path_length_analysis.path_length_analysis_from_gds as pl"
2829
]
2930
},
3031
{

notebooks/sax_01_sax.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"from rich.logging import RichHandler\n",
4545
"from scipy import constants\n",
4646
"from sklearn.linear_model import LinearRegression\n",
47-
"from tqdm.notebook import trange, tqdm\n",
47+
"from tqdm.notebook import tqdm, trange\n",
4848
"\n",
4949
"import gplugins.sax as gs\n",
5050
"import gplugins.tidy3d as gt\n",
@@ -788,7 +788,7 @@
788788
" mmi_in = gf.components.mmi1x2()\n",
789789
" mmi_out = gf.components.mmi2x2()\n",
790790
" bend = gf.components.bend_euler()\n",
791-
" half_delay_straight = gf.components.straight(length=delta_length/2)\n",
791+
" half_delay_straight = gf.components.straight(length=delta_length / 2)\n",
792792
"\n",
793793
" # references\n",
794794
" mmi_in = c.add_ref(mmi_in, name=\"mmi_in\")\n",
@@ -1061,17 +1061,17 @@
10611061
" fn = f\"{wl=:.2f}-{n_box=:.2f}-{n_clad=:.2f}-{n_core=:.2f}-{t_slab=:.3f}-{t_soi=:.3f}-{w_core=:.3f}-{du=:.3f}-{n_modes=}.json\"\n",
10621062
" path = os.path.join(cache_path, fn)\n",
10631063
" if not replace_cached and os.path.exists(path):\n",
1064-
" return [mw.Mode.parse_obj(mode) for mode in json.load(open(path, \"r\"))]\n",
1064+
" return [mw.Mode.parse_obj(mode) for mode in json.load(open(path))]\n",
10651065
"\n",
10661066
" # fmt: off\n",
10671067
" m_core = mw.SampledMaterial(name=\"slab\", n=np.asarray([n_core, n_core]), params={\"wl\": np.asarray([1.0, 2.0])}, meta={\"color\": (0.9, 0, 0, 0.9)})\n",
1068-
" m_clad = mw.SampledMaterial(name=\"clad\", n=np.asarray([n_clad, n_clad]), params={\"wl\": np.asarray([1.0, 2.0])}) \n",
1068+
" m_clad = mw.SampledMaterial(name=\"clad\", n=np.asarray([n_clad, n_clad]), params={\"wl\": np.asarray([1.0, 2.0])})\n",
10691069
" m_box = mw.SampledMaterial(name=\"box\", n=np.asarray([n_box, n_box]), params={\"wl\": np.asarray([1.0, 2.0])})\n",
10701070
" box = mw.Structure(material=m_box, geometry=mw.Box(x_min=- 2 * w_core - delta, x_max= 2 * w_core + delta, y_min=- 2 * t_soi - delta, y_max=0.0, z_min=0.0, z_max=length))\n",
10711071
" slab = mw.Structure(material=m_core, geometry=mw.Box(x_min=-2 * w_core - delta, x_max=2 * w_core + delta, y_min=0.0, y_max=t_slab, z_min=0.0, z_max=length))\n",
10721072
" clad = mw.Structure(material=m_clad, geometry=mw.Box(x_min=-2 * w_core - delta, x_max=2 * w_core + delta, y_min=0, y_max=3 * t_soi + delta, z_min=0.0, z_max=length))\n",
10731073
" core = mw.Structure(material=m_core, geometry=mw.Box(x_min=-w_core / 2, x_max=w_core / 2, y_min=0.0, y_max=t_soi, z_min=0.0, z_max=length))\n",
1074-
" \n",
1074+
"\n",
10751075
" cell = mw.Cell(structures=[box, clad, slab, core], mesh=mw.Mesh2D( x=np.arange(-2*w_core, 2*w_core, du), y=np.arange(-2*t_soi, 3*t_soi, du), ), z_min=0.0, z_max=10.0)\n",
10761076
" cross_section = mw.CrossSection.from_cell(cell=cell, env=env)\n",
10771077
" modes = mw.compute_modes(cross_section, num_modes=n_modes)\n",

notebooks/tcad_02_analytical_process.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"import matplotlib.pyplot as plt\n",
3131
"import numpy as np\n",
3232
"\n",
33-
"from gplugins.process.implant_tables import *\n"
33+
"from gplugins.process.implant_tables import *"
3434
]
3535
},
3636
{

0 commit comments

Comments
 (0)