airbyte-cdk 6.36.4__py3-none-any.whl → 6.36.5.dev0__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.
@@ -1405,7 +1405,19 @@ class ModelToComponentFactory:
1405
1405
  try:
1406
1406
  module_ref = importlib.import_module(module_name_full)
1407
1407
  except ModuleNotFoundError as e:
1408
- raise ValueError(f"Could not load module `{module_name_full}`.") from e
1408
+ if split[0] == "source_declarative_manifest":
1409
+ # During testing, the modules containing the custom components are not moved to source_declarative_manifest. In order to run the test, add the source folder to your PYTHONPATH or add it runtime using sys.path.append
1410
+ try:
1411
+ import os
1412
+
1413
+ module_name_with_source_declarative_manifest = ".".join(split[1:-1])
1414
+ module_ref = importlib.import_module(
1415
+ module_name_with_source_declarative_manifest
1416
+ )
1417
+ except ModuleNotFoundError:
1418
+ raise ValueError(f"Could not load module `{module_name_full}`.") from e
1419
+ else:
1420
+ raise ValueError(f"Could not load module `{module_name_full}`.") from e
1409
1421
 
1410
1422
  try:
1411
1423
  return getattr(module_ref, class_name)
@@ -39,13 +39,18 @@ class YamlDeclarativeSource(ConcurrentDeclarativeSource[List[AirbyteStateMessage
39
39
  )
40
40
 
41
41
  def _read_and_parse_yaml_file(self, path_to_yaml_file: str) -> ConnectionDefinition:
42
- package = self.__class__.__module__.split(".")[0]
42
+ try:
43
+ # For testing purposes, we want to allow to just pass a file. However, this
44
+ with open(path_to_yaml_file, "r") as f:
45
+ return yaml.safe_load(f) # type: ignore # we assume the yaml represents a ConnectionDefinition
46
+ except FileNotFoundError:
47
+ # Running inside the container, the working directory during an operation is not structured the same as the static files
48
+ package = self.__class__.__module__.split(".")[0]
43
49
 
44
- yaml_config = pkgutil.get_data(package, path_to_yaml_file)
45
- if yaml_config:
46
- decoded_yaml = yaml_config.decode()
47
- return self._parse(decoded_yaml)
48
- else:
50
+ yaml_config = pkgutil.get_data(package, path_to_yaml_file)
51
+ if yaml_config:
52
+ decoded_yaml = yaml_config.decode()
53
+ return self._parse(decoded_yaml)
49
54
  return {}
50
55
 
51
56
  def _emit_manifest_debug_message(self, extra_args: dict[str, Any]) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.36.4
3
+ Version: 6.36.5.dev0
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -119,7 +119,7 @@ airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py,sha256=958MMX6_Z
119
119
  airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=Rir9_z3Kcd5Es0-LChrzk-0qubAsiK_RSEnLmK2OXm8,553
120
120
  airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=CXwTfD3wSQq3okcqwigpprbHhSURUokh4GK2OmOyKC8,9132
121
121
  airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=IWUOdF03o-aQn0Occo1BJCxU0Pz-QILk5L67nzw2thw,6803
122
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=8gjOsCS8VdkH2-lImilDq8M8-dmGKtWpWyzd5ajzNok,134955
122
+ airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=BEnm0LhfJyPonkpnvW59kPMuGBId7mwGWL3_pnA9w3U,135693
123
123
  airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=HJ-Syp3p7RpyR_OK0X_a2kSyISfu3W-PKrRI16iY0a8,957
124
124
  airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py,sha256=VelO7zKqKtzMJ35jyFeg0ypJLQC0plqqIBNXoBW1G2E,3001
125
125
  airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=c5cuVFM6NFkuQqG8Z5IwkBuwDrvXZN1CunUOM_L0ezg,6892
@@ -193,7 +193,7 @@ airbyte_cdk/sources/declarative/transformations/keys_to_snake_transformation.py,
193
193
  airbyte_cdk/sources/declarative/transformations/remove_fields.py,sha256=EwUP0SZ2p4GRJ6Q8CUzlz9dcUeEidEFDlI2IBye2tlc,2745
194
194
  airbyte_cdk/sources/declarative/transformations/transformation.py,sha256=4sXtx9cNY2EHUPq-xHvDs8GQEBUy3Eo6TkRLKHPXx68,1161
195
195
  airbyte_cdk/sources/declarative/types.py,sha256=yqx0xlZv_76tkC7fqJKefmvl4GJJ8mXbeddwVV8XRJU,778
196
- airbyte_cdk/sources/declarative/yaml_declarative_source.py,sha256=MsKSAqtpwIqJfYOiUX01RbqMeTy7pvBoguvyTWrL7pI,2390
196
+ airbyte_cdk/sources/declarative/yaml_declarative_source.py,sha256=6tamOSsbpXv7XGP8pSeja0126YmDeIcfxF_W999egRg,2829
197
197
  airbyte_cdk/sources/embedded/__init__.py,sha256=ZnqYNxHsKCgO38IwB34RQyRMXTs4GTvlRi3ImKnIioo,61
198
198
  airbyte_cdk/sources/embedded/base_integration.py,sha256=0LbtEtWlnVdkYlweA5OJU4BIoyS6d4le5w9FsLn25Zc,2417
199
199
  airbyte_cdk/sources/embedded/catalog.py,sha256=EAnLw9u5fXLNBLfWr_I0itA7OEHMWdqEaM_rWc_tCpI,1653
@@ -360,9 +360,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
360
360
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
361
361
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
362
362
  airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
363
- airbyte_cdk-6.36.4.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
364
- airbyte_cdk-6.36.4.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
365
- airbyte_cdk-6.36.4.dist-info/METADATA,sha256=GA6LdYLCN0e8BOIqchm7f1Zk-kA6saHnzIEGxGlQns8,6010
366
- airbyte_cdk-6.36.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
367
- airbyte_cdk-6.36.4.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
368
- airbyte_cdk-6.36.4.dist-info/RECORD,,
363
+ airbyte_cdk-6.36.5.dev0.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
364
+ airbyte_cdk-6.36.5.dev0.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
365
+ airbyte_cdk-6.36.5.dev0.dist-info/METADATA,sha256=28p5qHL4XEMFrRWETvsXjhboV_KnNgCqTCr8oZHk4rI,6015
366
+ airbyte_cdk-6.36.5.dev0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
367
+ airbyte_cdk-6.36.5.dev0.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
368
+ airbyte_cdk-6.36.5.dev0.dist-info/RECORD,,