Skip to content

Commit

Permalink
fix(ingest): fix docs build (datahub-project#10926)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored and aviv-julienjehannet committed Jul 25, 2024
1 parent ff76d07 commit df81cd1
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 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]
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 df81cd1

Please sign in to comment.