Open drewoldag opened 1 year ago
@jfcrenshaw I just wanted to get your take on the lines of code linked above. I realize that "a lof of work" is rather subjective, but would it make sense to move those lines of code into a new method, and call that method from the stage's run
method?
Yes I think that is a good idea
As noted in the https://github.com/LSSTDESC/rail_base/issues/7 there are a few subclasses of RAIL stages that seem to do a lot of work in the init methods. Generally this is an antipattern. I don't have enough domain knowledge to say whether or not the code here (https://github.com/LSSTDESC/rail_pzflow/blob/main/src/rail/creation/engines/flowEngine.py#L72-L141) is considered "a lot of work" or not, but I wanted to flag it to be checked by someone with more context.