diff --git a/dbt_semantic_interfaces/implementations/element_config.py b/dbt_semantic_interfaces/implementations/element_config.py index 0da5e278..d8ec41dd 100644 --- a/dbt_semantic_interfaces/implementations/element_config.py +++ b/dbt_semantic_interfaces/implementations/element_config.py @@ -4,15 +4,15 @@ from typing_extensions import override from dbt_semantic_interfaces.implementations.base import HashableBaseModel -from dbt_semantic_interfaces.protocols.meta import PydanticSemanticLayerElementConfig +from dbt_semantic_interfaces.protocols.meta import SemanticLayerElementConfig from dbt_semantic_interfaces.protocols.protocol_hint import ProtocolHint -class SemanticLayerElementConfig(HashableBaseModel, ProtocolHint[PydanticSemanticLayerElementConfig]): +class PydanticSemanticLayerElementConfig(HashableBaseModel, ProtocolHint[SemanticLayerElementConfig]): """PydanticDimension config.""" @override - def _implements_protocol(self) -> PydanticSemanticLayerElementConfig: # noqa: D + def _implements_protocol(self) -> SemanticLayerElementConfig: # noqa: D return self meta: Dict[str, Any] = Field(default_factory=dict) diff --git a/dbt_semantic_interfaces/implementations/elements/dimension.py b/dbt_semantic_interfaces/implementations/elements/dimension.py index ddbcdca9..a4cb5a03 100644 --- a/dbt_semantic_interfaces/implementations/elements/dimension.py +++ b/dbt_semantic_interfaces/implementations/elements/dimension.py @@ -7,7 +7,7 @@ ModelWithMetadataParsing, ) from dbt_semantic_interfaces.implementations.element_config import ( - SemanticLayerElementConfig, + PydanticSemanticLayerElementConfig, ) from dbt_semantic_interfaces.implementations.metadata import PydanticMetadata from dbt_semantic_interfaces.references import ( @@ -51,7 +51,7 @@ class PydanticDimension(HashableBaseModel, ModelWithMetadataParsing): expr: Optional[str] = None metadata: Optional[PydanticMetadata] label: Optional[str] = None - config: Optional[SemanticLayerElementConfig] + config: Optional[PydanticSemanticLayerElementConfig] @property def reference(self) -> DimensionReference: # noqa: D diff --git a/dbt_semantic_interfaces/implementations/elements/entity.py b/dbt_semantic_interfaces/implementations/elements/entity.py index 2496eaea..9a6557e8 100644 --- a/dbt_semantic_interfaces/implementations/elements/entity.py +++ b/dbt_semantic_interfaces/implementations/elements/entity.py @@ -7,7 +7,7 @@ ModelWithMetadataParsing, ) from dbt_semantic_interfaces.implementations.element_config import ( - SemanticLayerElementConfig, + PydanticSemanticLayerElementConfig, ) from dbt_semantic_interfaces.implementations.metadata import PydanticMetadata from dbt_semantic_interfaces.references import EntityReference @@ -24,7 +24,7 @@ class PydanticEntity(HashableBaseModel, ModelWithMetadataParsing): expr: Optional[str] = None metadata: Optional[PydanticMetadata] = None label: Optional[str] = None - config: Optional[SemanticLayerElementConfig] + config: Optional[PydanticSemanticLayerElementConfig] @property def reference(self) -> EntityReference: # noqa: D diff --git a/dbt_semantic_interfaces/implementations/elements/measure.py b/dbt_semantic_interfaces/implementations/elements/measure.py index 08b39db0..f3c88c00 100644 --- a/dbt_semantic_interfaces/implementations/elements/measure.py +++ b/dbt_semantic_interfaces/implementations/elements/measure.py @@ -7,7 +7,7 @@ ModelWithMetadataParsing, ) from dbt_semantic_interfaces.implementations.element_config import ( - SemanticLayerElementConfig, + PydanticSemanticLayerElementConfig, ) from dbt_semantic_interfaces.implementations.metadata import PydanticMetadata from dbt_semantic_interfaces.references import MeasureReference @@ -49,7 +49,7 @@ class PydanticMeasure(HashableBaseModel, ModelWithMetadataParsing): non_additive_dimension: Optional[PydanticNonAdditiveDimensionParameters] = None agg_time_dimension: Optional[str] = None label: Optional[str] = None - config: Optional[SemanticLayerElementConfig] = None + config: Optional[PydanticSemanticLayerElementConfig] = None @property def reference(self) -> MeasureReference: # noqa: D diff --git a/dbt_semantic_interfaces/protocols/dimension.py b/dbt_semantic_interfaces/protocols/dimension.py index bcebac4e..f0ac3b67 100644 --- a/dbt_semantic_interfaces/protocols/dimension.py +++ b/dbt_semantic_interfaces/protocols/dimension.py @@ -3,7 +3,7 @@ from abc import abstractmethod from typing import Optional, Protocol -from dbt_semantic_interfaces.protocols.meta import PydanticSemanticLayerElementConfig +from dbt_semantic_interfaces.protocols.meta import SemanticLayerElementConfig from dbt_semantic_interfaces.protocols.metadata import Metadata from dbt_semantic_interfaces.references import ( DimensionReference, @@ -111,5 +111,5 @@ def label(self) -> Optional[str]: @property @abstractmethod - def config(self) -> Optional[PydanticSemanticLayerElementConfig]: # noqa: D + def config(self) -> Optional[SemanticLayerElementConfig]: # noqa: D pass diff --git a/dbt_semantic_interfaces/protocols/entity.py b/dbt_semantic_interfaces/protocols/entity.py index ff0b1703..27719d1a 100644 --- a/dbt_semantic_interfaces/protocols/entity.py +++ b/dbt_semantic_interfaces/protocols/entity.py @@ -3,7 +3,7 @@ from abc import abstractmethod from typing import Optional, Protocol -from dbt_semantic_interfaces.protocols.meta import PydanticSemanticLayerElementConfig +from dbt_semantic_interfaces.protocols.meta import SemanticLayerElementConfig from dbt_semantic_interfaces.references import EntityReference from dbt_semantic_interfaces.type_enums import EntityType @@ -64,5 +64,5 @@ def label(self) -> Optional[str]: @property @abstractmethod - def config(self) -> Optional[PydanticSemanticLayerElementConfig]: # noqa: D + def config(self) -> Optional[SemanticLayerElementConfig]: # noqa: D pass diff --git a/dbt_semantic_interfaces/protocols/measure.py b/dbt_semantic_interfaces/protocols/measure.py index 7f4dead5..7d8606f8 100644 --- a/dbt_semantic_interfaces/protocols/measure.py +++ b/dbt_semantic_interfaces/protocols/measure.py @@ -3,7 +3,7 @@ from abc import abstractmethod from typing import Optional, Protocol, Sequence -from dbt_semantic_interfaces.protocols.meta import PydanticSemanticLayerElementConfig +from dbt_semantic_interfaces.protocols.meta import SemanticLayerElementConfig from dbt_semantic_interfaces.references import MeasureReference from dbt_semantic_interfaces.type_enums import AggregationType @@ -102,5 +102,5 @@ def label(self) -> Optional[str]: @property @abstractmethod - def config(self) -> Optional[PydanticSemanticLayerElementConfig]: # noqa: D + def config(self) -> Optional[SemanticLayerElementConfig]: # noqa: D pass diff --git a/dbt_semantic_interfaces/protocols/meta.py b/dbt_semantic_interfaces/protocols/meta.py index ec4b06e1..08a1eef8 100644 --- a/dbt_semantic_interfaces/protocols/meta.py +++ b/dbt_semantic_interfaces/protocols/meta.py @@ -2,7 +2,7 @@ from typing import Any, Dict, Protocol -class PydanticSemanticLayerElementConfig(Protocol): # noqa: D +class SemanticLayerElementConfig(Protocol): # noqa: D """The config property allows you to configure additional resources/metadata.""" @property diff --git a/tests/test_implements_satisfy_protocols.py b/tests/test_implements_satisfy_protocols.py index aa45ff44..7f8be744 100644 --- a/tests/test_implements_satisfy_protocols.py +++ b/tests/test_implements_satisfy_protocols.py @@ -4,7 +4,7 @@ from hypothesis.strategies import booleans, builds, from_type, just, lists, none, text from dbt_semantic_interfaces.implementations.element_config import ( - SemanticLayerElementConfig, + PydanticSemanticLayerElementConfig, ) from dbt_semantic_interfaces.implementations.elements.dimension import ( PydanticDimension, @@ -68,7 +68,7 @@ expr=OPTIONAL_STR_STRATEGY, metadata=OPTIONAL_METADATA_STRATEGY, label=OPTIONAL_STR_STRATEGY, - config=builds(SemanticLayerElementConfig), + config=builds(PydanticSemanticLayerElementConfig), ) DIMENSION_VALIDITY_PARAMS_STRATEGY = builds( @@ -85,7 +85,7 @@ expr=OPTIONAL_STR_STRATEGY, metadata=OPTIONAL_METADATA_STRATEGY, label=OPTIONAL_STR_STRATEGY, - config=builds(SemanticLayerElementConfig), + config=builds(PydanticSemanticLayerElementConfig), ) DIMENSION_STRATEGY = TIME_DIMENSION_STRATEGY | CATEGORICAL_DIMENSION_STRATEGY @@ -97,7 +97,7 @@ expr=OPTIONAL_STR_STRATEGY, metadata=OPTIONAL_METADATA_STRATEGY, label=OPTIONAL_STR_STRATEGY, - config=builds(SemanticLayerElementConfig), + config=builds(PydanticSemanticLayerElementConfig), ) MEASURE_STRATEGY = builds( @@ -109,7 +109,7 @@ non_additive_dimesnion=builds(PydanticNonAdditiveDimensionParameters) | none(), agg_time_dimension=OPTIONAL_STR_STRATEGY, label=OPTIONAL_STR_STRATEGY, - config=builds(SemanticLayerElementConfig), + config=builds(PydanticSemanticLayerElementConfig), ) SEMANTIC_MODEL_STRATEGY = builds(