Skip to content

Commit

Permalink
Merge pull request #244 from dbt-labs/backport--243-to-0.4.latest
Browse files Browse the repository at this point in the history
[BACKPORT] #243 to 0.4.latest (wheel distribution fix)
  • Loading branch information
QMalcolm authored Jan 8, 2024
2 parents 653a177 + 3ef1761 commit 06f25e4
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240104-120817.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Ensure the pydantic shim is included in the wheel distribution
time: 2024-01-04T12:08:17.850576-08:00
custom:
Author: QMalcolm
Issue: "241"
2 changes: 1 addition & 1 deletion dbt_semantic_interfaces/dataclass_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from typing_extensions import TypeAlias

from dbt_semantic_interfaces.pretty_print import pformat_big_objects
from pydantic_shim import BaseModel, create_model
from dsi_pydantic_shim import BaseModel, create_model

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion dbt_semantic_interfaces/implementations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
PARSING_CONTEXT_KEY,
ParsingContext,
)
from pydantic_shim import BaseModel, root_validator
from dsi_pydantic_shim import BaseModel, root_validator

# Type alias for the implicit "Any" type used as input and output for Pydantic's parsing API
PydanticParseableValueType = Any # type: ignore[misc]
Expand Down
2 changes: 1 addition & 1 deletion dbt_semantic_interfaces/implementations/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from dbt_semantic_interfaces.type_enums.export_destination_type import (
ExportDestinationType,
)
from pydantic_shim import Field
from dsi_pydantic_shim import Field


class PydanticExportConfig(HashableBaseModel, ProtocolHint[ExportConfig]):
Expand Down
2 changes: 1 addition & 1 deletion dbt_semantic_interfaces/implementations/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
MetricType,
TimeGranularity,
)
from pydantic_shim import Field
from dsi_pydantic_shim import Field


class PydanticMetricInputMeasure(PydanticCustomInputParser, HashableBaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)
from dbt_semantic_interfaces.protocols import ProtocolHint
from dbt_semantic_interfaces.protocols.project_configuration import ProjectConfiguration
from pydantic_shim import validator
from dsi_pydantic_shim import validator


class PydanticProjectConfiguration(HashableBaseModel, ModelWithMetadataParsing, ProtocolHint[ProjectConfiguration]):
Expand Down
2 changes: 1 addition & 1 deletion dbt_semantic_interfaces/implementations/semantic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
SemanticModelReference,
TimeDimensionReference,
)
from pydantic_shim import validator
from dsi_pydantic_shim import validator


class NodeRelation(HashableBaseModel):
Expand Down
2 changes: 1 addition & 1 deletion dbt_semantic_interfaces/validations/validator_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
SemanticModelReference,
)
from dbt_semantic_interfaces.type_enums import DimensionType
from pydantic_shim import BaseModel, Extra
from dsi_pydantic_shim import BaseModel, Extra

VALIDATE_SAFELY_ERROR_STR_TMPLT = ". Issue occurred in method `{method_name}` called with {arguments_str}"
ValidationContextJSON = Dict[str, Union[str, int, None]]
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ exclude = [
"/tests",
]

[tool.hatch.build.targets.wheel]
packages = ["dbt_semantic_interfaces", "dsi_pydantic_shim.py"]

[tool.hatch.envs.dev-env.scripts]
all = ["pre-commit run --all-files"]

Expand Down

0 comments on commit 06f25e4

Please sign in to comment.