Placer
placer
Placer of bends/straights from a route.
cells_from_yaml
cells_from_yaml(
inp: Path,
kcl: KCLayout = stdkcl,
additional_classes: list[object] | None = None,
verbose: bool = False,
) -> None
Recreate cells from a yaml file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inp
|
Path
|
Input file path. |
required |
kcl
|
KCLayout
|
KCLayout to load the cells into. |
kcl
|
additional_classes
|
list[object] | None
|
Additional yaml classes that should be registered. This is used for example to enable loading additional yaml files etc. |
None
|
verbose
|
bool
|
Print more verbose errors etc. |
False
|
Source code in kfactory/placer.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
cells_to_yaml
cells_to_yaml(
output: PathLike,
cells: Sequence[ProtoTKCell[Any]]
| ProtoTKCell[Any]
| Sequence[TKCell]
| TKCell,
) -> None
Convert cell(s) to a yaml representations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
PathLike
|
A stream or string of a path where to dump the yaml. Can also be set to sys.stdout |
required |
cells
|
Sequence[ProtoTKCell[Any]] | ProtoTKCell[Any] | Sequence[TKCell] | TKCell
|
A single KCell or a list of them. |
required |
Returns:
| Type | Description |
|---|---|
None
|
yaml dump |
Source code in kfactory/placer.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
exploded_yaml
exploded_yaml(
inp: PathLike[Any],
library: KCLayout = stdkcl,
additional_classes: list[object] | None = None,
verbose: bool = False,
) -> Any
Expanded yaml.
Expand cross-references. Same syntax as func:~
cells_from_yaml
Source code in kfactory/placer.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
get_yaml_obj
get_yaml_obj() -> YAML
New global yaml object.
Source code in kfactory/placer.py
51 52 53 | |
include_from_loader
include_from_loader(
folder: Path,
library: KCLayout,
additional_classes: list[object] | None,
verbose: bool,
) -> Any
Expand ruamel to support the !include keyword.
Source code in kfactory/placer.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
register_classes
register_classes(
yaml: YAML,
kcl: KCLayout = stdkcl,
additional_classes: list[object] | None = None,
verbose: bool = False,
) -> None
Register a new KCell class compatible with ruamel yaml.
Source code in kfactory/placer.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |