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

Users pass positional args to Tasks, but PipelineTask does not take them

    Details

    • Team:
      Data Release Production

      Description

      This just came up in DM-17045, and I'm filing a ticket to put in the TODO inline comment to find a more permanent solution, whether it be:

      • to deprecate the args and eventually remove it from all task constructors, or
      • add args to PipelineTask, or
      • make the work-around (copy args to kwargs) available to all tasks.

      While not standard, users have done the following because it worked:

      config = FooConfig()
      task = FooTask(config)
      

      I can't find any official demo notebooks that do it, but I bet some user notebooks do. Fortunately, we had a unit test (thank you Ian Sullivan), that used this syntax that caught this.

        Attachments

          Issue Links

            Activity

            Hide
            jbosch Jim Bosch added a comment -

            This is probably RFC material, but I would be in favor of prohibiting positional arguments for task constructors and fixing code that breaks, though I could also get behind only allowing config to be passed positionally.  It's all too easy to get any of the other arguments wrong when you don't use keywords.

            Show
            jbosch Jim Bosch added a comment - This is probably RFC material, but I would be in favor of prohibiting positional arguments for task constructors and fixing code that breaks, though I could also get behind only allowing config to be passed positionally.  It's all too easy to get any of the other arguments wrong when you don't use keywords.

              People

              • Assignee:
                Unassigned
                Reporter:
                yusra Yusra AlSayyad
                Watchers:
                Jim Bosch, Nate Lust, Yusra AlSayyad
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel