From 2671c2463c3d527a32ae8d55228571768cf1d77f Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants <36314070+artem1205@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:35:25 +0100 Subject: [PATCH] fix: fix sorting & __init__ imports (#189) Signed-off-by: Artem Inzhyyants --- airbyte_cdk/__init__.py | 127 +++++++++++++----- .../source_declarative_manifest/__init__.py | 1 - airbyte_cdk/models/__init__.py | 21 ++- .../declarative/async_job/job_orchestrator.py | 2 +- .../sources/declarative/auth/__init__.py | 7 +- .../sources/declarative/decoders/__init__.py | 22 ++- .../declarative/extractors/__init__.py | 12 +- .../declarative/incremental/__init__.py | 13 +- .../declarative/partition_routers/__init__.py | 22 ++- .../requesters/error_handlers/__init__.py | 24 +++- .../backoff_strategies/__init__.py | 4 +- .../requesters/paginators/__init__.py | 17 ++- .../paginators/strategies/__init__.py | 12 +- .../requesters/request_options/__init__.py | 15 ++- .../sources/declarative/resolvers/__init__.py | 39 ++++-- .../declarative/retrievers/__init__.py | 7 +- .../declarative/retrievers/async_retriever.py | 2 +- .../sources/declarative/schema/__init__.py | 16 ++- .../availability_strategy/__init__.py | 11 +- .../file_based/discovery_policy/__init__.py | 8 +- .../sources/file_based/file_types/__init__.py | 15 ++- .../schema_validation_policies/__init__.py | 4 +- .../stream/concurrent/cursor/__init__.py | 6 +- airbyte_cdk/sources/message/__init__.py | 8 +- airbyte_cdk/sources/streams/__init__.py | 2 +- .../sources/streams/checkpoint/__init__.py | 5 +- airbyte_cdk/sources/streams/http/__init__.py | 4 +- .../streams/http/error_handlers/__init__.py | 4 +- airbyte_cdk/test/mock_http/__init__.py | 2 +- airbyte_cdk/test/mock_http/mocker.py | 4 +- .../test/mock_http/response_builder.py | 2 +- airbyte_cdk/utils/__init__.py | 2 +- pyproject.toml | 2 - .../test_http_components_resolver.py | 6 +- .../test_helpers/__init__.py | 5 +- 35 files changed, 331 insertions(+), 122 deletions(-) diff --git a/airbyte_cdk/__init__.py b/airbyte_cdk/__init__.py index be2ea8563..262d162cc 100644 --- a/airbyte_cdk/__init__.py +++ b/airbyte_cdk/__init__.py @@ -48,27 +48,46 @@ # Once those issues are resolved, the below can be sorted with isort. import dunamai as _dunamai -from .destinations import Destination -from .models import AirbyteConnectionStatus, AirbyteMessage, ConfiguredAirbyteCatalog, Status, Type, FailureType, AirbyteStream, AdvancedAuth, DestinationSyncMode, ConnectorSpecification, OAuthConfigSpecification, OrchestratorType, ConfiguredAirbyteStream, SyncMode, AirbyteLogMessage, Level, AirbyteRecordMessage - -from .sources import Source -from .config_observation import create_connector_config_control_message, emit_configuration_as_airbyte_control_message +from .config_observation import ( + create_connector_config_control_message, + emit_configuration_as_airbyte_control_message, +) from .connector import BaseConnector, Connector - -from .entrypoint import launch, AirbyteEntrypoint - +from .destinations import Destination +from .entrypoint import AirbyteEntrypoint, launch from .logger import AirbyteLogFormatter, init_logger -from .sources import AbstractSource +from .models import ( + AdvancedAuth, + AirbyteConnectionStatus, + AirbyteLogMessage, + AirbyteMessage, + AirbyteRecordMessage, + AirbyteStream, + ConfiguredAirbyteCatalog, + ConfiguredAirbyteStream, + ConnectorSpecification, + DestinationSyncMode, + FailureType, + Level, + OAuthConfigSpecification, + OrchestratorType, + Status, + SyncMode, + Type, +) +from .sources import AbstractSource, Source from .sources.concurrent_source.concurrent_source import ConcurrentSource from .sources.concurrent_source.concurrent_source_adapter import ConcurrentSourceAdapter from .sources.config import BaseConfig -from .sources.types import Config, Record, StreamSlice from .sources.connector_state_manager import ConnectorStateManager from .sources.declarative.auth import DeclarativeOauth2Authenticator -from .sources.declarative.auth.declarative_authenticator import DeclarativeAuthenticator -from .sources.declarative.auth.declarative_authenticator import NoAuth +from .sources.declarative.auth.declarative_authenticator import DeclarativeAuthenticator, NoAuth from .sources.declarative.auth.oauth import DeclarativeSingleUseRefreshTokenOauth2Authenticator -from .sources.declarative.auth.token import BasicHttpAuthenticator, BearerAuthenticator, ApiKeyAuthenticator +from .sources.declarative.auth.token import ( + ApiKeyAuthenticator, + BasicHttpAuthenticator, + BearerAuthenticator, +) from .sources.declarative.datetime.min_max_datetime import MinMaxDatetime from .sources.declarative.declarative_stream import DeclarativeStream from .sources.declarative.decoders import Decoder, JsonDecoder @@ -77,48 +96,89 @@ from .sources.declarative.extractors.record_extractor import RecordExtractor from .sources.declarative.extractors.record_filter import RecordFilter from .sources.declarative.incremental import DatetimeBasedCursor -from .sources.declarative.interpolation import InterpolatedString, InterpolatedBoolean +from .sources.declarative.interpolation import InterpolatedBoolean, InterpolatedString from .sources.declarative.manifest_declarative_source import ManifestDeclarativeSource -from .sources.declarative.migrations.legacy_to_per_partition_state_migration import LegacyToPerPartitionStateMigration - -from .sources.declarative.partition_routers import CartesianProductStreamSlicer, SinglePartitionRouter, SubstreamPartitionRouter +from .sources.declarative.migrations.legacy_to_per_partition_state_migration import ( + LegacyToPerPartitionStateMigration, +) +from .sources.declarative.partition_routers import ( + CartesianProductStreamSlicer, + SinglePartitionRouter, + SubstreamPartitionRouter, +) from .sources.declarative.partition_routers.substream_partition_router import ParentStreamConfig -from .sources.declarative.requesters import Requester, HttpRequester - +from .sources.declarative.requesters import HttpRequester, Requester from .sources.declarative.requesters.error_handlers import BackoffStrategy from .sources.declarative.requesters.paginators import DefaultPaginator, PaginationStrategy -from .sources.declarative.requesters.paginators.strategies import OffsetIncrement, CursorPaginationStrategy, PageIncrement, StopConditionPaginationStrategyDecorator - +from .sources.declarative.requesters.paginators.strategies import ( + CursorPaginationStrategy, + OffsetIncrement, + PageIncrement, + StopConditionPaginationStrategyDecorator, +) from .sources.declarative.requesters.request_option import RequestOption, RequestOptionType - -from .sources.declarative.requesters.request_options.default_request_options_provider import DefaultRequestOptionsProvider -from .sources.declarative.requesters.request_options.interpolated_request_input_provider import InterpolatedRequestInputProvider +from .sources.declarative.requesters.request_options.default_request_options_provider import ( + DefaultRequestOptionsProvider, +) +from .sources.declarative.requesters.request_options.interpolated_request_input_provider import ( + InterpolatedRequestInputProvider, +) from .sources.declarative.requesters.requester import HttpMethod from .sources.declarative.retrievers import SimpleRetriever from .sources.declarative.schema import JsonFileSchemaLoader -from .sources.declarative.transformations.add_fields import AddFields, AddedFieldDefinition +from .sources.declarative.transformations.add_fields import AddedFieldDefinition, AddFields from .sources.declarative.transformations.transformation import RecordTransformation from .sources.declarative.types import FieldPointer from .sources.declarative.yaml_declarative_source import YamlDeclarativeSource from .sources.message import InMemoryMessageRepository, MessageRepository from .sources.source import TState from .sources.streams.availability_strategy import AvailabilityStrategy -from .sources.streams.call_rate import AbstractAPIBudget, HttpAPIBudget, HttpRequestMatcher, MovingWindowCallRatePolicy, Rate, CachedLimiterSession, LimiterSession +from .sources.streams.call_rate import ( + AbstractAPIBudget, + CachedLimiterSession, + HttpAPIBudget, + HttpRequestMatcher, + LimiterSession, + MovingWindowCallRatePolicy, + Rate, +) from .sources.streams.checkpoint import Cursor as LegacyCursor from .sources.streams.checkpoint import ResumableFullRefreshCursor from .sources.streams.concurrent.adapters import StreamFacade -from .sources.streams.concurrent.cursor import ConcurrentCursor, CursorField, FinalStateCursor -from .sources.streams.concurrent.cursor import Cursor -from .sources.streams.concurrent.state_converters.datetime_stream_state_converter import EpochValueConcurrentStreamStateConverter, IsoMillisConcurrentStreamStateConverter -from .sources.streams.core import Stream, IncrementalMixin, package_name_from_class +from .sources.streams.concurrent.cursor import ( + ConcurrentCursor, + Cursor, + CursorField, + FinalStateCursor, +) +from .sources.streams.concurrent.state_converters.datetime_stream_state_converter import ( + EpochValueConcurrentStreamStateConverter, + IsoMillisConcurrentStreamStateConverter, +) +from .sources.streams.core import IncrementalMixin, Stream, package_name_from_class from .sources.streams.http import HttpStream, HttpSubStream from .sources.streams.http.availability_strategy import HttpAvailabilityStrategy -from .sources.streams.http.exceptions import BaseBackoffException, DefaultBackoffException, UserDefinedBackoffException +from .sources.streams.http.exceptions import ( + BaseBackoffException, + DefaultBackoffException, + UserDefinedBackoffException, +) from .sources.streams.http.rate_limiting import default_backoff_handler -from .sources.streams.http.requests_native_auth import Oauth2Authenticator, TokenAuthenticator, SingleUseRefreshTokenOauth2Authenticator +from .sources.streams.http.requests_native_auth import ( + Oauth2Authenticator, + SingleUseRefreshTokenOauth2Authenticator, + TokenAuthenticator, +) from .sources.streams.http.requests_native_auth.abstract_token import AbstractHeaderAuthenticator +from .sources.types import Config, Record, StreamSlice from .sources.utils import casing -from .sources.utils.schema_helpers import InternalConfig, ResourceSchemaLoader, check_config_against_spec_or_exit, split_config, expand_refs +from .sources.utils.schema_helpers import ( + InternalConfig, + ResourceSchemaLoader, + check_config_against_spec_or_exit, + expand_refs, + split_config, +) from .sources.utils.transform import TransformConfig, TypeTransformer from .utils import AirbyteTracedException, is_cloud_environment from .utils.constants import ENV_REQUEST_CACHE_PATH @@ -127,7 +187,6 @@ from .utils.spec_schema_transformations import resolve_refs from .utils.stream_status_utils import as_airbyte_message - __all__ = [ # Availability strategy "AvailabilityStrategy", diff --git a/airbyte_cdk/cli/source_declarative_manifest/__init__.py b/airbyte_cdk/cli/source_declarative_manifest/__init__.py index 8a8d225eb..0ea86fa7b 100644 --- a/airbyte_cdk/cli/source_declarative_manifest/__init__.py +++ b/airbyte_cdk/cli/source_declarative_manifest/__init__.py @@ -1,6 +1,5 @@ from airbyte_cdk.cli.source_declarative_manifest._run import run - __all__ = [ "run", ] diff --git a/airbyte_cdk/models/__init__.py b/airbyte_cdk/models/__init__.py index 1105cbeda..3fa24be49 100644 --- a/airbyte_cdk/models/__init__.py +++ b/airbyte_cdk/models/__init__.py @@ -7,7 +7,6 @@ # of airbyte-cdk rather than a standalone package. from .airbyte_protocol import ( AdvancedAuth, - AirbyteStateStats, AirbyteAnalyticsTraceMessage, AirbyteCatalog, AirbyteConnectionStatus, @@ -22,13 +21,14 @@ AirbyteRecordMessage, AirbyteStateBlob, AirbyteStateMessage, + AirbyteStateStats, AirbyteStateType, AirbyteStream, AirbyteStreamState, AirbyteStreamStatus, - AirbyteStreamStatusTraceMessage, AirbyteStreamStatusReason, AirbyteStreamStatusReasonType, + AirbyteStreamStatusTraceMessage, AirbyteTraceMessage, AuthFlowType, ConfiguredAirbyteCatalog, @@ -48,6 +48,14 @@ TraceType, Type, ) +from .airbyte_protocol_serializers import ( + AirbyteMessageSerializer, + AirbyteStateMessageSerializer, + AirbyteStreamStateSerializer, + ConfiguredAirbyteCatalogSerializer, + ConfiguredAirbyteStreamSerializer, + ConnectorSpecificationSerializer, +) from .well_known_types import ( BinaryData, Boolean, @@ -61,12 +69,3 @@ TimeWithoutTimezone, TimeWithTimezone, ) - -from .airbyte_protocol_serializers import ( -AirbyteStreamStateSerializer, -AirbyteStateMessageSerializer, -AirbyteMessageSerializer, -ConfiguredAirbyteCatalogSerializer, -ConfiguredAirbyteStreamSerializer, -ConnectorSpecificationSerializer, -) \ No newline at end of file diff --git a/airbyte_cdk/sources/declarative/async_job/job_orchestrator.py b/airbyte_cdk/sources/declarative/async_job/job_orchestrator.py index d94885fa9..3938b8c07 100644 --- a/airbyte_cdk/sources/declarative/async_job/job_orchestrator.py +++ b/airbyte_cdk/sources/declarative/async_job/job_orchestrator.py @@ -20,7 +20,6 @@ TypeVar, ) -from airbyte_cdk import StreamSlice from airbyte_cdk.logger import lazy_log from airbyte_cdk.models import FailureType from airbyte_cdk.sources.declarative.async_job.job import AsyncJob @@ -31,6 +30,7 @@ from airbyte_cdk.sources.declarative.async_job.repository import AsyncJobRepository from airbyte_cdk.sources.declarative.async_job.status import AsyncJobStatus from airbyte_cdk.sources.message import MessageRepository +from airbyte_cdk.sources.types import StreamSlice from airbyte_cdk.utils.airbyte_secrets_utils import filter_secrets from airbyte_cdk.utils.traced_exception import AirbyteTracedException diff --git a/airbyte_cdk/sources/declarative/auth/__init__.py b/airbyte_cdk/sources/declarative/auth/__init__.py index a02f6f140..810437810 100644 --- a/airbyte_cdk/sources/declarative/auth/__init__.py +++ b/airbyte_cdk/sources/declarative/auth/__init__.py @@ -2,10 +2,7 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -from airbyte_cdk.sources.declarative.auth.oauth import DeclarativeOauth2Authenticator from airbyte_cdk.sources.declarative.auth.jwt import JwtAuthenticator +from airbyte_cdk.sources.declarative.auth.oauth import DeclarativeOauth2Authenticator -__all__ = [ - "DeclarativeOauth2Authenticator", - "JwtAuthenticator" -] +__all__ = ["DeclarativeOauth2Authenticator", "JwtAuthenticator"] diff --git a/airbyte_cdk/sources/declarative/decoders/__init__.py b/airbyte_cdk/sources/declarative/decoders/__init__.py index 7452fe998..2d91b8931 100644 --- a/airbyte_cdk/sources/declarative/decoders/__init__.py +++ b/airbyte_cdk/sources/declarative/decoders/__init__.py @@ -3,9 +3,25 @@ # from airbyte_cdk.sources.declarative.decoders.decoder import Decoder -from airbyte_cdk.sources.declarative.decoders.json_decoder import JsonDecoder, JsonlDecoder, IterableDecoder, GzipJsonDecoder +from airbyte_cdk.sources.declarative.decoders.json_decoder import ( + GzipJsonDecoder, + IterableDecoder, + JsonDecoder, + JsonlDecoder, +) from airbyte_cdk.sources.declarative.decoders.noop_decoder import NoopDecoder -from airbyte_cdk.sources.declarative.decoders.pagination_decoder_decorator import PaginationDecoderDecorator +from airbyte_cdk.sources.declarative.decoders.pagination_decoder_decorator import ( + PaginationDecoderDecorator, +) from airbyte_cdk.sources.declarative.decoders.xml_decoder import XmlDecoder -__all__ = ["Decoder", "JsonDecoder", "JsonlDecoder", "IterableDecoder", "GzipJsonDecoder", "NoopDecoder", "PaginationDecoderDecorator", "XmlDecoder"] +__all__ = [ + "Decoder", + "JsonDecoder", + "JsonlDecoder", + "IterableDecoder", + "GzipJsonDecoder", + "NoopDecoder", + "PaginationDecoderDecorator", + "XmlDecoder", +] diff --git a/airbyte_cdk/sources/declarative/extractors/__init__.py b/airbyte_cdk/sources/declarative/extractors/__init__.py index 76304b467..aacac6654 100644 --- a/airbyte_cdk/sources/declarative/extractors/__init__.py +++ b/airbyte_cdk/sources/declarative/extractors/__init__.py @@ -6,6 +6,14 @@ from airbyte_cdk.sources.declarative.extractors.http_selector import HttpSelector from airbyte_cdk.sources.declarative.extractors.record_filter import RecordFilter from airbyte_cdk.sources.declarative.extractors.record_selector import RecordSelector -from airbyte_cdk.sources.declarative.extractors.response_to_file_extractor import ResponseToFileExtractor +from airbyte_cdk.sources.declarative.extractors.response_to_file_extractor import ( + ResponseToFileExtractor, +) -__all__ = ["HttpSelector", "DpathExtractor", "RecordFilter", "RecordSelector", "ResponseToFileExtractor"] +__all__ = [ + "HttpSelector", + "DpathExtractor", + "RecordFilter", + "RecordSelector", + "ResponseToFileExtractor", +] diff --git a/airbyte_cdk/sources/declarative/incremental/__init__.py b/airbyte_cdk/sources/declarative/incremental/__init__.py index 11c1cba99..7ce54a07a 100644 --- a/airbyte_cdk/sources/declarative/incremental/__init__.py +++ b/airbyte_cdk/sources/declarative/incremental/__init__.py @@ -4,9 +4,16 @@ from airbyte_cdk.sources.declarative.incremental.datetime_based_cursor import DatetimeBasedCursor from airbyte_cdk.sources.declarative.incremental.declarative_cursor import DeclarativeCursor -from airbyte_cdk.sources.declarative.incremental.global_substream_cursor import GlobalSubstreamCursor -from airbyte_cdk.sources.declarative.incremental.per_partition_cursor import CursorFactory, PerPartitionCursor -from airbyte_cdk.sources.declarative.incremental.per_partition_with_global import PerPartitionWithGlobalCursor +from airbyte_cdk.sources.declarative.incremental.global_substream_cursor import ( + GlobalSubstreamCursor, +) +from airbyte_cdk.sources.declarative.incremental.per_partition_cursor import ( + CursorFactory, + PerPartitionCursor, +) +from airbyte_cdk.sources.declarative.incremental.per_partition_with_global import ( + PerPartitionWithGlobalCursor, +) from airbyte_cdk.sources.declarative.incremental.resumable_full_refresh_cursor import ( ChildPartitionResumableFullRefreshCursor, ResumableFullRefreshCursor, diff --git a/airbyte_cdk/sources/declarative/partition_routers/__init__.py b/airbyte_cdk/sources/declarative/partition_routers/__init__.py index 4e51ff657..f35647402 100644 --- a/airbyte_cdk/sources/declarative/partition_routers/__init__.py +++ b/airbyte_cdk/sources/declarative/partition_routers/__init__.py @@ -2,12 +2,22 @@ # Copyright (c) 2022 Airbyte, Inc., all rights reserved. # -from airbyte_cdk.sources.declarative.partition_routers.async_job_partition_router import AsyncJobPartitionRouter -from airbyte_cdk.sources.declarative.partition_routers.cartesian_product_stream_slicer import CartesianProductStreamSlicer -from airbyte_cdk.sources.declarative.partition_routers.list_partition_router import ListPartitionRouter -from airbyte_cdk.sources.declarative.partition_routers.single_partition_router import SinglePartitionRouter -from airbyte_cdk.sources.declarative.partition_routers.substream_partition_router import SubstreamPartitionRouter +from airbyte_cdk.sources.declarative.partition_routers.async_job_partition_router import ( + AsyncJobPartitionRouter, +) +from airbyte_cdk.sources.declarative.partition_routers.cartesian_product_stream_slicer import ( + CartesianProductStreamSlicer, +) +from airbyte_cdk.sources.declarative.partition_routers.list_partition_router import ( + ListPartitionRouter, +) from airbyte_cdk.sources.declarative.partition_routers.partition_router import PartitionRouter +from airbyte_cdk.sources.declarative.partition_routers.single_partition_router import ( + SinglePartitionRouter, +) +from airbyte_cdk.sources.declarative.partition_routers.substream_partition_router import ( + SubstreamPartitionRouter, +) __all__ = [ "AsyncJobPartitionRouter", @@ -15,5 +25,5 @@ "ListPartitionRouter", "SinglePartitionRouter", "SubstreamPartitionRouter", - "PartitionRouter" + "PartitionRouter", ] diff --git a/airbyte_cdk/sources/declarative/requesters/error_handlers/__init__.py b/airbyte_cdk/sources/declarative/requesters/error_handlers/__init__.py index 490169b6b..099aa4286 100644 --- a/airbyte_cdk/sources/declarative/requesters/error_handlers/__init__.py +++ b/airbyte_cdk/sources/declarative/requesters/error_handlers/__init__.py @@ -2,10 +2,24 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy import BackoffStrategy -from airbyte_cdk.sources.declarative.requesters.error_handlers.composite_error_handler import CompositeErrorHandler -from airbyte_cdk.sources.declarative.requesters.error_handlers.default_error_handler import DefaultErrorHandler +from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy import ( + BackoffStrategy, +) +from airbyte_cdk.sources.declarative.requesters.error_handlers.composite_error_handler import ( + CompositeErrorHandler, +) +from airbyte_cdk.sources.declarative.requesters.error_handlers.default_error_handler import ( + DefaultErrorHandler, +) from airbyte_cdk.sources.declarative.requesters.error_handlers.error_handler import ErrorHandler -from airbyte_cdk.sources.declarative.requesters.error_handlers.http_response_filter import HttpResponseFilter +from airbyte_cdk.sources.declarative.requesters.error_handlers.http_response_filter import ( + HttpResponseFilter, +) -__all__ = ["BackoffStrategy", "CompositeErrorHandler", "DefaultErrorHandler", "ErrorHandler", "HttpResponseFilter"] +__all__ = [ + "BackoffStrategy", + "CompositeErrorHandler", + "DefaultErrorHandler", + "ErrorHandler", + "HttpResponseFilter", +] diff --git a/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py b/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py index 29647ae29..26ecafbde 100644 --- a/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py +++ b/airbyte_cdk/sources/declarative/requesters/error_handlers/backoff_strategies/__init__.py @@ -2,7 +2,9 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.constant_backoff_strategy import ConstantBackoffStrategy +from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.constant_backoff_strategy import ( + ConstantBackoffStrategy, +) from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.exponential_backoff_strategy import ( ExponentialBackoffStrategy, ) diff --git a/airbyte_cdk/sources/declarative/requesters/paginators/__init__.py b/airbyte_cdk/sources/declarative/requesters/paginators/__init__.py index cb2cfddb2..3b077ec0c 100644 --- a/airbyte_cdk/sources/declarative/requesters/paginators/__init__.py +++ b/airbyte_cdk/sources/declarative/requesters/paginators/__init__.py @@ -2,9 +2,20 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -from airbyte_cdk.sources.declarative.requesters.paginators.default_paginator import DefaultPaginator, PaginatorTestReadDecorator +from airbyte_cdk.sources.declarative.requesters.paginators.default_paginator import ( + DefaultPaginator, + PaginatorTestReadDecorator, +) from airbyte_cdk.sources.declarative.requesters.paginators.no_pagination import NoPagination from airbyte_cdk.sources.declarative.requesters.paginators.paginator import Paginator -from airbyte_cdk.sources.declarative.requesters.paginators.strategies.pagination_strategy import PaginationStrategy +from airbyte_cdk.sources.declarative.requesters.paginators.strategies.pagination_strategy import ( + PaginationStrategy, +) -__all__ = ["DefaultPaginator", "NoPagination", "PaginationStrategy", "Paginator", "PaginatorTestReadDecorator"] +__all__ = [ + "DefaultPaginator", + "NoPagination", + "PaginationStrategy", + "Paginator", + "PaginatorTestReadDecorator", +] diff --git a/airbyte_cdk/sources/declarative/requesters/paginators/strategies/__init__.py b/airbyte_cdk/sources/declarative/requesters/paginators/strategies/__init__.py index 03e5ecae5..c1f9ff105 100644 --- a/airbyte_cdk/sources/declarative/requesters/paginators/strategies/__init__.py +++ b/airbyte_cdk/sources/declarative/requesters/paginators/strategies/__init__.py @@ -2,9 +2,15 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -from airbyte_cdk.sources.declarative.requesters.paginators.strategies.cursor_pagination_strategy import CursorPaginationStrategy -from airbyte_cdk.sources.declarative.requesters.paginators.strategies.offset_increment import OffsetIncrement -from airbyte_cdk.sources.declarative.requesters.paginators.strategies.page_increment import PageIncrement +from airbyte_cdk.sources.declarative.requesters.paginators.strategies.cursor_pagination_strategy import ( + CursorPaginationStrategy, +) +from airbyte_cdk.sources.declarative.requesters.paginators.strategies.offset_increment import ( + OffsetIncrement, +) +from airbyte_cdk.sources.declarative.requesters.paginators.strategies.page_increment import ( + PageIncrement, +) from airbyte_cdk.sources.declarative.requesters.paginators.strategies.stop_condition import ( CursorStopCondition, StopConditionPaginationStrategyDecorator, diff --git a/airbyte_cdk/sources/declarative/requesters/request_options/__init__.py b/airbyte_cdk/sources/declarative/requesters/request_options/__init__.py index c6540e939..a63705832 100644 --- a/airbyte_cdk/sources/declarative/requesters/request_options/__init__.py +++ b/airbyte_cdk/sources/declarative/requesters/request_options/__init__.py @@ -5,10 +5,19 @@ from airbyte_cdk.sources.declarative.requesters.request_options.datetime_based_request_options_provider import ( DatetimeBasedRequestOptionsProvider, ) -from airbyte_cdk.sources.declarative.requesters.request_options.default_request_options_provider import DefaultRequestOptionsProvider +from airbyte_cdk.sources.declarative.requesters.request_options.default_request_options_provider import ( + DefaultRequestOptionsProvider, +) from airbyte_cdk.sources.declarative.requesters.request_options.interpolated_request_options_provider import ( InterpolatedRequestOptionsProvider, ) -from airbyte_cdk.sources.declarative.requesters.request_options.request_options_provider import RequestOptionsProvider +from airbyte_cdk.sources.declarative.requesters.request_options.request_options_provider import ( + RequestOptionsProvider, +) -__all__ = ["DatetimeBasedRequestOptionsProvider", "DefaultRequestOptionsProvider", "InterpolatedRequestOptionsProvider", "RequestOptionsProvider"] +__all__ = [ + "DatetimeBasedRequestOptionsProvider", + "DefaultRequestOptionsProvider", + "InterpolatedRequestOptionsProvider", + "RequestOptionsProvider", +] diff --git a/airbyte_cdk/sources/declarative/resolvers/__init__.py b/airbyte_cdk/sources/declarative/resolvers/__init__.py index 6b8497fb7..dba2f60b8 100644 --- a/airbyte_cdk/sources/declarative/resolvers/__init__.py +++ b/airbyte_cdk/sources/declarative/resolvers/__init__.py @@ -2,17 +2,40 @@ # Copyright (c) 2024 Airbyte, Inc., all rights reserved. # -from airbyte_cdk.sources.declarative.resolvers.components_resolver import ComponentsResolver, ComponentMappingDefinition, ResolvedComponentMappingDefinition -from airbyte_cdk.sources.declarative.resolvers.http_components_resolver import HttpComponentsResolver -from airbyte_cdk.sources.declarative.resolvers.config_components_resolver import ConfigComponentsResolver, StreamConfig -from airbyte_cdk.sources.declarative.models import HttpComponentsResolver as HttpComponentsResolverModel -from airbyte_cdk.sources.declarative.models import ConfigComponentsResolver as ConfigComponentsResolverModel -from pydantic.v1 import BaseModel from typing import Mapping +from pydantic.v1 import BaseModel + +from airbyte_cdk.sources.declarative.models import ( + ConfigComponentsResolver as ConfigComponentsResolverModel, +) +from airbyte_cdk.sources.declarative.models import ( + HttpComponentsResolver as HttpComponentsResolverModel, +) +from airbyte_cdk.sources.declarative.resolvers.components_resolver import ( + ComponentMappingDefinition, + ComponentsResolver, + ResolvedComponentMappingDefinition, +) +from airbyte_cdk.sources.declarative.resolvers.config_components_resolver import ( + ConfigComponentsResolver, + StreamConfig, +) +from airbyte_cdk.sources.declarative.resolvers.http_components_resolver import ( + HttpComponentsResolver, +) + COMPONENTS_RESOLVER_TYPE_MAPPING: Mapping[str, type[BaseModel]] = { "HttpComponentsResolver": HttpComponentsResolverModel, - "ConfigComponentsResolver": ConfigComponentsResolverModel + "ConfigComponentsResolver": ConfigComponentsResolverModel, } -__all__ = ["ComponentsResolver", "HttpComponentsResolver", "ComponentMappingDefinition", "ResolvedComponentMappingDefinition", "StreamConfig", "ConfigComponentsResolver", "COMPONENTS_RESOLVER_TYPE_MAPPING"] +__all__ = [ + "ComponentsResolver", + "HttpComponentsResolver", + "ComponentMappingDefinition", + "ResolvedComponentMappingDefinition", + "StreamConfig", + "ConfigComponentsResolver", + "COMPONENTS_RESOLVER_TYPE_MAPPING", +] diff --git a/airbyte_cdk/sources/declarative/retrievers/__init__.py b/airbyte_cdk/sources/declarative/retrievers/__init__.py index 9ec5017fb..177d141a3 100644 --- a/airbyte_cdk/sources/declarative/retrievers/__init__.py +++ b/airbyte_cdk/sources/declarative/retrievers/__init__.py @@ -2,8 +2,11 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # -from airbyte_cdk.sources.declarative.retrievers.retriever import Retriever -from airbyte_cdk.sources.declarative.retrievers.simple_retriever import SimpleRetriever, SimpleRetrieverTestReadDecorator from airbyte_cdk.sources.declarative.retrievers.async_retriever import AsyncRetriever +from airbyte_cdk.sources.declarative.retrievers.retriever import Retriever +from airbyte_cdk.sources.declarative.retrievers.simple_retriever import ( + SimpleRetriever, + SimpleRetrieverTestReadDecorator, +) __all__ = ["Retriever", "SimpleRetriever", "SimpleRetrieverTestReadDecorator", "AsyncRetriever"] diff --git a/airbyte_cdk/sources/declarative/retrievers/async_retriever.py b/airbyte_cdk/sources/declarative/retrievers/async_retriever.py index d75237b03..7a44d4ea4 100644 --- a/airbyte_cdk/sources/declarative/retrievers/async_retriever.py +++ b/airbyte_cdk/sources/declarative/retrievers/async_retriever.py @@ -15,7 +15,7 @@ from airbyte_cdk.sources.declarative.partition_routers.async_job_partition_router import ( AsyncJobPartitionRouter, ) -from airbyte_cdk.sources.declarative.retrievers import Retriever +from airbyte_cdk.sources.declarative.retrievers.retriever import Retriever from airbyte_cdk.sources.source import ExperimentalClassWarning from airbyte_cdk.sources.streams.core import StreamData from airbyte_cdk.sources.types import Config, StreamSlice, StreamState diff --git a/airbyte_cdk/sources/declarative/schema/__init__.py b/airbyte_cdk/sources/declarative/schema/__init__.py index 5d2aed60e..b5b6a7d31 100644 --- a/airbyte_cdk/sources/declarative/schema/__init__.py +++ b/airbyte_cdk/sources/declarative/schema/__init__.py @@ -3,9 +3,21 @@ # from airbyte_cdk.sources.declarative.schema.default_schema_loader import DefaultSchemaLoader +from airbyte_cdk.sources.declarative.schema.dynamic_schema_loader import ( + DynamicSchemaLoader, + SchemaTypeIdentifier, + TypesMap, +) from airbyte_cdk.sources.declarative.schema.inline_schema_loader import InlineSchemaLoader from airbyte_cdk.sources.declarative.schema.json_file_schema_loader import JsonFileSchemaLoader from airbyte_cdk.sources.declarative.schema.schema_loader import SchemaLoader -from airbyte_cdk.sources.declarative.schema.dynamic_schema_loader import DynamicSchemaLoader, TypesMap, SchemaTypeIdentifier -__all__ = ["JsonFileSchemaLoader", "DefaultSchemaLoader", "SchemaLoader", "InlineSchemaLoader", "DynamicSchemaLoader", "TypesMap", "SchemaTypeIdentifier"] +__all__ = [ + "JsonFileSchemaLoader", + "DefaultSchemaLoader", + "SchemaLoader", + "InlineSchemaLoader", + "DynamicSchemaLoader", + "TypesMap", + "SchemaTypeIdentifier", +] diff --git a/airbyte_cdk/sources/file_based/availability_strategy/__init__.py b/airbyte_cdk/sources/file_based/availability_strategy/__init__.py index a05e54210..8134a89e0 100644 --- a/airbyte_cdk/sources/file_based/availability_strategy/__init__.py +++ b/airbyte_cdk/sources/file_based/availability_strategy/__init__.py @@ -1,4 +1,11 @@ -from .abstract_file_based_availability_strategy import AbstractFileBasedAvailabilityStrategy, AbstractFileBasedAvailabilityStrategyWrapper +from .abstract_file_based_availability_strategy import ( + AbstractFileBasedAvailabilityStrategy, + AbstractFileBasedAvailabilityStrategyWrapper, +) from .default_file_based_availability_strategy import DefaultFileBasedAvailabilityStrategy -__all__ = ["AbstractFileBasedAvailabilityStrategy", "AbstractFileBasedAvailabilityStrategyWrapper", "DefaultFileBasedAvailabilityStrategy"] +__all__ = [ + "AbstractFileBasedAvailabilityStrategy", + "AbstractFileBasedAvailabilityStrategyWrapper", + "DefaultFileBasedAvailabilityStrategy", +] diff --git a/airbyte_cdk/sources/file_based/discovery_policy/__init__.py b/airbyte_cdk/sources/file_based/discovery_policy/__init__.py index c50aa1a4e..6d0f231a3 100644 --- a/airbyte_cdk/sources/file_based/discovery_policy/__init__.py +++ b/airbyte_cdk/sources/file_based/discovery_policy/__init__.py @@ -1,4 +1,8 @@ -from airbyte_cdk.sources.file_based.discovery_policy.abstract_discovery_policy import AbstractDiscoveryPolicy -from airbyte_cdk.sources.file_based.discovery_policy.default_discovery_policy import DefaultDiscoveryPolicy +from airbyte_cdk.sources.file_based.discovery_policy.abstract_discovery_policy import ( + AbstractDiscoveryPolicy, +) +from airbyte_cdk.sources.file_based.discovery_policy.default_discovery_policy import ( + DefaultDiscoveryPolicy, +) __all__ = ["AbstractDiscoveryPolicy", "DefaultDiscoveryPolicy"] diff --git a/airbyte_cdk/sources/file_based/file_types/__init__.py b/airbyte_cdk/sources/file_based/file_types/__init__.py index 083df8f17..b9d8f1d52 100644 --- a/airbyte_cdk/sources/file_based/file_types/__init__.py +++ b/airbyte_cdk/sources/file_based/file_types/__init__.py @@ -1,8 +1,8 @@ from typing import Any, Mapping, Type from airbyte_cdk.sources.file_based.config.avro_format import AvroFormat -from airbyte_cdk.sources.file_based.config.excel_format import ExcelFormat from airbyte_cdk.sources.file_based.config.csv_format import CsvFormat +from airbyte_cdk.sources.file_based.config.excel_format import ExcelFormat from airbyte_cdk.sources.file_based.config.jsonl_format import JsonlFormat from airbyte_cdk.sources.file_based.config.parquet_format import ParquetFormat from airbyte_cdk.sources.file_based.config.unstructured_format import UnstructuredFormat @@ -10,11 +10,11 @@ from .avro_parser import AvroParser from .csv_parser import CsvParser from .excel_parser import ExcelParser +from .file_transfer import FileTransfer from .file_type_parser import FileTypeParser from .jsonl_parser import JsonlParser from .parquet_parser import ParquetParser from .unstructured_parser import UnstructuredParser -from .file_transfer import FileTransfer default_parsers: Mapping[Type[Any], FileTypeParser] = { AvroFormat: AvroParser(), @@ -25,4 +25,13 @@ UnstructuredFormat: UnstructuredParser(), } -__all__ = ["AvroParser", "CsvParser", "ExcelParser", "JsonlParser", "ParquetParser", "UnstructuredParser", "FileTransfer", "default_parsers"] +__all__ = [ + "AvroParser", + "CsvParser", + "ExcelParser", + "JsonlParser", + "ParquetParser", + "UnstructuredParser", + "FileTransfer", + "default_parsers", +] diff --git a/airbyte_cdk/sources/file_based/schema_validation_policies/__init__.py b/airbyte_cdk/sources/file_based/schema_validation_policies/__init__.py index d2cc0e63b..e687bd5b3 100644 --- a/airbyte_cdk/sources/file_based/schema_validation_policies/__init__.py +++ b/airbyte_cdk/sources/file_based/schema_validation_policies/__init__.py @@ -1,4 +1,6 @@ -from airbyte_cdk.sources.file_based.schema_validation_policies.abstract_schema_validation_policy import AbstractSchemaValidationPolicy +from airbyte_cdk.sources.file_based.schema_validation_policies.abstract_schema_validation_policy import ( + AbstractSchemaValidationPolicy, +) from airbyte_cdk.sources.file_based.schema_validation_policies.default_schema_validation_policies import ( DEFAULT_SCHEMA_VALIDATION_POLICIES, EmitRecordPolicy, diff --git a/airbyte_cdk/sources/file_based/stream/concurrent/cursor/__init__.py b/airbyte_cdk/sources/file_based/stream/concurrent/cursor/__init__.py index 590f37bb6..089cae0ad 100644 --- a/airbyte_cdk/sources/file_based/stream/concurrent/cursor/__init__.py +++ b/airbyte_cdk/sources/file_based/stream/concurrent/cursor/__init__.py @@ -2,4 +2,8 @@ from .file_based_concurrent_cursor import FileBasedConcurrentCursor from .file_based_final_state_cursor import FileBasedFinalStateCursor -__all__ = ["AbstractConcurrentFileBasedCursor", "FileBasedConcurrentCursor", "FileBasedFinalStateCursor"] +__all__ = [ + "AbstractConcurrentFileBasedCursor", + "FileBasedConcurrentCursor", + "FileBasedFinalStateCursor", +] diff --git a/airbyte_cdk/sources/message/__init__.py b/airbyte_cdk/sources/message/__init__.py index c545c0d73..31c484ab5 100644 --- a/airbyte_cdk/sources/message/__init__.py +++ b/airbyte_cdk/sources/message/__init__.py @@ -10,4 +10,10 @@ NoopMessageRepository, ) -__all__ = ["InMemoryMessageRepository", "LogAppenderMessageRepositoryDecorator", "LogMessage", "MessageRepository", "NoopMessageRepository"] +__all__ = [ + "InMemoryMessageRepository", + "LogAppenderMessageRepositoryDecorator", + "LogMessage", + "MessageRepository", + "NoopMessageRepository", +] diff --git a/airbyte_cdk/sources/streams/__init__.py b/airbyte_cdk/sources/streams/__init__.py index 030502822..dc735b617 100644 --- a/airbyte_cdk/sources/streams/__init__.py +++ b/airbyte_cdk/sources/streams/__init__.py @@ -3,6 +3,6 @@ # # Initialize Streams Package -from .core import NO_CURSOR_STATE_KEY, IncrementalMixin, CheckpointMixin, Stream +from .core import NO_CURSOR_STATE_KEY, CheckpointMixin, IncrementalMixin, Stream __all__ = ["NO_CURSOR_STATE_KEY", "IncrementalMixin", "CheckpointMixin", "Stream"] diff --git a/airbyte_cdk/sources/streams/checkpoint/__init__.py b/airbyte_cdk/sources/streams/checkpoint/__init__.py index 0b122acba..ae4e0e46f 100644 --- a/airbyte_cdk/sources/streams/checkpoint/__init__.py +++ b/airbyte_cdk/sources/streams/checkpoint/__init__.py @@ -8,12 +8,11 @@ FullRefreshCheckpointReader, IncrementalCheckpointReader, LegacyCursorBasedCheckpointReader, - ResumableFullRefreshCheckpointReader + ResumableFullRefreshCheckpointReader, ) from .cursor import Cursor from .resumable_full_refresh_cursor import ResumableFullRefreshCursor - __all__ = [ "CheckpointMode", "CheckpointReader", @@ -23,5 +22,5 @@ "IncrementalCheckpointReader", "LegacyCursorBasedCheckpointReader", "ResumableFullRefreshCheckpointReader", - "ResumableFullRefreshCursor" + "ResumableFullRefreshCursor", ] diff --git a/airbyte_cdk/sources/streams/http/__init__.py b/airbyte_cdk/sources/streams/http/__init__.py index a876406b4..74804614c 100644 --- a/airbyte_cdk/sources/streams/http/__init__.py +++ b/airbyte_cdk/sources/streams/http/__init__.py @@ -3,8 +3,8 @@ # # Initialize Streams Package -from .http_client import HttpClient -from .http import HttpStream, HttpSubStream from .exceptions import UserDefinedBackoffException +from .http import HttpStream, HttpSubStream +from .http_client import HttpClient __all__ = ["HttpClient", "HttpStream", "HttpSubStream", "UserDefinedBackoffException"] diff --git a/airbyte_cdk/sources/streams/http/error_handlers/__init__.py b/airbyte_cdk/sources/streams/http/error_handlers/__init__.py index 40abd4f94..1f97d5cc7 100644 --- a/airbyte_cdk/sources/streams/http/error_handlers/__init__.py +++ b/airbyte_cdk/sources/streams/http/error_handlers/__init__.py @@ -8,7 +8,7 @@ from .error_message_parser import ErrorMessageParser from .http_status_error_handler import HttpStatusErrorHandler from .json_error_message_parser import JsonErrorMessageParser -from .response_models import ResponseAction, ErrorResolution +from .response_models import ErrorResolution, ResponseAction __all__ = [ "BackoffStrategy", @@ -18,5 +18,5 @@ "HttpStatusErrorHandler", "JsonErrorMessageParser", "ResponseAction", - "ErrorResolution" + "ErrorResolution", ] diff --git a/airbyte_cdk/test/mock_http/__init__.py b/airbyte_cdk/test/mock_http/__init__.py index 88b28b022..fdd454d2a 100644 --- a/airbyte_cdk/test/mock_http/__init__.py +++ b/airbyte_cdk/test/mock_http/__init__.py @@ -1,6 +1,6 @@ from airbyte_cdk.test.mock_http.matcher import HttpRequestMatcher +from airbyte_cdk.test.mock_http.mocker import HttpMocker from airbyte_cdk.test.mock_http.request import HttpRequest from airbyte_cdk.test.mock_http.response import HttpResponse -from airbyte_cdk.test.mock_http.mocker import HttpMocker __all__ = ["HttpMocker", "HttpRequest", "HttpRequestMatcher", "HttpResponse"] diff --git a/airbyte_cdk/test/mock_http/mocker.py b/airbyte_cdk/test/mock_http/mocker.py index a8ab95afc..cd1b1f9a7 100644 --- a/airbyte_cdk/test/mock_http/mocker.py +++ b/airbyte_cdk/test/mock_http/mocker.py @@ -8,7 +8,9 @@ import requests_mock -from airbyte_cdk.test.mock_http import HttpRequest, HttpRequestMatcher, HttpResponse +from airbyte_cdk.test.mock_http.matcher import HttpRequestMatcher +from airbyte_cdk.test.mock_http.request import HttpRequest +from airbyte_cdk.test.mock_http.response import HttpResponse class SupportedHttpMethods(str, Enum): diff --git a/airbyte_cdk/test/mock_http/response_builder.py b/airbyte_cdk/test/mock_http/response_builder.py index 7f9583827..41766af1b 100644 --- a/airbyte_cdk/test/mock_http/response_builder.py +++ b/airbyte_cdk/test/mock_http/response_builder.py @@ -6,7 +6,7 @@ from pathlib import Path as FilePath from typing import Any, Dict, List, Optional, Union -from airbyte_cdk.test.mock_http import HttpResponse +from airbyte_cdk.test.mock_http.response import HttpResponse from airbyte_cdk.test.utils.data import get_unit_test_folder diff --git a/airbyte_cdk/utils/__init__.py b/airbyte_cdk/utils/__init__.py index 70b1375b0..dbfb641dd 100644 --- a/airbyte_cdk/utils/__init__.py +++ b/airbyte_cdk/utils/__init__.py @@ -3,8 +3,8 @@ # from .is_cloud_environment import is_cloud_environment +from .print_buffer import PrintBuffer from .schema_inferrer import SchemaInferrer from .traced_exception import AirbyteTracedException -from .print_buffer import PrintBuffer __all__ = ["AirbyteTracedException", "SchemaInferrer", "is_cloud_environment", "PrintBuffer"] diff --git a/pyproject.toml b/pyproject.toml index eab81bb7f..e08e29aaa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,8 +116,6 @@ source-declarative-manifest = "airbyte_cdk.cli.source_declarative_manifest:run" skip = ["__init__.py"] # TODO: Remove after this is fixed: https://github.com/airbytehq/airbyte-python-cdk/issues/12 [tool.ruff] -exclude = ["__init__.py"] # TODO: Remove after this is fixed: https://github.com/airbytehq/airbyte-python-cdk/issues/12 - target-version = "py310" line-length = 100 diff --git a/unit_tests/sources/declarative/resolvers/test_http_components_resolver.py b/unit_tests/sources/declarative/resolvers/test_http_components_resolver.py index de3d37940..f09ede0d6 100644 --- a/unit_tests/sources/declarative/resolvers/test_http_components_resolver.py +++ b/unit_tests/sources/declarative/resolvers/test_http_components_resolver.py @@ -400,7 +400,7 @@ def test_http_components_resolver_with_stream_slices( def test_dynamic_streams_read_with_http_components_resolver(): - expected_stream_names = ["item_1", "item_2"] + expected_stream_names = {"item_1", "item_2"} with HttpMocker() as http_mocker: http_mocker.get( HttpRequest(url="https://api.test.com/items"), @@ -441,9 +441,9 @@ def test_dynamic_streams_read_with_http_components_resolver(): ] assert len(actual_catalog.streams) == 2 - assert [stream.name for stream in actual_catalog.streams] == expected_stream_names + assert set([stream.name for stream in actual_catalog.streams]) == expected_stream_names assert len(records) == 2 - assert [record.stream for record in records] == expected_stream_names + assert set([record.stream for record in records]) == expected_stream_names def test_duplicated_dynamic_streams_read_with_http_components_resolver(): diff --git a/unit_tests/sources/mock_server_tests/test_helpers/__init__.py b/unit_tests/sources/mock_server_tests/test_helpers/__init__.py index 7cad347c9..2c47ceefb 100644 --- a/unit_tests/sources/mock_server_tests/test_helpers/__init__.py +++ b/unit_tests/sources/mock_server_tests/test_helpers/__init__.py @@ -2,6 +2,9 @@ # Copyright (c) 2024 Airbyte, Inc., all rights reserved. # -from .airbyte_message_assertions import emits_successful_sync_status_messages, validate_message_order +from .airbyte_message_assertions import ( + emits_successful_sync_status_messages, + validate_message_order, +) __all__ = ["emits_successful_sync_status_messages", "validate_message_order"]