Skip to content

Commit

Permalink
Merge branch 'main' into port-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-goeldi authored Sep 18, 2023
2 parents 5ecf9a1 + 9bf86ce commit 0da86ed
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/180.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added to be set by decorator
Binary file added demo.gds
Binary file not shown.
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ nav:
- Home:
- Intro: index.md
- gdsfactory.md
- dosdonts.md
- First Steps:
- Prerequisites: pre.md
- 5min Intro to KFactory: intro.md
Expand Down
9 changes: 9 additions & 0 deletions docs/source/dosdonts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Dos and Don'ts


## Dos

## Don'ts

* Do not use "function_name" as a function parameter when using `@kf.cell` decorator,
it will be overwritten by the function name used to create the cell
2 changes: 2 additions & 0 deletions src/kfactory/kcell.py
Original file line number Diff line number Diff line change
Expand Up @@ -3802,6 +3802,8 @@ def wrapped_cell(
if set_settings:
settings = cell.settings.model_dump()
settings.update(params)
if set_name:
settings["function_name"] = name
cell._settings = KCellSettings(**settings)
info = cell.info.model_dump()
for name, value in cell.info:
Expand Down

0 comments on commit 0da86ed

Please sign in to comment.