Repository: great-expectations/great_expectations

Issue:
Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`


Discussion:
Done inline during improve_partitions push.

Resolving patch:
diff --git a/great_expectations/datasource/data_connector/configured_asset_sql_data_connector.py b/great_expectations/datasource/data_connector/configured_asset_sql_data_connector.py
--- a/great_expectations/datasource/data_connector/configured_asset_sql_data_connector.py
+++ b/great_expectations/datasource/data_connector/configured_asset_sql_data_connector.py
@@ -36,13 +36,6 @@
 class ConfiguredAssetSqlDataConnector(DataConnector):
     """
     A DataConnector that requires explicit listing of SQL tables you want to connect to.
-
-    Args:
-        name (str): The name of this DataConnector
-        datasource_name (str): The name of the Datasource that contains it
-        execution_engine (ExecutionEngine): An ExecutionEngine
-        assets (str): assets
-        batch_spec_passthrough (dict): dictionary with keys that will be added directly to batch_spec
     """
 
     def __init__(
@@ -50,8 +43,6 @@ def __init__(
         name: str,
         datasource_name: str,
         execution_engine: Optional[ExecutionEngine] = None,
-        data_asset_name_prefix: str = "",
-        data_asset_name_suffix: str = "",
         include_schema_name: bool = False,
         splitter_method: Optional[str] = None,
         splitter_kwargs: Optional[dict] = None,
@@ -62,14 +53,12 @@ def __init__(
         id: Optional[str] = None,
     ) -> None:
         """
-        InferredAssetDataConnector for connecting to data on a SQL database
+        ConfiguredAssetDataConnector for connecting to data on a SQL database
 
         Args:
             name (str): The name of this DataConnector
             datasource_name (str): The name of the Datasource that contains it
             execution_engine (ExecutionEngine): An ExecutionEngine
-            data_asset_name_prefix (str): An optional prefix to prepend to inferred data_asset_names
-            data_asset_name_suffix (str): An optional suffix to append to inferred data_asset_names
             include_schema_name (bool): Should the data_asset_name include the schema as a prefix?
             splitter_method (str): A method to split the target table into multiple Batches
             splitter_kwargs (dict): Keyword arguments to pass to splitter_method
@@ -88,8 +77,6 @@ def __init__(
             batch_spec_passthrough=batch_spec_passthrough,
         )
 
-        self._data_asset_name_prefix = data_asset_name_prefix
-        self._data_asset_name_suffix = data_asset_name_suffix
         self._include_schema_name = include_schema_name
         self._splitter_method = splitter_method
         self._splitter_kwargs = splitter_kwargs
@@ -106,14 +93,6 @@ def __init__(
     def execution_engine(self) -> SqlAlchemyExecutionEngine:
         return cast(SqlAlchemyExecutionEngine, self._execution_engine)
 
-    @property
-    def data_asset_name_prefix(self) -> str:
-        return self._data_asset_name_prefix
-
-    @property
-    def data_asset_name_suffix(self) -> str:
-        return self._data_asset_name_suffix
-
     @property
     def include_schema_name(self) -> bool:
         return self._include_schema_name
@@ -336,11 +315,16 @@ def _update_data_asset_name_from_config(
 
         data_asset_name: str = f"{schema_name}{data_asset_name}"
 
+        """
+        In order to support "SimpleSqlalchemyDatasource", which supports "data_asset_name_prefix" and
+        "data_asset_name_suffix" as part of "tables" (reserved key for configuring "ConfiguredAssetSqlDataConnector" for
+        a table), these configuration attributes can exist in "data_asset_config" and must be handled appropriately.
+        """
         data_asset_name_prefix: str = data_asset_config.get(
-            "data_asset_name_prefix", self.data_asset_name_prefix
+            "data_asset_name_prefix", ""
         )
         data_asset_name_suffix: str = data_asset_config.get(
-            "data_asset_name_suffix", self.data_asset_name_suffix
+            "data_asset_name_suffix", ""
         )
 
         data_asset_name: str = (
diff --git a/great_expectations/datasource/data_connector/inferred_asset_sql_data_connector.py b/great_expectations/datasource/data_connector/inferred_asset_sql_data_connector.py
--- a/great_expectations/datasource/data_connector/inferred_asset_sql_data_connector.py
+++ b/great_expectations/datasource/data_connector/inferred_asset_sql_data_connector.py
@@ -67,8 +67,6 @@ def __init__(
             name=name,
             datasource_name=datasource_name,
             execution_engine=execution_engine,
-            data_asset_name_prefix=data_asset_name_prefix,
-            data_asset_name_suffix=data_asset_name_suffix,
             include_schema_name=include_schema_name,
             splitter_method=splitter_method,
             splitter_kwargs=splitter_kwargs,
@@ -79,6 +77,9 @@ def __init__(
             id=id,
         )
 
+        self._data_asset_name_prefix = data_asset_name_prefix
+        self._data_asset_name_suffix = data_asset_name_suffix
+
         self._excluded_tables = excluded_tables
         self._included_tables = included_tables
         self._skip_inapplicable_tables = skip_inapplicable_tables
@@ -93,6 +94,14 @@ def __init__(
 
         self._refresh_introspected_assets_cache()
 
+    @property
+    def data_asset_name_prefix(self) -> str:
+        return self._data_asset_name_prefix
+
+    @property
+    def data_asset_name_suffix(self) -> str:
+        return self._data_asset_name_suffix
+
     def _refresh_data_references_cache(self) -> None:
         self._refresh_introspected_assets_cache()
         super()._refresh_data_references_cache()
@@ -123,6 +132,8 @@ def _refresh_introspected_assets_cache(self) -> None:
                 properties={
                     "type": metadata["type"],
                     "table_name": table_name,
+                    "data_asset_name_prefix": self.data_asset_name_prefix,
+                    "data_asset_name_suffix": self.data_asset_name_suffix,
                     "include_schema_name": self.include_schema_name,
                     "schema_name": metadata["schema_name"],
                     "splitter_method": self.splitter_method,


Test patch: