synthpic2.recipe.process_conditions.feature_criteria
¶
Home of Criterion classes to construct sets from.
Module Contents¶
Classes¶
Mixin for attrs classes, so that they register themselves in a predefined |
|
Criterion, to check if a certain Feature of an object has an |
|
Criterion, to check if a certain Feature of an object has an |
|
Criterion, to check if a certain Feature of an object has an |
|
Criterion, to check if a certain Feature of an object has an |
|
Criterion, to check if a certain Feature of an object has an |
|
Criterion, to check if an object is of a certain type. |
|
Criterion that is always true. |
|
Criterion that is true, if the object is a particle and does not have a parent |
Functions¶
Attributes¶
- synthpic2.recipe.process_conditions.feature_criteria.FeatureOwner¶
- class synthpic2.recipe.process_conditions.feature_criteria.BaseCriterion¶
Bases:
synthpic2.recipe.registries.self_registering_attrs_mixin.SelfRegisteringAttrsMixin
Mixin for attrs classes, so that they register themselves in a predefined registry, after they have been initialized.
- property _registry: synthpic2.recipe.registries.Registry¶
- name: str¶
- abstract __call__(object_: FeatureOwner) bool ¶
- class synthpic2.recipe.process_conditions.feature_criteria.FeatureCriterion¶
Bases:
BaseCriterion
- Criterion, to check if a certain Feature of an object has an
expected_value.
The Feature is looked up based on the specified feature_name. If the object does not have the feature at all, then the default_return_value will be returned.
- feature_name: str¶
- default_return_value: bool¶
- _target_: str = 'synthpic2.recipe.precess_conditions.criteria.FeatureCriterion'¶
- __call__(object_: FeatureOwner) bool ¶
- abstract check(feature: synthpic2.recipe.prototypes.feature.Feature) bool ¶
- class synthpic2.recipe.process_conditions.feature_criteria.IsEqualTo¶
Bases:
FeatureCriterion
- Criterion, to check if a certain Feature of an object has an
expected_value.
The Feature is looked up based on the specified feature_name. If the object does not have the feature at all, then the default_return_value will be returned.
- comparand: Any¶
- check(feature: synthpic2.recipe.prototypes.feature.Feature) bool ¶
- class synthpic2.recipe.process_conditions.feature_criteria.IsSmallerThan¶
Bases:
FeatureCriterion
- Criterion, to check if a certain Feature of an object has an
expected_value.
The Feature is looked up based on the specified feature_name. If the object does not have the feature at all, then the default_return_value will be returned.
- comparand: Any¶
- check(feature: synthpic2.recipe.prototypes.feature.Feature) bool ¶
- class synthpic2.recipe.process_conditions.feature_criteria.IsGreaterThan¶
Bases:
FeatureCriterion
- Criterion, to check if a certain Feature of an object has an
expected_value.
The Feature is looked up based on the specified feature_name. If the object does not have the feature at all, then the default_return_value will be returned.
- comparand: Any¶
- check(feature: synthpic2.recipe.prototypes.feature.Feature) bool ¶
- class synthpic2.recipe.process_conditions.feature_criteria.ContainsString¶
Bases:
FeatureCriterion
- Criterion, to check if a certain Feature of an object has an
expected_value.
The Feature is looked up based on the specified feature_name. If the object does not have the feature at all, then the default_return_value will be returned.
- search_string: str¶
- check(feature: synthpic2.recipe.prototypes.feature.Feature) bool ¶
- class synthpic2.recipe.process_conditions.feature_criteria._IsType¶
Bases:
BaseCriterion
Criterion, to check if an object is of a certain type.
- type: Type¶
- __call__(object_: FeatureOwner) bool ¶
- class synthpic2.recipe.process_conditions.feature_criteria.AlwaysTrue¶
Bases:
BaseCriterion
Criterion that is always true.
- name: str = 'AlwaysTrue'¶
- __call__(object_: FeatureOwner) bool ¶
- class synthpic2.recipe.process_conditions.feature_criteria.IsUltimateParent¶
Bases:
BaseCriterion
Criterion that is true, if the object is a particle and does not have a parent object.
- name: str = 'IsUltimateParent'¶
- __call__(object_: FeatureOwner) bool ¶
- synthpic2.recipe.process_conditions.feature_criteria.register_premade_feature_criteria() None ¶