CHIMEFRB / workflow

🌊 Working in flowstate.
0 stars 0 forks source link

99 workflow lifecycle execute argument object has no attribute is flag #108

Closed chrisfandrade16 closed 2 weeks ago

chrisfandrade16 commented 3 weeks ago

I'm not sure I understood the changes made here previously with the is_flag checks. Firstly, if the Parameter is a Argument, it'll thrown an error because Argument doesn't have is_flag, only Option does (Parameter can be Argument or Option). So, one could check with hasattr to avoid the error thrown. However, I don't see the point of even checking for is_flag. The check that was here actually caused the Parameter to be set to None if the default value of the Parameter was equal to the value of the parameter given in the Work object ---> I don't quite understand where that logic came from.

I don't think is_flag changes anything. If the parameter value is not given in the Work object, we should use the default value of the Parameter. If it is given, then we just use that value, no? Because right now, for CHAMPSS, any Option we have with is_flag and no default value (None) is just ignored, since the default value of None is not equal to the value we give it (True/False). Again don't quite understand that previous logic.

chrisfandrade16 commented 2 weeks ago

@odarotto @tjzegmott would one of you guys be able to take a look at this small PR? It's a bit crucial to fix CHAMPSS processing.