fix(ingest/slack): tweak docs for slack source (#10007)

This commit is contained in:
Harshal Sheth 2024-03-11 14:14:25 -07:00 committed by GitHub
parent 7540e642a5
commit bcae7acc51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,11 +16,7 @@ from datahub.ingestion.api.decorators import (
platform_name,
support_status,
)
from datahub.ingestion.api.source import (
SourceReport,
TestableSource,
TestConnectionReport,
)
from datahub.ingestion.api.source import Source, SourceReport
from datahub.ingestion.api.workunit import MetadataWorkUnit
from datahub.metadata.schema_classes import (
CorpUserEditableInfoClass,
@ -89,10 +85,10 @@ class SlackSourceReport(SourceReport):
PLATFORM_NAME = "slack"
@platform_name(PLATFORM_NAME)
@platform_name("Slack")
@config_class(SlackSourceConfig)
@support_status(SupportStatus.TESTING)
class SlackSource(TestableSource):
class SlackSource(Source):
def __init__(self, ctx: PipelineContext, config: SlackSourceConfig):
self.ctx = ctx
self.config = config
@ -107,10 +103,6 @@ class SlackSource(TestableSource):
config = SlackSourceConfig.parse_obj(config_dict)
return cls(ctx, config)
@staticmethod
def test_connection(config_dict: dict) -> TestConnectionReport:
raise NotImplementedError("This class does not implement this method")
def get_slack_client(self) -> WebClient:
return WebClient(token=self.config.bot_token.get_secret_value())