Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
update libadd.py to new fab ll
Browse files Browse the repository at this point in the history
  • Loading branch information
iopapamanoglou committed Aug 29, 2024
1 parent 60c63fc commit 42b68b2
Showing 1 changed file with 11 additions and 33 deletions.
44 changes: 11 additions & 33 deletions src/faebryk/tools/libadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,45 +90,23 @@ def module(ctx: typer.Context, interface: bool = False):
import logging
from faebryk.core.core import {base}
import faebryk.library._F as F # noqa: F401
from faebryk.core.{base.lower()} import {base}
from faebryk.libs.library import L # noqa: F401
from faebryk.libs.units import P # noqa: F401
logger = logging.getLogger(__name__)
class {get_name(ctx)}({base}):
@classmethod
def NODES(cls):
# submodules
class _NODES(super().NODES()):
pass
return _NODES
@classmethod
def PARAMS(cls):
# parameters
class _PARAMS(super().PARAMS()):
pass
return _PARAMS
@classmethod
def IFS(cls):
# interfaces
class _IFS(super().IFS()):
pass
return _IFS
def __init__(self):
# boilerplate
super().__init__()
self = self.IFS()(self)
self.PARAMs = self.PARAMS()(self)
self.NODEs = self.NODES()(self)
# subnodes
# interfaces
# params
# traits
def __preinit__(self):
pass
# connections
# traits
# parametrization
""")

write(ctx, out)
Expand Down

0 comments on commit 42b68b2

Please sign in to comment.