Skip to content

Commit

Permalink
Merge pull request #188 from lsst/tickets/DM-33488
Browse files Browse the repository at this point in the history
DM-33488: Update for changes in pruneDatasets interface
  • Loading branch information
andy-slac committed Jun 16, 2022
2 parents 5091a62 + 008a0be commit 269e72b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion python/lsst/ctrl/mpexec/cmdLineFwk.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def makeWriteButler(cls, args: SimpleNamespace, taskDefs: Optional[Iterable[Task
if taskDefs is not None:
initDatasetNames = set(PipelineDatasetTypes.initOutputNames(taskDefs))
refs = [ref for ref in refs if ref.datasetType.name not in initDatasetNames]
butler.pruneDatasets(refs, unstore=True, run=replaced, disassociate=False)
butler.pruneDatasets(refs, unstore=True, disassociate=False)
elif args.prune_replaced == "purge":
# Erase entire collection and all datasets, need to remove
# collection from its chain collection first.
Expand Down
11 changes: 1 addition & 10 deletions python/lsst/ctrl/mpexec/singleQuantumExecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,16 +421,7 @@ def findOutputs(
if self.clobberOutputs:
# only prune
_LOG.info("Removing partial outputs for task %s: %s", taskDef, existingRefs)
# Do not purge registry records if this looks like
# an execution butler. This ensures that the UUID
# of the dataset doesn't change.
if butler._allow_put_of_predefined_dataset:
purge = False
disassociate = False
else:
purge = True
disassociate = True
butler.pruneDatasets(existingRefs, disassociate=disassociate, unstore=True, purge=purge)
butler.pruneDatasets(existingRefs, disassociate=True, unstore=True, purge=True)
return False
else:
raise RuntimeError(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tests_require =
where=python

[options.package_data]
lsst.pipe.base = py.typed
lsst.ctrl.mpexec = py.typed

[options.entry_points]
console_scripts =
Expand Down

0 comments on commit 269e72b

Please sign in to comment.