Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-2639: {{Standardize primary method names, run/runDataRef, across PipeTasks}} #59

Merged
merged 1 commit into from
Aug 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/lsst/ip/isr/measureCrosstalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def parseAndRun(cls, *args, **kwargs):
pickle.dump(resultList, open(results.parsedCmd.dumpRatios, "w"))
return task.reduce(resultList)

def run(self, dataRef):
def runDataRef(self, dataRef):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a case where runDataRef should call run since run can do useful work on the unpersisted exposure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The work of converting tasks to have the work done in run, and the runDataRef be the entry point for command line task is planned for after this ticket is complete. We chose to do the big outward facing api change first, and save any refactoring work for another ticket.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a trivial change. Most of the other renames do not lend themselves to adding run methods (at least that I saw in the packages I looked at) but this one did.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the interest in merging the changes for this ticket that refactoring depends on, @yalsayyad has helped by opening a ticket on this refactorization. DM-15311 covers this change, and I'll begin work on it next week.

"""Get crosstalk ratios for CCD

Parameters
Expand Down
2 changes: 1 addition & 1 deletion tests/test_crosstalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def runDataRef(self, dataRef):
config.threshold = self.value - 1
measure = MeasureCrosstalkTask(config=config)
fakeDataRef = Struct(dataId={'fake': 1})
coeff, coeffErr, coeffNum = measure.reduce([measure.run(fakeDataRef)])
coeff, coeffErr, coeffNum = measure.reduce([measure.runDataRef(fakeDataRef)])
self.checkCoefficients(coeff, coeffErr, coeffNum)

config = IsrTask.ConfigClass()
Expand Down