Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove embedded module #380

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions airbyte_cdk/sources/embedded/__init__.py

This file was deleted.

61 changes: 0 additions & 61 deletions airbyte_cdk/sources/embedded/base_integration.py

This file was deleted.

57 changes: 0 additions & 57 deletions airbyte_cdk/sources/embedded/catalog.py

This file was deleted.

57 changes: 0 additions & 57 deletions airbyte_cdk/sources/embedded/runner.py

This file was deleted.

27 changes: 0 additions & 27 deletions airbyte_cdk/sources/embedded/tools.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,41 @@

import pytest

from airbyte_cdk.models import Type
from airbyte_cdk.models import (
ConfiguredAirbyteCatalog,
ConfiguredAirbyteStream,
DestinationSyncMode,
Type,
)
from airbyte_cdk.sources.declarative.concurrent_declarative_source import (
ConcurrentDeclarativeSource,
)
from airbyte_cdk.sources.embedded.catalog import (
to_configured_catalog,
to_configured_stream,
)
from airbyte_cdk.test.mock_http import HttpMocker, HttpRequest, HttpResponse
from airbyte_cdk.utils.traced_exception import AirbyteTracedException


def to_configured_stream(
stream,
sync_mode=None,
destination_sync_mode=DestinationSyncMode.append,
cursor_field=None,
primary_key=None,
) -> ConfiguredAirbyteStream:
return ConfiguredAirbyteStream(
stream=stream,
sync_mode=sync_mode,
destination_sync_mode=destination_sync_mode,
cursor_field=cursor_field,
primary_key=primary_key,
)


def to_configured_catalog(
configured_streams,
) -> ConfiguredAirbyteCatalog:
return ConfiguredAirbyteCatalog(streams=configured_streams)


_CONFIG = {
"start_date": "2024-07-01T00:00:00.000Z",
"custom_streams": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

import pytest

from airbyte_cdk.models import Type
from airbyte_cdk.models import (
ConfiguredAirbyteCatalog,
ConfiguredAirbyteStream,
DestinationSyncMode,
Type,
)
from airbyte_cdk.sources.declarative.concurrent_declarative_source import (
ConcurrentDeclarativeSource,
)
Expand All @@ -17,13 +22,32 @@
ComponentMappingDefinition,
HttpComponentsResolver,
)
from airbyte_cdk.sources.embedded.catalog import (
to_configured_catalog,
to_configured_stream,
)
from airbyte_cdk.test.mock_http import HttpMocker, HttpRequest, HttpResponse
from airbyte_cdk.utils.traced_exception import AirbyteTracedException


def to_configured_stream(
stream,
sync_mode=None,
destination_sync_mode=DestinationSyncMode.append,
cursor_field=None,
primary_key=None,
) -> ConfiguredAirbyteStream:
return ConfiguredAirbyteStream(
stream=stream,
sync_mode=sync_mode,
destination_sync_mode=destination_sync_mode,
cursor_field=cursor_field,
primary_key=primary_key,
)


def to_configured_catalog(
configured_streams,
) -> ConfiguredAirbyteCatalog:
return ConfiguredAirbyteCatalog(streams=configured_streams)


_CONFIG = {"start_date": "2024-07-01T00:00:00.000Z"}

_MANIFEST = {
Expand Down
Loading
Loading