phenotypic.abc_.FigureSpec#

class phenotypic.abc_.FigureSpec(title: str, section: str, controls: dict[str, Control], description: Any, primary: bool, name: str, method: Callable[..., 'go.Figure'], wants_subject: bool, subject_param: str | None, order: int)[source]#

Bases: object

Introspectable metadata attached to a @figure method.

Author-supplied fields come from the decorator call; the rest are derived by the decorator from the wrapped method’s signature.

Parameters:
  • title (str)

  • section (str)

  • controls (dict[str, Control])

  • description (Any)

  • primary (bool)

  • name (str)

  • method (Callable[..., 'go.Figure'])

  • wants_subject (bool)

  • subject_param (str | None)

  • order (int)

title#

Figure title (author).

Type:

str

section#

Flat grouping tag → one collapsible card (author).

Type:

str

controls#

{method-kwarg: Control} (author).

Type:

dict[str, Control]

description#

Optional interpretive block, e.g. a PanelDescription (author). Typed Any to keep this module dependency-free.

Type:

Any

primary#

Marks the figure returned by FigureProvider.inspect() (author).

Type:

bool

name#

The method’s __name__ (decorator).

Type:

str

method#

The wrapped, auto-styled callable (decorator).

Type:

Callable[…, ‘go.Figure’]

wants_subject#

Whether the method takes a subject as its first positional parameter (decorator).

Type:

bool

subject_param#

Name of that subject parameter, or None (decorator).

Type:

str | None

order#

Definition-order index used to sort figures (decorator).

Type:

int

Methods

__init__

Attributes

title: str#
section: str#
controls: dict[str, Control]#
description: Any#
primary: bool#
name: str#
method: Callable[..., 'go.Figure']#
wants_subject: bool#
subject_param: str | None#
order: int#