Closed redeboer closed 2 years ago
So a few problems:
combinatorics
module correctly uses an edge property that is different from ParticleWithSpin
, because the StateTransitionGraph
is initially filled with particle names + spin projections (not Particle
instances) only:
https://github.com/ComPWA/expertsystem/blob/d45a3670e631ce85b66b652febf5903d1ccd5278/expertsystem/state/combinatorics.py#L144-L146typing.Generic
or typing.TypeVar
. It would be nice though if the default type were ParticleWithSpin
so that you don't have to write StateTransitionGraph[ParticleWithSpin]
in the rest of the framework.TypeVar
definition, but this does not really address the issue, just adds a layer of safety. For instance, there is still a [dict]
here by mistake:
https://github.com/ComPWA/expertsystem/blob/778541d8b64a4a66259b5421e578cd28f562b744/tests/unit/ui/test_system_control.py#L109So I'll put this one back into the icebox. It would be better to get rid of this template altogether, but for that the interface will have to be changed (for instance in ComPWA/qrules#20, see also description of ComPWA/expertsystem#314).
See also #49
Closed by #156
Now that the nested
dict
s have been moved out (#297), it would be nice to remove the edge type template of theStateTransitionGraph
: https://github.com/ComPWA/expertsystem/blob/778541d8b64a4a66259b5421e578cd28f562b744/expertsystem/topology.py#L301-L304Internally, the
expertsystem
(almost) only usesParticleWithSpin
as edge type. In addition, the fact that the node properties are not templated is counter-intuitive.