openlineage-python 1.24.0__tar.gz → 1.24.2__tar.gz
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.
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/PKG-INFO +1 -1
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/client.py +10 -2
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/constants.py +1 -1
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/pyproject.toml +1 -1
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_client.py +16 -21
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/.gitignore +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/README.md +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/docs/Makefile +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/docs/conf.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/docs/convert.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/docs/index.rst +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/docs/make.bat +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/docs/source/openlineage.client.rst +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/__init__.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/event_v2.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/facet.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/facet_v2.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/facets.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/filter.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/base.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/column_lineage_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/data_quality_assertions_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/data_quality_metrics_input_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/dataset_version_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/datasource_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/documentation_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/documentation_job.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/environment_variables_run.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/error_message_run.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/external_query_run.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/extraction_error_run.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/job_type_job.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/lifecycle_state_change_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/nominal_time_run.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/output_statistics_output_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/ownership_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/ownership_job.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/parent_run.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/processing_engine_run.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/schema_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/source_code_job.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/source_code_location_job.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/sql_job.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/storage_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/symlinks_dataset.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/py.typed +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/run.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/serde.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/__init__.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/composite.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/console.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/factory.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/file.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/http.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/kafka.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/msk_iam.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/noop.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/transport.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/utils.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/uuid.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/redact_fields.yml +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/__init__.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/config/config.yml +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/config/exact_filter.yml +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/config/http.yml +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/config/openlineage.yml +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/config/regex_filter.yml +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/conftest.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/example_full_event.json +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/nominal_time_without_end.json +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/serde_example_dataset_event.json +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/serde_example_job_event.json +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/serde_example_run_event.json +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_composite.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_events.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_facet.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_facet_v2.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_factory.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_file.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_http.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_kafka.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_msk_iam.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_utils.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/test_uuid.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/transport.py +0 -0
- {openlineage_python-1.24.0 → openlineage_python-1.24.2}/tox.ini +0 -0
|
@@ -82,7 +82,7 @@ class OpenLineageClient:
|
|
|
82
82
|
transport: Transport | None = None,
|
|
83
83
|
factory: TransportFactory | None = None,
|
|
84
84
|
*,
|
|
85
|
-
config: dict[str,
|
|
85
|
+
config: dict[str, Any] | None = None,
|
|
86
86
|
) -> None:
|
|
87
87
|
# Set parent's logging level if environment variable is present
|
|
88
88
|
custom_logging_level = os.getenv("OPENLINEAGE_CLIENT_LOGGING", None)
|
|
@@ -126,7 +126,15 @@ class OpenLineageClient:
|
|
|
126
126
|
|
|
127
127
|
@classmethod
|
|
128
128
|
def from_dict(cls: type[_T], config: dict[str, str]) -> _T:
|
|
129
|
-
|
|
129
|
+
warnings.warn(
|
|
130
|
+
message=(
|
|
131
|
+
"Using `from_dict` to set transport is deprecated. "
|
|
132
|
+
"Use `config` parameter to fully configure OpenLineageClient."
|
|
133
|
+
),
|
|
134
|
+
category=DeprecationWarning,
|
|
135
|
+
stacklevel=2,
|
|
136
|
+
)
|
|
137
|
+
return cls(transport=get_default_factory().create(config=config), config={"transport": config})
|
|
130
138
|
|
|
131
139
|
def filter_event(
|
|
132
140
|
self,
|
|
@@ -402,8 +402,8 @@ def test_config(mocker: MockerFixture, root: Path) -> None:
|
|
|
402
402
|
|
|
403
403
|
|
|
404
404
|
def test_openlineage_client_from_dict() -> None:
|
|
405
|
-
|
|
406
|
-
client = OpenLineageClient.from_dict(
|
|
405
|
+
transport_dict = {"type": "http", "url": "http://localhost:5050"}
|
|
406
|
+
client = OpenLineageClient.from_dict(transport_dict)
|
|
407
407
|
assert client.transport.url == "http://localhost:5050"
|
|
408
408
|
|
|
409
409
|
|
|
@@ -680,7 +680,7 @@ def test_config_property_loads_user_defined_config() -> None:
|
|
|
680
680
|
)
|
|
681
681
|
def test_client_from_empty_dict_with_dynamic_env_vars() -> None:
|
|
682
682
|
client = OpenLineageClient.from_dict({})
|
|
683
|
-
assert client.transport.
|
|
683
|
+
assert client.transport.kind == ConsoleTransport.kind
|
|
684
684
|
|
|
685
685
|
|
|
686
686
|
@patch.dict(
|
|
@@ -691,7 +691,7 @@ def test_client_from_empty_dict_with_dynamic_env_vars() -> None:
|
|
|
691
691
|
)
|
|
692
692
|
def test_client_from_empty_dict_with_url_env_var() -> None:
|
|
693
693
|
client = OpenLineageClient.from_dict({})
|
|
694
|
-
assert client.transport.
|
|
694
|
+
assert client.transport.kind == ConsoleTransport.kind
|
|
695
695
|
|
|
696
696
|
|
|
697
697
|
@patch.dict(
|
|
@@ -701,15 +701,14 @@ def test_client_from_empty_dict_with_url_env_var() -> None:
|
|
|
701
701
|
"OPENLINEAGE__TRANSPORT__URL": "http://localhost:5050",
|
|
702
702
|
},
|
|
703
703
|
)
|
|
704
|
-
def
|
|
705
|
-
|
|
704
|
+
def test_client_raises_from_wrong_dict() -> None:
|
|
705
|
+
config_without_transport = {
|
|
706
706
|
"facets": {
|
|
707
707
|
"environment_variables": ["VAR1", "VAR2"],
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
assert client.transport.url == "http://localhost:5050"
|
|
710
|
+
with pytest.raises(KeyError):
|
|
711
|
+
OpenLineageClient.from_dict(config_without_transport)
|
|
713
712
|
|
|
714
713
|
|
|
715
714
|
@patch.dict(
|
|
@@ -719,13 +718,11 @@ def test_client_from_facets_config_in_dict_and_env_vars() -> None:
|
|
|
719
718
|
},
|
|
720
719
|
)
|
|
721
720
|
def test_client_from_facets_config_in_env_vars_and_transport_in_config() -> None:
|
|
722
|
-
|
|
723
|
-
"
|
|
724
|
-
|
|
725
|
-
"url": "http://localhost:5050",
|
|
726
|
-
}
|
|
721
|
+
transport_config = {
|
|
722
|
+
"type": "http",
|
|
723
|
+
"url": "http://localhost:5050",
|
|
727
724
|
}
|
|
728
|
-
client = OpenLineageClient.from_dict(
|
|
725
|
+
client = OpenLineageClient.from_dict(transport_config)
|
|
729
726
|
assert client.config.facets.environment_variables == ["VAR1", "VAR2"]
|
|
730
727
|
assert client.transport.url == "http://localhost:5050"
|
|
731
728
|
|
|
@@ -739,11 +736,9 @@ def test_client_from_facets_config_in_env_vars_and_transport_in_config() -> None
|
|
|
739
736
|
@patch("openlineage.client.client.OpenLineageClient._find_yaml_config_path")
|
|
740
737
|
@patch("openlineage.client.client.OpenLineageClient._get_config_file_content")
|
|
741
738
|
def test_config_merge_precedence(mock_get_config_content, mock_find_yaml) -> None:
|
|
742
|
-
|
|
743
|
-
"
|
|
744
|
-
|
|
745
|
-
"url": "http://localhost:5050",
|
|
746
|
-
}
|
|
739
|
+
transport_config = {
|
|
740
|
+
"type": "http",
|
|
741
|
+
"url": "http://localhost:5050",
|
|
747
742
|
}
|
|
748
743
|
mock_find_yaml.return_value = "config.yml"
|
|
749
744
|
mock_get_config_content.return_value = {
|
|
@@ -752,7 +747,7 @@ def test_config_merge_precedence(mock_get_config_content, mock_find_yaml) -> Non
|
|
|
752
747
|
"auth": {"api_key": "another_token"},
|
|
753
748
|
}
|
|
754
749
|
}
|
|
755
|
-
client = OpenLineageClient.from_dict(
|
|
750
|
+
client = OpenLineageClient.from_dict(transport_config)
|
|
756
751
|
config = client.config
|
|
757
752
|
assert config.transport["type"] == "http"
|
|
758
753
|
assert config.transport["url"] == "http://localhost:5050"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/job_type_job.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/parent_run.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/generated/sql_job.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/__init__.py
RENAMED
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/composite.py
RENAMED
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/console.py
RENAMED
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/factory.py
RENAMED
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/file.py
RENAMED
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/http.py
RENAMED
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/kafka.py
RENAMED
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/msk_iam.py
RENAMED
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/noop.py
RENAMED
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/openlineage/client/transport/transport.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openlineage_python-1.24.0 → openlineage_python-1.24.2}/tests/serde_example_dataset_event.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|