airbyte-cdk 0.69.1__py3-none-any.whl → 0.70.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +7 -4
- {airbyte_cdk-0.69.1.dist-info → airbyte_cdk-0.70.0.dist-info}/METADATA +1 -1
- {airbyte_cdk-0.69.1.dist-info → airbyte_cdk-0.70.0.dist-info}/RECORD +7 -7
- unit_tests/sources/declarative/parsers/test_model_to_component_factory.py +14 -0
- {airbyte_cdk-0.69.1.dist-info → airbyte_cdk-0.70.0.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-0.69.1.dist-info → airbyte_cdk-0.70.0.dist-info}/WHEEL +0 -0
- {airbyte_cdk-0.69.1.dist-info → airbyte_cdk-0.70.0.dist-info}/top_level.txt +0 -0
@@ -319,7 +319,7 @@ class ModelToComponentFactory:
|
|
319
319
|
)
|
320
320
|
if model.request_authentication.type == "Bearer":
|
321
321
|
return ModelToComponentFactory.create_bearer_authenticator(
|
322
|
-
BearerAuthenticatorModel(type="BearerAuthenticator", api_token=""),
|
322
|
+
BearerAuthenticatorModel(type="BearerAuthenticator", api_token=""), # type: ignore # $parameters has a default value
|
323
323
|
config,
|
324
324
|
token_provider=token_provider, # type: ignore # $parameters defaults to None
|
325
325
|
)
|
@@ -431,11 +431,14 @@ class ModelToComponentFactory:
|
|
431
431
|
return custom_component_class(**kwargs)
|
432
432
|
|
433
433
|
@staticmethod
|
434
|
-
def _get_class_from_fully_qualified_class_name(
|
435
|
-
split =
|
434
|
+
def _get_class_from_fully_qualified_class_name(full_qualified_class_name: str) -> Any:
|
435
|
+
split = full_qualified_class_name.split(".")
|
436
436
|
module = ".".join(split[:-1])
|
437
437
|
class_name = split[-1]
|
438
|
-
|
438
|
+
try:
|
439
|
+
return getattr(importlib.import_module(module), class_name)
|
440
|
+
except AttributeError:
|
441
|
+
raise ValueError(f"Could not load class {full_qualified_class_name}.")
|
439
442
|
|
440
443
|
@staticmethod
|
441
444
|
def _derive_component_type_from_type_hints(field_type: Any) -> Optional[str]:
|
@@ -87,7 +87,7 @@ airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=y7_G5mM07zxT
|
|
87
87
|
airbyte_cdk/sources/declarative/parsers/default_implementation_registry.py,sha256=W8BcK4KOg4ifNXgsdeIoV4oneHjXBKcPHEZHIC4r-hM,3801
|
88
88
|
airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=i2yUdrdlPUHI0dSQX0zBT8WSg912SMiCF8qkQ8VvlA4,8287
|
89
89
|
airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=6ukHx0bBrCJm9rek1l_MEfS3U_gdJcM4pJRyifJEOp0,6412
|
90
|
-
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=
|
90
|
+
airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=_jX1sPW5SA51nHoxpoVktC3jdO8PR4cGrQfZftcVSLo,59316
|
91
91
|
airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=27sOWhw2LBQs62HchURakHQ2M_mtnOatNgU6q8RUtpU,476
|
92
92
|
airbyte_cdk/sources/declarative/partition_routers/list_partition_router.py,sha256=L22D-up7W2HahZZo2dA-IbRSs7qJEahU6O6bU0eiIt8,4324
|
93
93
|
airbyte_cdk/sources/declarative/partition_routers/single_partition_router.py,sha256=cl-TQdu_m6_IF20gdD1jll0SpejIyMZHvyGXx2NafuI,1611
|
@@ -329,7 +329,7 @@ unit_tests/sources/declarative/interpolation/test_macros.py,sha256=vEZmHQ0KsfQUz
|
|
329
329
|
unit_tests/sources/declarative/parsers/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQyRMXTs4GTvlRi3ImKnIioo,61
|
330
330
|
unit_tests/sources/declarative/parsers/test_manifest_component_transformer.py,sha256=egePHWYcXprfPtoHhiquWAXuJkDr-DB_RakKhdyaoHs,14316
|
331
331
|
unit_tests/sources/declarative/parsers/test_manifest_reference_resolver.py,sha256=K3q9eyx-sJFQ8nGYjAgS7fxau4sX_FlNreEAjiCYOeE,5306
|
332
|
-
unit_tests/sources/declarative/parsers/test_model_to_component_factory.py,sha256=
|
332
|
+
unit_tests/sources/declarative/parsers/test_model_to_component_factory.py,sha256=WIUygDJvNGEIzNdlarkYymTTgRtiXlR6IOjwnsqlC3E,75683
|
333
333
|
unit_tests/sources/declarative/parsers/testing_components.py,sha256=_yUijmYRM-yYHPGDB2JsfEiOuVrgexGW9QwHf1xxNW8,1326
|
334
334
|
unit_tests/sources/declarative/partition_routers/__init__.py,sha256=O8MZg4Bv_DghdRy9BoJCPIqdV75VtiUrhEkExQgb2nE,61
|
335
335
|
unit_tests/sources/declarative/partition_routers/test_list_partition_router.py,sha256=WKdbAQCHfCVOyoAFM_kbHsbqAF_e5FX5Zvou5ARsJZ4,6572
|
@@ -459,8 +459,8 @@ unit_tests/utils/test_schema_inferrer.py,sha256=Z2jHBZ540wnYkylIdV_2xr75Vtwlxuyg
|
|
459
459
|
unit_tests/utils/test_secret_utils.py,sha256=CdKK8A2-5XVxbXVtX22FK9dwwMeP5KNqDH6luWRXSNw,5256
|
460
460
|
unit_tests/utils/test_stream_status_utils.py,sha256=Xr8MZ2HWgTVIyMbywDvuYkRaUF4RZLQOT8-JjvcfR24,2970
|
461
461
|
unit_tests/utils/test_traced_exception.py,sha256=bDFP5zMBizFenz6V2WvEZTRCKGB5ijh3DBezjbfoYIs,4198
|
462
|
-
airbyte_cdk-0.
|
463
|
-
airbyte_cdk-0.
|
464
|
-
airbyte_cdk-0.
|
465
|
-
airbyte_cdk-0.
|
466
|
-
airbyte_cdk-0.
|
462
|
+
airbyte_cdk-0.70.0.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
463
|
+
airbyte_cdk-0.70.0.dist-info/METADATA,sha256=r3OK-V8U2kvqRNc_71_xGrna-8yFaNyLubYUW3pn06U,11074
|
464
|
+
airbyte_cdk-0.70.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
465
|
+
airbyte_cdk-0.70.0.dist-info/top_level.txt,sha256=edvsDKTnE6sD2wfCUaeTfKf5gQIL6CPVMwVL2sWZzqo,51
|
466
|
+
airbyte_cdk-0.70.0.dist-info/RECORD,,
|
@@ -1239,6 +1239,20 @@ def test_create_default_paginator():
|
|
1239
1239
|
ValueError,
|
1240
1240
|
id="test_create_custom_component_missing_required_field_emits_error",
|
1241
1241
|
),
|
1242
|
+
pytest.param(
|
1243
|
+
{
|
1244
|
+
"type": "CustomErrorHandler",
|
1245
|
+
"class_name": "unit_tests.sources.declarative.parsers.testing_components.NonExistingClass",
|
1246
|
+
"paginator": {
|
1247
|
+
"type": "DefaultPaginator",
|
1248
|
+
"pagination_strategy": {"type": "OffsetIncrement", "page_size": 10},
|
1249
|
+
},
|
1250
|
+
},
|
1251
|
+
"paginator",
|
1252
|
+
None,
|
1253
|
+
ValueError,
|
1254
|
+
id="test_create_custom_component_non_existing_class_raises_value_error",
|
1255
|
+
),
|
1242
1256
|
],
|
1243
1257
|
)
|
1244
1258
|
def test_create_custom_components(manifest, field_name, expected_value, expected_error):
|
File without changes
|
File without changes
|
File without changes
|