You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We agreed during my live demo in office hours that this should probably throw an error.
One way to do this might be to track how many times the group is used to decorate a function, and then make sure that it has the same number of operations on FlowProject instantiation, during group registration.
System configuration
Version of signac-flow: 0.14
The text was updated successfully, but these errors were encountered:
@kidrahahjo Sure, feel free to assign yourself. We discussed how this might be implemented very briefly but we don't have a good design plan in mind. I suggested one way in my comment above but if you see a better approach, go for it.
You could also check if the operation is present in cls._OPERATION_FUNCTIONS, the one caveat there is that it imposes an ordering requirement on the group and operation decorators. Not sure if we want that.
The approach @bdice suggested is efficient in nature but then we might not be able to know which function will have this error. I suggest we store the names of the operations and then check whether they're present in the operations we store.
Description
I created a group like this and then assigned it to a function but forgot to mark the function as an operation. Like this:
We agreed during my live demo in office hours that this should probably throw an error.
One way to do this might be to track how many times the group is used to decorate a function, and then make sure that it has the same number of operations on FlowProject instantiation, during group registration.
System configuration
The text was updated successfully, but these errors were encountered: