Feature Provider¶
This provider allows access to each project’s feature model, which describes the configurability of the project. The provider loads the feature models from the ConfigurableSystems repository.
Module for the FeatureProvider.
- exception varats.provider.feature.feature_model_provider.FeatureModelNotFound(project, fm_path)[source]¶
Bases:
FileNotFoundErrorException raised when the specified feature model could not be found.
- class varats.provider.feature.feature_model_provider.FeatureModelProvider(project)[source]¶
Bases:
ProviderProvider for accessing project related FeatureModels.
- fm_repository = 'https://github.com/se-sic/ConfigurableSystems.git'¶
- classmethod create_provider_for_project(project)[source]¶
Creates a provider instance for the given project if possible.
- Return type:
Optional[FeatureModelProvider]- Returns:
a provider instance for the given project if possible, otherwise,
None
- classmethod create_default_provider(project)[source]¶
Creates a default provider instance that can be used with any project.
- Return type:
- Returns:
a default provider instance
- get_feature_model_path(revision)[source]¶
Get the path to a feature model for a specific revision that describes the features of a project and their relationships. In case that no feature model exists None is returned.
- Parameters:
revision (
str) – of the project, specifying for which state of the project the feature model needs to be valid.- Return type:
Optional[Path]
Returns: a path to the corresponding feature model