synthpic2.recipe.registries

Module for registries and Registry class, used to register recipe components.

Submodules

Package Contents

Classes

Registry

Registry for objects.

SelfRegisteringAttrsMixin

Mixin for attrs classes, so that they register themselves in a predefined

Functions

clear_all_registries(→ None)

Attributes

CRITERION_REGISTRY

FEATURE_VARIABILITY_REGISTRY

GEOMETRY_PROTOTYPE_REGISTRY

MATERIAL_PROTOTYPE_REGISTRY

MEASUREMENT_TECHNIQUE_BLUEPRINT_REGISTRY

MEASUREMENT_TECHNIQUE_PROTOTYPE_REGISTRY

MEASUREMENT_TECHNIQUE_REGISTRY

PARTICLE_BLUEPRINT_REGISTRY

PARTICLE_REGISTRY

REGISTRIES

SET_REGISTRY

STATE_REGISTRY

synthpic2.recipe.registries.clear_all_registries() None
synthpic2.recipe.registries.CRITERION_REGISTRY
synthpic2.recipe.registries.FEATURE_VARIABILITY_REGISTRY
synthpic2.recipe.registries.GEOMETRY_PROTOTYPE_REGISTRY
synthpic2.recipe.registries.MATERIAL_PROTOTYPE_REGISTRY
synthpic2.recipe.registries.MEASUREMENT_TECHNIQUE_BLUEPRINT_REGISTRY
synthpic2.recipe.registries.MEASUREMENT_TECHNIQUE_PROTOTYPE_REGISTRY
synthpic2.recipe.registries.MEASUREMENT_TECHNIQUE_REGISTRY
synthpic2.recipe.registries.PARTICLE_BLUEPRINT_REGISTRY
synthpic2.recipe.registries.PARTICLE_REGISTRY
synthpic2.recipe.registries.REGISTRIES
synthpic2.recipe.registries.SET_REGISTRY
synthpic2.recipe.registries.STATE_REGISTRY
class synthpic2.recipe.registries.Registry(name: str | None = None)

Registry for objects.

clear() None
register(item: Any) None

Register a new item.

Args:

item (Any): item to be registered

validate(item: Any) None

Validate a new item.

Args:

item (Any): item to be validated

query(name: Index | None, strict: bool = False) Any

Return an item with a given name from the registry.

Args:

name (Index): name or integer index of the desired item, optional strict (bool): if True, then an error will be raised if the item is not

found in the registry

Returns:
Optional[_Prototype]: Item or None, if the item does not exist in the

registry.

delete_item(index: Index) None
__iter__() Iterator
__next__() Any
__getitem__(index: Index | None) Any
__len__() int
__contains__(name: str) bool
class synthpic2.recipe.registries.SelfRegisteringAttrsMixin

Bases: abc.ABC

Mixin for attrs classes, so that they register themselves in a predefined registry, after they have been initialized.

abstract property _registry: synthpic2.recipe.registries.registry.Registry
__attrs_post_init__() None