flav-io / flavio

A Python package for flavour physics phenomenology in the Standard model and beyond
http://flav-io.github.io/
MIT License
71 stars 62 forks source link

fix issue in Constraints.add_constraint #255

Closed peterstangl closed 3 months ago

DavidMStraub commented 3 months ago

Why aren't you keeping the existing behaviour as default to preserve backward compatibility?

peterstangl commented 3 months ago

I think that's what I'm doing now with this PR using the argument parameter_object=False. I introduced an issue in a previous commit in PR https://github.com/flav-io/flavio/pull/247 where I actually broke backward compatibility. The present PR should restore it.

DavidMStraub commented 3 months ago

Perhaps parameter_object might benefit from a different name that fits to the fact that it's a boolean, not a parameter object

peterstangl commented 3 months ago

Maybe something like is_parameter_constraint? :thinking: The main point is just that this should only be applied to parameter constraints and not to measurement constraints.