diff --git a/great_expectations/datasource/fluent/interfaces.py b/great_expectations/datasource/fluent/interfaces.py index 9f1c20f93eeb..5f8abb1035fd 100644 --- a/great_expectations/datasource/fluent/interfaces.py +++ b/great_expectations/datasource/fluent/interfaces.py @@ -464,7 +464,7 @@ def get_asset(self, asset_name: str) -> _DataAssetT: f"'{asset_name}' not found. Available assets are {list(self.assets.keys())}" ) from exc - def add_asset( + def _add_asset( self, asset: _DataAssetT, connect_options: dict | None = None ) -> _DataAssetT: """Adds an asset to a datasource diff --git a/great_expectations/datasource/fluent/pandas_azure_blob_storage_datasource.py b/great_expectations/datasource/fluent/pandas_azure_blob_storage_datasource.py index 711baa98b2c0..8b42e8b64eeb 100644 --- a/great_expectations/datasource/fluent/pandas_azure_blob_storage_datasource.py +++ b/great_expectations/datasource/fluent/pandas_azure_blob_storage_datasource.py @@ -176,7 +176,7 @@ def add_csv_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def add_excel_asset( self, @@ -232,7 +232,7 @@ def add_excel_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def add_json_asset( self, @@ -288,7 +288,7 @@ def add_json_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def add_parquet_asset( self, @@ -342,7 +342,7 @@ def add_parquet_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) # attr-defined issue # https://github.com/python/mypy/issues/12472 diff --git a/great_expectations/datasource/fluent/pandas_datasource.py b/great_expectations/datasource/fluent/pandas_datasource.py index 5988e718b6e6..76722a2dc7e7 100644 --- a/great_expectations/datasource/fluent/pandas_datasource.py +++ b/great_expectations/datasource/fluent/pandas_datasource.py @@ -512,7 +512,7 @@ def add_dataframe_asset(self, name: str, dataframe: pd.DataFrame) -> DataFrameAs name=name, dataframe=dataframe, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_dataframe( self, dataframe: pd.DataFrame, asset_name: Optional[str] = None @@ -529,7 +529,7 @@ def add_clipboard_asset(self, name: str, **kwargs) -> ClipboardAsset: # type: i name=name, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_clipboard(self, asset_name: Optional[str] = None, **kwargs) -> Validator: if not asset_name: @@ -548,7 +548,7 @@ def add_csv_asset( filepath_or_buffer=filepath_or_buffer, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_csv( self, @@ -573,7 +573,7 @@ def add_excel_asset( io=io, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_excel( self, @@ -598,7 +598,7 @@ def add_feather_asset( path=path, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_feather( self, @@ -623,7 +623,7 @@ def add_gbq_asset( query=query, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_gbq( self, @@ -648,7 +648,7 @@ def add_hdf_asset( path_or_buf=path_or_buf, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_hdf( self, @@ -673,7 +673,7 @@ def add_html_asset( io=io, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_html( self, @@ -701,7 +701,7 @@ def add_json_asset( path_or_buf=path_or_buf, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_json( self, @@ -726,7 +726,7 @@ def add_orc_asset( path=path, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_orc( self, @@ -751,7 +751,7 @@ def add_parquet_asset( path=path, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_parquet( self, @@ -779,7 +779,7 @@ def add_pickle_asset( filepath_or_buffer=filepath_or_buffer, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_pickle( self, @@ -807,7 +807,7 @@ def add_sas_asset( filepath_or_buffer=filepath_or_buffer, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_sas( self, @@ -832,7 +832,7 @@ def add_spss_asset( path=path, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_spss( self, @@ -862,7 +862,7 @@ def add_sql_asset( con=con, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_sql( self, @@ -894,7 +894,7 @@ def add_sql_query_asset( con=con, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_sql_query( self, @@ -922,7 +922,7 @@ def add_sql_table_asset( con=con, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_sql_table( self, @@ -952,7 +952,7 @@ def add_stata_asset( filepath_or_buffer=filepath_or_buffer, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_stata( self, @@ -980,7 +980,7 @@ def add_table_asset( filepath_or_buffer=filepath_or_buffer, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_table( self, @@ -1005,7 +1005,7 @@ def add_xml_asset( path_or_buffer=path_or_buffer, **kwargs, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def read_xml( self, diff --git a/great_expectations/datasource/fluent/pandas_dbfs_datasource.py b/great_expectations/datasource/fluent/pandas_dbfs_datasource.py index 8533942ebaa4..6aff7821c186 100644 --- a/great_expectations/datasource/fluent/pandas_dbfs_datasource.py +++ b/great_expectations/datasource/fluent/pandas_dbfs_datasource.py @@ -81,7 +81,7 @@ def add_csv_asset( base_directory=self.base_directory, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) @public_api def add_excel_asset( @@ -130,7 +130,7 @@ def add_excel_asset( base_directory=self.base_directory, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) @public_api def add_json_asset( @@ -179,7 +179,7 @@ def add_json_asset( base_directory=self.base_directory, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) @public_api def add_parquet_asset( @@ -228,7 +228,7 @@ def add_parquet_asset( base_directory=self.base_directory, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) # attr-defined issue # https://github.com/python/mypy/issues/12472 diff --git a/great_expectations/datasource/fluent/pandas_google_cloud_storage_datasource.py b/great_expectations/datasource/fluent/pandas_google_cloud_storage_datasource.py index c2d5125cd82e..bb38b5dad2fb 100644 --- a/great_expectations/datasource/fluent/pandas_google_cloud_storage_datasource.py +++ b/great_expectations/datasource/fluent/pandas_google_cloud_storage_datasource.py @@ -183,7 +183,7 @@ def add_csv_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def add_excel_asset( self, @@ -236,7 +236,7 @@ def add_excel_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def add_json_asset( self, @@ -289,7 +289,7 @@ def add_json_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def add_parquet_asset( self, @@ -342,7 +342,7 @@ def add_parquet_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) # attr-defined issue # https://github.com/python/mypy/issues/12472 diff --git a/great_expectations/datasource/fluent/pandas_s3_datasource.py b/great_expectations/datasource/fluent/pandas_s3_datasource.py index 4700dd22892f..55378eebaa3d 100644 --- a/great_expectations/datasource/fluent/pandas_s3_datasource.py +++ b/great_expectations/datasource/fluent/pandas_s3_datasource.py @@ -155,7 +155,7 @@ def add_csv_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def add_excel_asset( self, @@ -208,7 +208,7 @@ def add_excel_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def add_json_asset( self, @@ -261,7 +261,7 @@ def add_json_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) def add_parquet_asset( self, @@ -314,7 +314,7 @@ def add_parquet_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) # attr-defined issue # https://github.com/python/mypy/issues/12472 diff --git a/great_expectations/datasource/fluent/sources.py b/great_expectations/datasource/fluent/sources.py index ee522a3fdf35..46747a9a19d9 100644 --- a/great_expectations/datasource/fluent/sources.py +++ b/great_expectations/datasource/fluent/sources.py @@ -291,7 +291,7 @@ def _add_asset_factory( connect_options = {} asset = asset_type(name=name, **kwargs) - return self.add_asset(asset, connect_options=connect_options) + return self._add_asset(asset, connect_options=connect_options) # attr-defined issue # https://github.com/python/mypy/issues/12472 @@ -309,7 +309,7 @@ def _read_asset_factory( ) -> Validator: name = asset_name or DEFAULT_PANDAS_DATA_ASSET_NAME asset = asset_type(name=name, **kwargs) - self.add_asset(asset) + self._add_asset(asset) batch_request = asset.build_batch_request() return self._data_context.get_validator(batch_request=batch_request) # type: ignore[attr-defined] diff --git a/great_expectations/datasource/fluent/spark_azure_blob_storage_datasource.py b/great_expectations/datasource/fluent/spark_azure_blob_storage_datasource.py index 94e858938505..0b84270a3b37 100644 --- a/great_expectations/datasource/fluent/spark_azure_blob_storage_datasource.py +++ b/great_expectations/datasource/fluent/spark_azure_blob_storage_datasource.py @@ -173,4 +173,4 @@ def add_csv_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) diff --git a/great_expectations/datasource/fluent/spark_datasource.py b/great_expectations/datasource/fluent/spark_datasource.py index e33259040707..7f79e3af7466 100644 --- a/great_expectations/datasource/fluent/spark_datasource.py +++ b/great_expectations/datasource/fluent/spark_datasource.py @@ -170,4 +170,4 @@ def add_dataframe_asset(self, name: str, dataframe: DataFrame) -> DataFrameAsset name=name, dataframe=dataframe, ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) diff --git a/great_expectations/datasource/fluent/spark_dbfs_datasource.py b/great_expectations/datasource/fluent/spark_dbfs_datasource.py index a9069acb9d36..1e436fccc1e6 100644 --- a/great_expectations/datasource/fluent/spark_dbfs_datasource.py +++ b/great_expectations/datasource/fluent/spark_dbfs_datasource.py @@ -80,4 +80,4 @@ def add_csv_asset( base_directory=self.base_directory, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) diff --git a/great_expectations/datasource/fluent/spark_filesystem_datasource.py b/great_expectations/datasource/fluent/spark_filesystem_datasource.py index 244d7e11d7d7..9ca85cbf0bbe 100644 --- a/great_expectations/datasource/fluent/spark_filesystem_datasource.py +++ b/great_expectations/datasource/fluent/spark_filesystem_datasource.py @@ -98,4 +98,4 @@ def add_csv_asset( base_directory=self.base_directory, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) diff --git a/great_expectations/datasource/fluent/spark_google_cloud_storage_datasource.py b/great_expectations/datasource/fluent/spark_google_cloud_storage_datasource.py index 9c6663eff216..f41d1f311dab 100644 --- a/great_expectations/datasource/fluent/spark_google_cloud_storage_datasource.py +++ b/great_expectations/datasource/fluent/spark_google_cloud_storage_datasource.py @@ -180,4 +180,4 @@ def add_csv_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) diff --git a/great_expectations/datasource/fluent/spark_s3_datasource.py b/great_expectations/datasource/fluent/spark_s3_datasource.py index bc327d586c4f..4b229e71df09 100644 --- a/great_expectations/datasource/fluent/spark_s3_datasource.py +++ b/great_expectations/datasource/fluent/spark_s3_datasource.py @@ -154,4 +154,4 @@ def add_csv_asset( delimiter=delimiter, ) ) - return self.add_asset(asset=asset) + return self._add_asset(asset=asset) diff --git a/great_expectations/datasource/fluent/sql_datasource.py b/great_expectations/datasource/fluent/sql_datasource.py index a39185a2ec88..3e2408601bc2 100644 --- a/great_expectations/datasource/fluent/sql_datasource.py +++ b/great_expectations/datasource/fluent/sql_datasource.py @@ -925,7 +925,7 @@ def add_table_asset( schema_name=schema_name, order_by=order_by_sorters, ) - return self.add_asset(asset) + return self._add_asset(asset) @public_api def add_query_asset( @@ -952,4 +952,4 @@ def add_query_asset( query=query, order_by=order_by_sorters, ) - return self.add_asset(asset) + return self._add_asset(asset)