Open redeboer opened 1 month ago
Aside from tests, Edge/NodeSettings
is mainly used in settings.create_interaction_settings(...)
but which is then heavily employed in the StateTransitionManager
. Should this be in its own branch?
Should this be in its own branch?
Yes as far as possible it is better to keep refactorings isolated and small
Some idea after discussions: we could write something like:
conservation_rules: dict[GraphElementRule, RulePriorities]
where RulePriorities
is Annotated
Rewriting get_rules_by_priority()
with the new definitions of Edge|NodeSettings
causes an infinite-loop in tests/channels/test_y_to_d0_d0bar_pi0_pi0.py
Funny, seems that the rule priorities never did anything from the start 😂 https://github.com/ComPWA/qrules/blob/e60ff895b4cf84be18291b6e4fe0ab516e75a493/src/qrules/solving.py#L539-L541
The keys are x
, not type(x)
, so it always falls back to 1
While investigating #272, I started to wonder why
EdgeSettings
andNodeSettings
requireconservation_rules
as well asrule_priorities
. Can't these two just be combined into one attribute of typedict[Rule, int]
?https://github.com/ComPWA/qrules/blob/e60ff895b4cf84be18291b6e4fe0ab516e75a493/src/qrules/solving.py#L44-L50