New argument parser behavior (rerun flag introduction) discussion

All,
I am in the process of porting the rerun argument parser flag from HSC. (See RFC-95 and DM-3371) and just noticed some behavior that I don’t feel was clearly addressed in the RFC. Currently in LSST if you specify an input, and no output directory the argument parser will return namespace.output=None. Presumably other routines will see None and handle it appropriately per task. In the new rerun behavior if you do not specify an output directory, one will be specified for you of the form $input/rerun/$username . To be clear this is independent of using the rerun flag. It seems that HSC has chosen to enforce the rerun directory structure, presumably as you may specify an input directory you may not want (or be able) to write to so it will create something for you. Is this a behavior we want? To be clear we can remove this functionality independently of introducing the rerun flag itself.

We have found this behaviour very helpful in HSC for keeping different reductions separate. People can forget to put in --rerun or --output, and having a default rerun set keeps me from polluting someone else’s work when using a shared data repo.

I agree with @price that this is better than the old default of adding the data to the input repository. I think that is something we never want to do.

However, this means that the documentation will have to change, probably in two places:

  • The help printed by the argument parser
  • The main.dox file in pipe_base

For now I am going to keep it with the current LSST behavior of setting none, but create a ticket to change the behavior and update the documentation all at once.

I had not seen this discussion before. I think an RFC would be more appropriate for such a change. I agree that the current default is bad. My first thought would be to require either --output or --rerun, rather than guessing something that the user might not expect. I view your proposed default rerun value as a plausible alternative, but I would be much happier requiring an input.