Skip to content

Commit

Permalink
fix(ingest): fix docs build
Browse files Browse the repository at this point in the history
Was broken by 1565fb0
  • Loading branch information
hsheth2 committed Jul 16, 2024
1 parent 298c299 commit b898a98
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions metadata-ingestion/scripts/modeldocgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
from dataclasses import Field, dataclass, field
from enum import auto
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple, Iterable
from typing import Any, Dict, Iterable, List, Optional, Tuple

import avro.schema
import click

from datahub.configuration.common import ConfigEnum, ConfigModel
from datahub.configuration.common import ConfigEnum, PermissiveConfigModel
from datahub.emitter.mce_builder import make_data_platform_urn, make_dataset_urn
from datahub.emitter.mcp import MetadataChangeProposalWrapper
from datahub.emitter.rest_emitter import DatahubRestEmitter
Expand All @@ -22,7 +22,9 @@
from datahub.ingestion.extractor.schema_util import avro_schema_to_mce_fields
from datahub.ingestion.sink.file import FileSink, FileSinkConfig
from datahub.metadata.schema_classes import (
BrowsePathEntryClass,
BrowsePathsClass,
BrowsePathsV2Class,
DatasetPropertiesClass,
DatasetSnapshotClass,
ForeignKeyConstraintClass,
Expand All @@ -34,8 +36,6 @@
StringTypeClass,
SubTypesClass,
TagAssociationClass,
BrowsePathsV2Class,
BrowsePathEntryClass,
)

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -493,30 +493,29 @@ def strip_types(field_path: str) -> str:
],
)


@dataclass
class EntityAspectName:
entityName: str
aspectName: str


@dataclass
class AspectPluginConfig:
class AspectPluginConfig(PermissiveConfigModel):
className: str
enabled: bool
supportedEntityAspectNames: List[EntityAspectName]
packageScan: Optional[List[str]] = None
supportedOperations: Optional[List[str]] = None


@dataclass
class PluginConfiguration:
class PluginConfiguration(PermissiveConfigModel):
aspectPayloadValidators: Optional[List[AspectPluginConfig]] = None
mutationHooks: Optional[List[AspectPluginConfig]] = None
mclSideEffects: Optional[List[AspectPluginConfig]] = None
mcpSideEffects: Optional[List[AspectPluginConfig]] = None


class EntityRegistry(ConfigModel):
class EntityRegistry(PermissiveConfigModel):
entities: List[EntityDefinition]
events: Optional[List[EventDefinition]]
plugins: Optional[PluginConfiguration] = None
Expand Down

0 comments on commit b898a98

Please sign in to comment.