ComponentSpec#

class scikitplot.corpus.ComponentSpec(name, category, implementation, status=CapabilityStatus.UNKNOWN, reason_code=None, aliases=(), optional_dependencies=(), capabilities=<factory>, config_type=None, version=None)[source]#

Everything the catalog knows about one component.

Parameters:
namestr

Registry key, e.g. "sentence" or "annoy".

categorystr

Component category, e.g. "chunker", "index", "reader".

implementationstr

Fully-qualified class path, for provenance.

statusCapabilityStatus, optional

Whether the component is usable. UNKNOWN when the registry offers no probe – which is honest, and different from claiming availability.

reason_codestr or None, optional

Stable machine-readable reason, None when AVAILABLE.

aliasestuple of str, optional

Alternative names accepted at call sites but not separate entries.

optional_dependenciestuple of str, optional

Distributions this component needs.

capabilitiesdict, optional

Declared properties, e.g. an index backend’s metric and score_semantics.

config_typestr or None, optional

Name of the configuration class this component accepts.

versionstr or None, optional

Version of the providing distribution.

Parameters:

Notes

Developer. frozen=True: a spec describes a registration as observed at snapshot time. Mutating it would let a catalog disagree with the registry it was built from.

aliases: tuple[str, ...] = ()#
property available: bool#

Whether the component is usable now.

Notes

Derived from status, which is the authority. UNKNOWN is not available: an unprobed component must not be reported as usable.

capabilities: dict[str, Any][source]#
category: str[source]#
config_type: str | None = None#
implementation: str[source]#
name: str[source]#
optional_dependencies: tuple[str, ...] = ()#
reason_code: str | None = None#
status: CapabilityStatus = 'unknown'[source]#
to_dict()[source]#

Return a JSON-compatible mapping.

Return type:

dict[str, Any]

version: str | None = None#