Skip to content

Commit

Permalink
Merge branch 'Add_meta_to_measures,_entities,_and_dimensions' into co…
Browse files Browse the repository at this point in the history
…nsolidate_meta_config
  • Loading branch information
DevonFulcher committed Oct 24, 2024
2 parents 9315754 + ada4b16 commit 0241498
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions dbt_semantic_interfaces/implementations/element_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
from typing_extensions import override

from dbt_semantic_interfaces.implementations.base import HashableBaseModel
from dbt_semantic_interfaces.protocols.meta import ConfigMeta
from dbt_semantic_interfaces.protocols.meta import PydanticSemanticLayerElementConfig
from dbt_semantic_interfaces.protocols.protocol_hint import ProtocolHint


class SemanticLayerElementConfig(HashableBaseModel, ProtocolHint[ConfigMeta]):
class SemanticLayerElementConfig(HashableBaseModel, ProtocolHint[PydanticSemanticLayerElementConfig]):
"""PydanticDimension config."""

@override
def _implements_protocol(self) -> ConfigMeta: # noqa: D
def _implements_protocol(self) -> PydanticSemanticLayerElementConfig: # noqa: D
return self

meta: Dict[str, Any] = Field(default_factory=dict)
4 changes: 2 additions & 2 deletions dbt_semantic_interfaces/protocols/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from abc import abstractmethod
from typing import Optional, Protocol

from dbt_semantic_interfaces.protocols.meta import ConfigMeta
from dbt_semantic_interfaces.protocols.meta import PydanticSemanticLayerElementConfig
from dbt_semantic_interfaces.protocols.metadata import Metadata
from dbt_semantic_interfaces.references import (
DimensionReference,
Expand Down Expand Up @@ -111,5 +111,5 @@ def label(self) -> Optional[str]:

@property
@abstractmethod
def config(self) -> Optional[ConfigMeta]: # noqa: D
def config(self) -> Optional[PydanticSemanticLayerElementConfig]: # noqa: D
pass
4 changes: 2 additions & 2 deletions dbt_semantic_interfaces/protocols/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from abc import abstractmethod
from typing import Optional, Protocol

from dbt_semantic_interfaces.protocols.meta import ConfigMeta
from dbt_semantic_interfaces.protocols.meta import PydanticSemanticLayerElementConfig
from dbt_semantic_interfaces.references import EntityReference
from dbt_semantic_interfaces.type_enums import EntityType

Expand Down Expand Up @@ -64,5 +64,5 @@ def label(self) -> Optional[str]:

@property
@abstractmethod
def config(self) -> Optional[ConfigMeta]: # noqa: D
def config(self) -> Optional[PydanticSemanticLayerElementConfig]: # noqa: D
pass
4 changes: 2 additions & 2 deletions dbt_semantic_interfaces/protocols/measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from abc import abstractmethod
from typing import Optional, Protocol, Sequence

from dbt_semantic_interfaces.protocols.meta import ConfigMeta
from dbt_semantic_interfaces.protocols.meta import PydanticSemanticLayerElementConfig
from dbt_semantic_interfaces.references import MeasureReference
from dbt_semantic_interfaces.type_enums import AggregationType

Expand Down Expand Up @@ -102,5 +102,5 @@ def label(self) -> Optional[str]:

@property
@abstractmethod
def config(self) -> Optional[ConfigMeta]: # noqa: D
def config(self) -> Optional[PydanticSemanticLayerElementConfig]: # noqa: D
pass
2 changes: 1 addition & 1 deletion dbt_semantic_interfaces/protocols/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Any, Dict, Protocol


class ConfigMeta(Protocol): # noqa: D
class PydanticSemanticLayerElementConfig(Protocol): # noqa: D
"""The config property allows you to configure additional resources/metadata."""

@property
Expand Down

0 comments on commit 0241498

Please sign in to comment.