Skip to content

Commit

Permalink
small formatting and add towncrier
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-goeldi committed Aug 29, 2023
1 parent 1fbf044 commit 3454b03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
1 change: 1 addition & 0 deletions changelog.d/+ab59f6ef.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add PDK capabilities to KCLayout [#171](https://github.com/gdsfactory/kfactory/pull/171)
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ dev = [
"towncrier",
"tbump",
"types-requests",
"types-setuptools",
"types-docutils",
"types-Pygments",
]
docs = [
"kfactory[ipy]",
Expand Down
16 changes: 1 addition & 15 deletions src/kfactory/kcell.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,20 +375,6 @@ def __getattr__(self, __key: str) -> LayerEnclosure:
return self.enclosure_map[__key]


# class CellFactoryModel(BaseModel, arbitrary_types_allowed=True):
# """PDK access model for KCellFactories."""

# cellfactory_map: dict[str, CellFactory] = Field(default={})

# def __getitem__(self, __key: str) -> CellFactory:
# """Retrieve element by string key."""
# return self.cellfactory_map[__key]

# def __getattr__(self, __key: str) -> CellFactory:
# """Retrieve attribute by key."""
# return self.cellfactory_map[__key]


class KCell:
"""KLayout cell and change its class to KCell.
Expand Down Expand Up @@ -750,7 +736,7 @@ def plot(self) -> None:
Usage: Pass the kcell variable as an argument in the cell at the end
"""
from .widgets.interactive import display_kcell
from .widgets.interactive import display_kcell # type: ignore[attr-defined]

display_kcell(self)

Expand Down
3 changes: 3 additions & 0 deletions src/kfactory/widgets/interactive.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# type: ignore
"""Interactivate jupyter widget."""

from __future__ import annotations
Expand Down Expand Up @@ -34,6 +35,8 @@
print("You need install jupyter notebook plugin with `pip install kfactory[ipy]`")
raise e

__all__ = ["display_kcell"]


def display_kcell(kc: KCell) -> None:
cell_dup = kc.kcl[kc.name]
Expand Down

0 comments on commit 3454b03

Please sign in to comment.