Skip to content

Commit

Permalink
start splitting kfactory into subpackages
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-goeldi committed Nov 22, 2024
1 parent 348bc40 commit 9a873ac
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/kfactory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@
show,
)
from . import (
cells,
enclosure,
kf_types,
packing,
# packing,
placer,
port,
routing,
Expand All @@ -51,6 +50,15 @@
from .grid import flexgrid_dbu, flexgrid, grid_dbu, grid

from aenum import constant # type: ignore[import-untyped,unused-ignore]
from types import ModuleType

import importlib


def __getattr__(name: str) -> ModuleType | None:
if name in ["packing", "cells"]:
return importlib.import_module("." + name, __name__)
raise AttributeError()


__all__ = [
Expand All @@ -71,7 +79,6 @@
"VInstance",
"VKCell",
"cell",
"cells",
"config",
"constant",
"dpolygon_from_array",
Expand All @@ -84,7 +91,6 @@
"kdb",
"lay",
"logger",
"packing",
"placer",
"polygon_from_array",
"port",
Expand Down

0 comments on commit 9a873ac

Please sign in to comment.