# API Change for Tasks. Renamed CmdLineTask.run -\> runDataRef

**URL:** <https://www.rubin.community/t/api-change-for-tasks-renamed-cmdlinetask-run-rundataref/3100>\
**Category:** DM Notifications\
**Created:** [August 3, 2018, 11:29pm UTC](https://www.rubin.community/t/api-change-for-tasks-renamed-cmdlinetask-run-rundataref/3100 "2018-08-03T23:29:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yusra](https://avatars.discourse-cdn.com/v4/letter/y/f4b2a3/32.png) [@yusra](https://www.rubin.community/u/yusra)\
**Post date:** [August 3, 2018, 11:29pm UTC](https://www.rubin.community/t/api-change-for-tasks-renamed-cmdlinetask-run-rundataref/3100/1 "2018-08-03T23:29:15Z")

</div>

As part of the upcoming migration to PipelineTask f.k.a SuperTask, we are refactoring many of our Tasks. We are in the process of implementing RFC-352 which says that the default `pipeBase.TaskRunner` should call a task’s `runDataRef` method.

This change was implemented on DM-2639 and has been merged to master.

- If you have code that _calls_ a `CmdLineTask`s `run` method or primary core method (e.g. assemble, calibrate, runDetection) in a notebook or user script, you will likely have to rename any calls to the methods formerly known as `run` to `runDataRef`.

- If you have your own CmdLineTask that no longer runs. (i.e. you see `'*Task' object has no attribute 'runDataRef'` you have two options:

1. Rename your `CmdlineTask`'s `run` method to `runDataRef` (preferred!) or

2. Set your Task’s TaskRunner to `lsst.pipe.base.LegacyTaskRunner` by

which will force `pipeBase.parseAndRun()` to call the old `run` instead of new `runDataRef`

NOTE: “DataRef” in `runDataRef` should not be taken literally as “one data ref.” The method accepts any Gen-2 Butler data products like the old `run` method did. The name DataRef in this context means Gen 2 Butler objects, e.g., a list of `Butler.DataRef`s, one `Butler.DataRef`, one `Butler`, etc… `runDataRef` is in contrast to the future `runQuantum` method which will take Gen 3 quantums:

- DataRef = Gen 2
- Quantum = Gen 3

Special thanks to @czw, who bravely took on a 16-package, API-breaking change as his first ticket on the project!

For more information see: [API Change for Tasks. Rename run/\<primaryMethod\> to runDataRef/run](http://www.rubin.community/t/api-change-for-tasks-rename-run-primarymethod-to-rundataref-run/3054), RFC-352, RFC-26
