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 more docs #2771

Merged
merged 13 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions gdsfactory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@
from aenum import constant # type: ignore[import-untyped]

import kfactory as kf
from kfactory.kcell import LayerEnum, kcl, show
from kfactory.kcell import LayerEnum, kcl, show, cell
import klayout.db as kdb

from gdsfactory.path import Path
from gdsfactory.component import (
Component,
ComponentReference,
Instance,
cell,
)
from gdsfactory.config import CONF, call_if_func, PATH, logger
from gdsfactory.port import Port
Expand Down
15 changes: 0 additions & 15 deletions gdsfactory/cell.py

This file was deleted.

1 change: 1 addition & 0 deletions gdsfactory/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ def remap_layers(
if recursive:
for ci in self.called_cells():
self.kcl[ci].move(src_layer_index, dst_layer_index)
return self

def pprint_ports(self, **kwargs) -> None:
"""Pretty prints ports.
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/add_termination.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from functools import partial

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.taper import taper as taper_function
from gdsfactory.typings import ComponentSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/align.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.rectangle import rectangle
from gdsfactory.typings import ComponentSpec, LayerSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/array_component.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.typings import ComponentSpec, Float2

Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/bend_s.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.bezier import bezier
from gdsfactory.config import ErrorType
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/cavity.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.dbr import dbr
from gdsfactory.typings import ComponentSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/cdsem_straight.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.straight import straight
from gdsfactory.components.text_rectangular import text_rectangular
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/cdsem_straight_density.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from functools import partial

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.straight import straight
from gdsfactory.components.text_rectangular import text_rectangular
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/coh_rx_single_pol.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.ge_detector_straight_si_contacts import (
ge_detector_straight_si_contacts,
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/coh_tx_dual_pol.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.routing.route_single import route_single
from gdsfactory.typings import ComponentSpec, CrossSectionSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/coh_tx_single_pol.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.mzi import mzi_pin
from gdsfactory.routing.route_single import route_single
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/compass.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.snap import snap_to_grid2x
from gdsfactory.typings import Ints, LayerSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/copy_layers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.cross import cross
from gdsfactory.typings import ComponentSpec, LayerSpecs
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/crossing_waveguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from numpy import float64

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.bezier import (
bezier,
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/cutback_bend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from numpy import float64

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.bend_circular import bend_circular, bend_circular180
from gdsfactory.components.bend_euler import bend_euler, bend_euler180
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/die_bbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ def die_bbox(
if __name__ == "__main__":
mask = gf.components.array(rows=10, columns=10)
# c = die_bbox(component=mask, die_name="chip99")
c = die_bbox()
c = die_bbox(component=mask, die_name="chip99", text_anchor="se")
c.show()
2 changes: 1 addition & 1 deletion gdsfactory/components/extend_ports_list.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.port import Port
from gdsfactory.typings import ComponentSpec, Strs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from functools import partial
from typing import Any

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.grating_coupler_elliptical_arbitrary import (
grating_coupler_elliptical_arbitrary,
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/grating_coupler_loss.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.grating_coupler_elliptical_trenches import grating_coupler_te
from gdsfactory.port import Port
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/litho_calipers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.rectangle import rectangle
from gdsfactory.typings import LayerSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/mzi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from functools import partial

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.bend_euler import bend_euler
from gdsfactory.components.coupler import coupler
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/mzi_arm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.bend_euler import bend_euler
from gdsfactory.components.component_sequence import component_sequence
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/mzi_arms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.bend_euler import bend_euler
from gdsfactory.components.mmi1x2 import mmi1x2
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/mzi_lattice.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.coupler import coupler as coupler_function
from gdsfactory.components.mmi2x2 import mmi2x2 as mmi_splitter_function
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/optimal_90deg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.typings import LayerSpec

Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/optimal_hairpin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.snap import snap_to_grid
from gdsfactory.typings import LayerSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/optimal_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.typings import LayerSpec

Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/pad.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from functools import partial

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.compass import compass
from gdsfactory.typings import ComponentFactory, Float2, LayerSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy as np

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.compass import compass
from gdsfactory.typings import Ints, LayerSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/rectangle_with_slits.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.array_component import array
from gdsfactory.components.rectangle import rectangle
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/regular_polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import gdstk
import numpy as np

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.typings import LayerSpec

Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/resistance_meander.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.rectangle import rectangle
from gdsfactory.typings import LayerSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/resistance_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from functools import partial

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.compass import compass
from gdsfactory.components.via_stack import via_stack_slab_npp_m3
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/snspd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy as np

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.components.compass import compass
from gdsfactory.components.optimal_hairpin import optimal_hairpin
Expand Down
8 changes: 4 additions & 4 deletions gdsfactory/components/straight.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def straight(
# print(type(c.ports))
# print("o1" in ref.ports)
# print(type(ref.ports))
print(c.size_info)
print(c.d.size_info)
print(ref.size_info)
print(ref.d.size_info)
# print(c.size_info)
# print(c.d.size_info)
# print(ref.size_info)
# print(ref.d.size_info)
c.show()
2 changes: 1 addition & 1 deletion gdsfactory/components/straight_heater_doped.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,5 +264,5 @@ def straight_heater_doped_strip(


if __name__ == "__main__":
c = straight_heater_doped_rib()
c = straight_heater_doped_rib(length=100)
c.show()
2 changes: 1 addition & 1 deletion gdsfactory/components/straight_heater_metal.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from functools import partial

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.typings import ComponentSpec, CrossSectionSpec

Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/taper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from functools import partial

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.port import Port
from gdsfactory.typings import CrossSectionSpec, LayerSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/taper_cross_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from functools import partial

import gdsfactory as gf
from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.cross_section import strip_rib_tip
from gdsfactory.typings import CrossSectionSpec
Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/text_rectangular_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from functools import cache

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.typings import LayerSpec

Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/components/triangles.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from functools import partial

from gdsfactory.cell import cell
from gdsfactory import cell
from gdsfactory.component import Component
from gdsfactory.typings import LayerSpec

Expand Down
Loading
Loading