Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Fireye04 committed Mar 3, 2023
1 parent 2a42e2c commit edf2cf3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions python/lsst/daf/butler/cli/cmd/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,6 @@ def query_dataset_types(*args: Any, **kwargs: Any) -> None:
@click.argument("dataset-type-name", nargs=-1)
def remove_dataset_type(*args: Any, **kwargs: Any) -> None:
"""Remove the dataset type definitions from a repository."""
print(args)
print(kwargs)
script.removeDatasetType(*args, **kwargs)


Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/registries/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def removeDatasetType(self, name: str | tuple([str, ...])) -> None:
else:
for datasetType in datasetTypes:
self._managers.datasets.remove(datasetType.name)
_LOG.info("Removed %r", datasetType.name)
_LOG.info("Removed dataset type %r", datasetType.name)

def getDatasetType(self, name: str) -> DatasetType:
# Docstring inherited from lsst.daf.butler.registry.Registry
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/registry/_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def removeDatasetType(self, name: str | tuple([str, ...])) -> None:
----------
name : `str` or `tuple([str, ...])`
Name of the type to be removed or tuple containing a list of type
names to be removed.
names to be removed. Wildcards are allowed.
Raises
------
Expand Down
8 changes: 4 additions & 4 deletions tests/test_cliCmdQueryDatasetTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def testRemoveDatasetTypes(self):
],
)

# checks wildcard / literal combination
# Check wildcard / literal combination.
result = runner.invoke(cli, ["remove-dataset-type", "here", "*other", "testA"])
self.assertEqual(result.exit_code, 0, clickResultMsg(result))
self.assertDatasetTypes(
Expand All @@ -201,7 +201,7 @@ def testRemoveDatasetTypes(self):
),
)

# checks literal / literal combination
# Check literal / literal combination.
result = runner.invoke(cli, ["remove-dataset-type", "here", "option", "testB"])
self.assertEqual(result.exit_code, 0, clickResultMsg(result))
self.assertDatasetTypes(
Expand All @@ -216,7 +216,7 @@ def testRemoveDatasetTypes(self):
),
)

# checks wildcard
# Check wildcard.
result = runner.invoke(cli, ["remove-dataset-type", "here", "test*"])
self.assertEqual(result.exit_code, 0, clickResultMsg(result))
self.assertDatasetTypes(
Expand All @@ -228,7 +228,7 @@ def testRemoveDatasetTypes(self):
),
)

# checks literal
# Check literal.
result = runner.invoke(cli, ["remove-dataset-type", "here", "option2"])
self.assertEqual(result.exit_code, 0, clickResultMsg(result))
self.assertDatasetTypes(runner, "*", ("placeholder",))
Expand Down

0 comments on commit edf2cf3

Please sign in to comment.