Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-21890

Make command-line option command-line parsing order-independent.

    Details

      Description

      It'd be very nice if at least most pipetask options could be passed before or after the subcommand, instead of requiring users to remember which options go where.

      It's entirely possible this is a fundamental limitation of Python's argparse, but if that's the case I think we should strongly consider some way to mitigate the problem, perhaps even by duplicating all current top-level options for each subcommand so options always go after the subcommand.

        Attachments

          Issue Links

            Activity

            Hide
            salnikov Andy Salnikov added a comment -

            With current argparse-based implementation global options can only appear before sub-command and sub-command option must appear after sub-command. It looks like the only way to mix global and sub-command options is to define global/comon options for each sub-command, and that also implies that sub-command must appear first on command line before any options. It should not be hard to implement, we already have common options for build/qgraph/run sub-commands that added to each one of them.

            Show
            salnikov Andy Salnikov added a comment - With current argparse-based implementation global options can only appear before sub-command and sub-command option must appear after sub-command. It looks like the only way to mix global and sub-command options is to define global/comon options for each sub-command, and that also implies that sub-command must appear first on command line before any options. It should not be hard to implement, we already have common options for build/qgraph/run sub-commands that added to each one of them.
            Hide
            salnikov Andy Salnikov added a comment -

            Jim Bosch, I propose we merge this ticket into DM-21889 and do a single PR on that branch. They are both making incompatible changes, I think it's better to do it in one single git merge. I'd just make all commits on a single branch (tickets/DM-21889), PR for that is already open but you can delay it until this change is committed too.

            Show
            salnikov Andy Salnikov added a comment - Jim Bosch , I propose we merge this ticket into DM-21889 and do a single PR on that branch. They are both making incompatible changes, I think it's better to do it in one single git merge. I'd just make all commits on a single branch (tickets/ DM-21889 ), PR for that is already open but you can delay it until this change is committed too.
            Hide
            jbosch Jim Bosch added a comment -

            Sounds good.  Just ping me when the combination is ready for review.

            Show
            jbosch Jim Bosch added a comment - Sounds good.  Just ping me when the combination is ready for review.
            Hide
            salnikov Andy Salnikov added a comment -

            Actual work was done on DM-21889 branch. That branch is merged now, closing this ticket.

            Show
            salnikov Andy Salnikov added a comment - Actual work was done on DM-21889 branch. That branch is merged now, closing this ticket.

              People

              • Assignee:
                salnikov Andy Salnikov
                Reporter:
                jbosch Jim Bosch
                Watchers:
                Andy Salnikov, Jim Bosch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel