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.
UNKNOWNwhen the registry offers no probe – which is honest, and different from claiming availability.- reason_codestr or None, optional
Stable machine-readable reason,
NonewhenAVAILABLE.- 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
metricandscore_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.- property available: bool#
Whether the component is usable now.
Notes
Derived from
status, which is the authority.UNKNOWNis not available: an unprobed component must not be reported as usable.
- status: CapabilityStatus = 'unknown'[source]#