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

Fix tests #2801

Merged
merged 11 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
7 changes: 3 additions & 4 deletions gdsfactory/components/mode_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import gdsfactory as gf
from gdsfactory.component import Component
from gdsfactory.components.bend_euler import bend_euler_s
from gdsfactory.components.bend_s import bend_s
from gdsfactory.components.coupler_straight_asymmetric import (
coupler_straight_asymmetric as coupler_straight_asymmetric_function,
)
Expand All @@ -17,7 +17,7 @@ def mode_converter(
gap: float = 0.3,
length: float = 10,
coupler_straight_asymmetric: ComponentSpec = coupler_straight_asymmetric_function,
bend: ComponentSpec = partial(bend_euler_s, angle=45),
bend: ComponentSpec = partial(bend_s, size=(25, 3)),
taper: ComponentSpec = taper_function,
mm_width: float = 1.2,
mc_mm_width: float = 1,
Expand Down Expand Up @@ -74,6 +74,7 @@ def mode_converter(
width1=mc_mm_width,
width2=mm_width,
length=taper_length,
cross_section=cross_section,
)

# directional coupler
Expand All @@ -98,8 +99,6 @@ def mode_converter(
c.add_port("o3", port=r_bot_straight.ports["o2"])
c.add_port("o2", port=l_bend.ports["o2"])
c.add_port("o4", port=r_bend.ports["o2"])

c.flatten()
return c


Expand Down
5 changes: 3 additions & 2 deletions gdsfactory/routing/route_bundle_all_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from functools import partial

import kfactory as kf
import numpy as np
from kfactory.routing.aa.optical import (
BendFactory,
OpticalAllAngleRoute,
Expand All @@ -18,8 +19,8 @@ def route_bundle_all_angle(
component: ComponentSpec,
ports1: list[Port],
ports2: list[Port],
backbone: Sequence[tuple[float, float]],
separation: list[float] | float,
backbone: Sequence[tuple[float, float]] = [],
separation: list[float] | float = 3.0,
straight_factory: StraightFactory = straight,
bend_factory: BendFactory = partial(bend_euler, radius=5),
bend_ports: tuple[str, str] = ("o1", "o2"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
info: {}
name: mzi_DL10_LY2_LX0p1_Bben_7d3ba936
name: mzi_DL10_LY2_LX0p1_Bben_ceb5535c
settings:
add_optical_ports_arms: false
auto_rename_ports: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
info: {}
name: mzi_DL10_LY2_LX0p1_Bben_9a436e0f
name: mzi_DL10_LY2_LX0p1_Bben_677958f4
settings:
add_optical_ports_arms: false
auto_rename_ports: true
Expand Down
55 changes: 2 additions & 53 deletions test-data-regression/test_components_2_.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,3 @@
function: _from_yaml
info: {}
module: gdsfactory.read.from_yaml
name: rotation_99ea4645
settings:
conf:
instances:
mmi_long:
component: mmi1x2
settings:
length_mmi: 5
width_mmi: 4.5
name: rotation
placements:
mmi_long:
port: o1
rotation: 90
x: 10
y: 20
ports:
o1: mmi_long,o3
o2: mmi_long,o2
o3: mmi_long,o1
label_instance_function:
function: add_instance_label
mode: layout
routing_strategy:
get_bundle:
function: get_bundle
get_bundle_all_angle:
function: get_bundle_all_angle
get_bundle_electrical:
function: get_bundle
module: gdsfactory.routing.get_bundle
settings:
bend:
function: wire_corner
cross_section: metal_routing
get_bundle_from_steps:
function: get_bundle_from_steps
get_bundle_from_steps_electrical:
function: get_bundle_from_steps
module: gdsfactory.routing.get_bundle_from_steps
settings:
bend:
function: wire_corner
cross_section: metal_routing
get_bundle_from_waypoints:
function: get_bundle_from_waypoints
get_bundle_path_length_match:
function: get_bundle_path_length_match
get_bundle_same_axis_no_grouping:
function: get_bundle_same_axis_no_grouping
validate: false
name: rotation
settings: {}
6 changes: 6 additions & 0 deletions test-data-regression/test_connect_corner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
0: 70000
1: 80000
2: 90000
3: 100000
4: 110000
5: 120000
Loading
Loading