Skip to content

Commit

Permalink
Merge branch 'tickets/DM-39086'
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed May 9, 2023
2 parents ec07ed1 + 140b87e commit e45d324
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions doc/changes/DM-39086.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Clarified that `butler prune-datasets --purge` always removes dataset entries.

Clarified when the run argument to `butler prune-datasets --purge` is used.
10 changes: 6 additions & 4 deletions python/lsst/daf/butler/cli/cmd/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def config_validate(*args: Any, **kwargs: Any) -> None:
)
pruneDatasets_errQuietWithDryRun = "Can not use --quiet and --dry-run together."
pruneDatasets_errNoCollectionRestriction = unwrap(
"""Must indicate collections from which to prune datasets by passing COLLETION arguments (select all
"""Must indicate collections from which to prune datasets by passing COLLECTION arguments (select all
collections by passing '*', or consider using 'butler prune-collections'), by using --purge to pass a run
collection, or by using --disassociate to select a tagged collection."""
)
Expand All @@ -244,9 +244,11 @@ def config_validate(*args: Any, **kwargs: Any) -> None:
"purge_run",
help=unwrap(
"""Completely remove the dataset from the given RUN in the Registry. May not be used with
--disassociate. Note, this may remove provenance information from datasets other than those
provided, and should be used with extreme care. RUN has to provided for backward
compatibility, but datasets will be removed from any RUN-type collections."""
--disassociate. Implies --unstore. Note, this may remove provenance information from
datasets other than those provided, and should be used with extreme care.
RUN has to be provided for backward compatibility, but is used only if COLLECTIONS is
not provided. Otherwise, datasets will be removed from
any RUN-type collections in COLLECTIONS."""
),
metavar="RUN",
)
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/script/_pruneDatasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def pruneDatasets(
purge_run : `str`
Completely remove datasets from the ``Registry``. Note that current
implementation accepts any RUN-type collection, but will remove
datasets from all collections.
datasets from all collections in ``collections`` if it is non-empty.
dry_run : `bool`
Get results for what would be removed but do not remove.
confirm : `bool`
Expand Down

0 comments on commit e45d324

Please sign in to comment.