Skip to content

Commit

Permalink
[docs] fix API xreferences in tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
gipert committed Nov 26, 2024
1 parent c7cb940 commit 257799d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ temporary (i.e. not preserved across system reboots) directory.
it or, alternatively, as an argument to the :class:`~.core.LegendMetadata`
constructor. Recommended if a custom legend-metadata_ is needed.

:class:`~.core.LegendMetadata` is a :class:`~.textdb.textdb` object, which
:class:`~.core.LegendMetadata` is a :class:`~.textdb.TextDB` object, which
implements an interface to a database of text files arbitrary scattered in a
filesystem. ``TextDB`` does not assume any directory structure or file naming.

Expand Down Expand Up @@ -83,7 +83,7 @@ Mappings of metadata to time periods, data taking systems etc. are specified
through YAML files (`specification
<https://legend-exp.github.io/legend-data-format-specs/dev/metadata>`_).
If a ``validity.yaml`` file is present in a directory, ``TextDB``
exposes the :meth:`~.textdb.textdb.on` interface to perform a query.
exposes the :meth:`~.textdb.TextDB.on` interface to perform a query.

Let's assume the ``legend-metadata`` directory from the example above contains
the following file:
Expand Down Expand Up @@ -151,7 +151,7 @@ channel map:
Remapping and grouping metadata
-------------------------------

A second important method of ``TextDB`` is :meth:`.textdb.map`, which allows to
A second important method of ``TextDB`` is :meth:`.TextDB.map`, which allows to
query ``(key, value)`` dictionaries with an alternative unique key defined in
``value``. A typical application is querying parameters in a channel map
corresponding to a certain DAQ channel:
Expand All @@ -167,10 +167,10 @@ corresponding to a certain DAQ channel:
...

If the requested key is not unique, an exception will be raised.
:meth:`.textdb.map` can, however, handle non-unique keys too and return a
:meth:`.TextDB.map` can, however, handle non-unique keys too and return a
dictionary of matching entries instead, keyed by an arbitrary integer to allow
further :meth:`.textdb.map` calls. The behavior is achieved by using
:meth:`.textdb.group` or by setting the ``unique`` argument flag. A typical
further :meth:`.TextDB.map` calls. The behavior is achieved by using
:meth:`.TextDB.group` or by setting the ``unique`` argument flag. A typical
application is retrieving all channels attached to the same CC4:

>>> chmap = lmeta.hardware.configuration.channelmaps.on(datetime.now())
Expand Down

0 comments on commit 257799d

Please sign in to comment.