databio / pypiper

Python toolkit for building restartable pipelines
http://pypiper.databio.org
BSD 2-Clause "Simplified" License
45 stars 9 forks source link

In minimal use case, add_pypiper_args fails when composed with logmuse.add_logging_options #192

Open vreuter opened 1 year ago

vreuter commented 1 year ago

I ran into a duplicate option name error when creating a pipeline using both logmuse and pypiper; namely, when composing logmuse.add_logging_options with pypiper.add_pypiper_args, e.g.

parser = argparse.ArgumentParser(...)
...
...
parser = pypiper.add_pypiper_args(logmuse.add_logging_options(parser))

It looks like this is because of inclusion of values from logmuse.LOGGING_CLI_OPTDATA in the "pypiper" group. I see the value for that, but it feels like unexpected behavior, and there's no message to that effect to the user. Maybe if the duplicated option name is one of the ones that pypiper knows is coming from logmuse by virtue of the import, it could suggest this (previous addition of logmuse options from a separate call to logmuse.add_logging_options) as a potential cause.

vreuter commented 1 year ago

Tagged as "bug" though acknowledging that's debatable 😅