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}} #21

Merged
merged 2 commits 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/ctrl/pool/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def parseAndSubmit(cls, args=None, **kwargs):
taskParser.error("Error in task preparation")

setBatchType(batchArgs.batch)

Copy link
Contributor

Choose a reason for hiding this comment

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

Put in separate commit, or drop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My emacs complained about the added white space, as I'm running with the suggested .emacs changes. There are a few other single space changes elsewhere due to the same behavior.

Copy link
Contributor

@PaulPrice PaulPrice Jul 27, 2018

Choose a reason for hiding this comment

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

You should put them in a separate commit, then. Otherwise, the git blame is misleading.

Copy link
Member

Choose a reason for hiding this comment

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

Trailing whitespace is not compliant with the coding standard. Please delete the trailing whitespace but put it in a separate commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

White space change moved to separate commit.

if batchArgs.batch is None: # don't use a batch system
sys.argv = [sys.argv[0]] + batchArgs.leftover # Remove all batch arguments

Expand Down
6 changes: 3 additions & 3 deletions python/lsst/ctrl/pool/test/demoTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def batchWallTime(cls, time, parsedCmd, numCores):
visitRef in parsedCmd.id.refList]
return time*sum(math.ceil(tt/numCores) for tt in numTargets)

def run(self, visitRef):
def runDataRef(self, visitRef):
"""Main entry-point

Only the master node runs this method. It will dispatch jobs to the
Expand All @@ -51,11 +51,11 @@ def run(self, visitRef):
dataIdList = collections.OrderedDict(sorted(dataIdList.items()))

with self.logOperation("master"):
total = pool.reduce(operator.add, self.read, list(dataIdList.values()),
total = pool.reduce(operator.add, self.run, list(dataIdList.values()),
butler=visitRef.getButler())
self.log.info("Total number of pixels read: %d" % (total,))

def read(self, cache, dataId, butler=None):
def run(self, cache, dataId, butler=None):
"""Read image and return number of pixels

Only the slave nodes run this method.
Expand Down