Closed bdg221 closed 5 months ago
Fixes #29 This PR adds two custom repr methods for the Port and Connection classes to improve readability.
@mstechly mentioned that meta should not be included and also if the size is None that it should be explicitly stated.
meta
size
None
before:
Port(name='In_3', parent=<Routine name="alias_sampling">, direction='input', size='mu', meta={}) Port(name='In_4', parent=<Routine name="alias_sampling">, direction='input', size='1', meta={}) Port(name='out_0', parent=<Routine name="alias_sampling">, direction='output', size=None, meta={})
after:
Port(alias_sampling.#In_3, (input) size="mu") Port(alias_sampling.#In_4, (input) size="1") Port(alias_sampling.#out_0, (output) size="None")
Connection(source=Port(name='In_1', parent=<Routine name="alias_sampling">, direction='input', size='mu', meta={}), target=Port(name='in', parent=<Routine name="had">, direction='input', size='N', meta={}), parent=<Routine name="alias_sampling">) Connection(source=Port(name='In_2', parent=<Routine name="alias_sampling">, direction='input', size='R', meta={}), target=Port(name='In_alt', parent=<Routine name="qrom">, direction='input', size='R', meta={}), parent=<Routine name="alias_sampling">) Connection(source=Port(name='In_3', parent=<Routine name="alias_sampling">, direction='input', size='mu', meta={}), target=Port(name='In_keep', parent=<Routine name="qrom">, direction='input', size='mu', meta={}), parent=<Routine name="alias_sampling">)
Connection(alias_sampling.#In_1 -> alias_sampling.#in) Connection(alias_sampling.#In_2 -> alias_sampling.#In_alt) Connection(alias_sampling.#In_3 -> alias_sampling.#In_keep)
Fixes #29 This PR adds two custom repr methods for the Port and Connection classes to improve readability.
Port
@mstechly mentioned that
meta
should not be included and also if thesize
isNone
that it should be explicitly stated.before:
after:
Connection
before:
after: