Skip to content

Commit

Permalink
Make Butler.query_datasets and others public
Browse files Browse the repository at this point in the history
No tests yet.
  • Loading branch information
timj committed Sep 4, 2024
1 parent c111413 commit b2768f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions python/lsst/daf/butler/_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,7 @@ def query(self) -> AbstractContextManager[Query]:
"""
raise NotImplementedError()

def _query_data_ids(
def query_data_ids(
self,
dimensions: DimensionGroup | Iterable[str] | str,
*,
Expand Down Expand Up @@ -1563,7 +1563,7 @@ def _query_data_ids(
raise EmptyQueryResultError(list(result.explain_no_results()))
return data_ids

def _query_datasets(
def query_datasets(
self,
dataset_type: str | DatasetType,
collections: str | Iterable[str] | None = None,
Expand Down Expand Up @@ -1667,7 +1667,7 @@ def _query_datasets(
raise EmptyQueryResultError(list(result.explain_no_results()))
return refs

def _query_dimension_records(
def query_dimension_records(
self,
element: str,
*,
Expand Down
12 changes: 6 additions & 6 deletions python/lsst/daf/butler/tests/hybrid_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def registry(self) -> Registry:
def query(self) -> AbstractContextManager[Query]:
return self._remote_butler.query()

def _query_data_ids(
def query_data_ids(
self,
dimensions: DimensionGroup | Iterable[str] | str,
*,
Expand All @@ -349,7 +349,7 @@ def _query_data_ids(
explain: bool = True,
**kwargs: Any,
) -> list[DataCoordinate]:
return self._direct_butler._query_data_ids(
return self._direct_butler.query_data_ids(
dimensions,
data_id=data_id,
where=where,
Expand All @@ -362,7 +362,7 @@ def _query_data_ids(
**kwargs,
)

def _query_datasets(
def query_datasets(
self,
dataset_type: Any,
collections: str | Iterable[str] | None = None,
Expand All @@ -375,7 +375,7 @@ def _query_datasets(
explain: bool = True,
**kwargs: Any,
) -> list[DatasetRef]:
return self._direct_butler._query_datasets(
return self._direct_butler.query_datasets(
dataset_type,
collections,
find_first=find_first,
Expand All @@ -387,7 +387,7 @@ def _query_datasets(
**kwargs,
)

def _query_dimension_records(
def query_dimension_records(
self,
element: str,
*,
Expand All @@ -400,7 +400,7 @@ def _query_dimension_records(
explain: bool = True,
**kwargs: Any,
) -> list[DimensionRecord]:
return self._direct_butler._query_dimension_records(
return self._direct_butler.query_dimension_records(
element,
data_id=data_id,
where=where,
Expand Down

0 comments on commit b2768f4

Please sign in to comment.