Auto Summary Examples¶
These examples show .. badge-filter:: wrapping .. autosummary::
tables generated by sphinx.ext.autosummary. Badges are sourced
automatically from the Badges section in each object’s numpy-style
docstring — no hand-written RST is needed on the child pages.
Clicking a button in a filter row narrows the visible rows. Selections within the same row broaden matches (OR); selections across rows narrow them further (AND).
Flat badge list¶
The simplest form: a single comma-less list of badge IDs passed to
.. badge-filter::. Any active badge is matched with OR logic across
the whole list.
Return the sum of x and y. |
|
Sort items using an experimental in-place algorithm. |
|
Format value as a string using the old formatting rules. |
Grouped badge filter¶
When every badge ID carries a group:name prefix, the filter widget
automatically renders one row of buttons per group. The matching rule
becomes OR-within-group AND across-groups: selecting stability:stable
and stability:beta shows entries that have either stability badge,
while also selecting area:core further limits results to entries that
additionally carry the area:core badge.
Badge chips are appended to each row in the table in the same order they appear in the object’s docstring.
Process data records. |
|
Execute the processing pipeline. |
|
Return a beta preview of processed output. |
|
Validate records against a schema. |
|
Merge two datasets on a common key. |
|
Convert a list of records to a column-oriented dictionary. |
|
Return records that satisfy a predicate. |
Group visibility toggle¶
Adding :group-visibility-toggle: places an eye icon to the left of
each group label. Clicking the eye hides all badge chips for that group
from the table rows; clicking the now-closed eye restores them. The
filter buttons themselves are unaffected — hiding chips never changes
which rows are shown or hidden.
The example below also uses :group-hidden: area so the area
group starts hidden on page load. Click its eye icon to reveal the
area chips, or use the filter buttons as normal.
Process data records. |
|
Execute the processing pipeline. |
|
Return a beta preview of processed output. |
|
Validate records against a schema. |
|
Merge two datasets on a common key. |
|
Convert a list of records to a column-oriented dictionary. |
|
Return records that satisfy a predicate. |
Grouped filter with fixed badge order¶
Adding :badge-order-fixed: to a .. badge-filter:: directive forces
the badge chips displayed for each table entry to follow the canonical
order in which badge IDs are listed on the directive, rather than the order
they appear in the object’s docstring.
This makes mixed-order docstrings (e.g. stability:beta area:core vs
area:core stability:stable) render consistently across an entire table.
For example, DataProcessor.preview declares its badges as
stability:beta area:core in the source, but with :badge-order-fixed:
the chips appear as area:core stability:beta — matching the
area:… stability:… ordering declared on the filter below.
Process data records. |
|
Execute the processing pipeline. |
|
Return a beta preview of processed output. |
|
Validate records against a schema. |
|
Merge two datasets on a common key. |
|
Convert a list of records to a column-oriented dictionary. |
|
Return records that satisfy a predicate. |