Hashable Rules#2076
Conversation
scarlehoff
left a comment
There was a problem hiding this comment.
Thanks for this, could you also remove frozenargs from the conda recipe / pyproject? It should not be needed anymore
(I think this closes #2027 ^^)
I am not sure I understand, do you mean |
I thought it was only needed by the filter rules? |
| self.defaults = defaults | ||
| self.theory_params = theory_parameters | ||
| ns = {*self.numpy_functions, *self.defaults, *self.variables, "idat", "central_value"} | ||
| ns = {*self.numpy_functions, *self.defaults.to_dict().keys(), *self.variables, "idat", "central_value"} |
There was a problem hiding this comment.
| ns = {*self.numpy_functions, *self.defaults.to_dict().keys(), *self.variables, "idat", "central_value"} | |
| ns = {*self.numpy_functions, *self.defaults.to_dict(), *self.variables, "idat", "central_value"} |
Not that it makes a difference though.
|
Greetings from your nice fit 🤖 !
Check the report carefully, and please buy me a ☕ , or better, a GPU 😉! |
|
Greetings from your nice fit 🤖 !
Check the report carefully, and please buy me a ☕ , or better, a GPU 😉! |
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
scarlehoff
left a comment
There was a problem hiding this comment.
Thanks for this, I think this is already finished :)
Just some small comments for parse_filter_defaults.
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
scarlehoff
left a comment
There was a problem hiding this comment.
Seems ok. I've done a few tests and I haven't seen anything obviously wrong.
|
|
||
|
|
||
| @dataclasses.dataclass(frozen=True) | ||
| class AddedFilterRule(FilterRule): |
There was a problem hiding this comment.
What is the purpose of this class?
Rules (for cuts) are made to tuple instead of list.
This makes them hashable and allows eg them to contained within a
TupleCompobject