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-46496: Include advanced query system objects in docs #1099

Merged
merged 2 commits into from
Oct 17, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions doc/lsst.daf.butler/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ Python API reference
:no-inherited-members:
:skip: RegistryConfig

Advanced query system
---------------------

.. automodapi:: lsst.daf.butler.queries
:headings: ^"
:no-main-docstr:

.. automodapi:: lsst.daf.butler.queries.expression_factory
:headings: ^"
:no-main-docstr:

Example datastores
------------------

Expand Down Expand Up @@ -173,6 +184,17 @@ Datastore utilities
:headings: ^"
:skip: Datastore

Advanced query system internals
-------------------------------

.. automodapi:: lsst.daf.butler.queries.tree
:no-main-docstr:
:no-inherited-members:
:headings: ^"
:include: Predicate
:skip: DataCoordinateUploadKey
:skip: MaterializationKey

Registry utilities and interfaces
---------------------------------

Expand Down
3 changes: 2 additions & 1 deletion python/lsst/daf/butler/queries/_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Query(QueryBase):
Notes
-----
`Query` objects should never be constructed directly by users; use
`Butler._query` instead.
`Butler.query` instead.

A `Query` object represents the first stage of query construction, in which
constraints and joins are defined (roughly corresponding to the WHERE and
Expand Down Expand Up @@ -135,6 +135,7 @@ def constraint_dimensions(self) -> DimensionGroup:
@property
def expression_factory(self) -> ExpressionFactory:
"""A factory for column expressions using overloaded operators.
(`~lsst.daf.butler.queries.expression_factory.ExpressionFactory`).

Notes
-----
Expand Down
5 changes: 2 additions & 3 deletions python/lsst/daf/butler/queries/tree/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
from ._column_literal import *
from ._column_reference import *
from ._column_set import *
from ._predicate import LogicalNot as _LogicalNot
from ._predicate import *
from ._predicate import LogicalNot
from ._query_tree import *

LogicalNot.model_rebuild()
del LogicalNot
timj marked this conversation as resolved.
Show resolved Hide resolved
_LogicalNot.model_rebuild()

Predicate.model_rebuild()
Loading