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/assets/partners/anthonydb/just_connect.py b/assets/partners/anthonydb/just_connect.py
new file mode 100644
--- /dev/null
+++ b/assets/partners/anthonydb/just_connect.py
@@ -0,0 +1,10 @@
+import sqlalchemy as sa
+
+connection = "mssql://sa:BK72nEAoI72CSWmP@db:1433/integration?driver=ODBC+Driver+17+for+SQL+Server&charset=utf&autocommit=true"
+e = sa.create_engine(connection)
+results = e.execute("SELECT TOP 10 * from dbo.taxi_data").fetchall()
+for r in results:
+
+    print(r)
+
+print("finish")
diff --git a/assets/partners/anthonydb/run.py b/assets/partners/anthonydb/run.py
new file mode 100644
--- /dev/null
+++ b/assets/partners/anthonydb/run.py
@@ -0,0 +1,65 @@
+import os
+
+from ruamel import yaml
+
+import great_expectations as ge
+from great_expectations.core.batch import BatchRequest, RuntimeBatchRequest
+
+
+def test_ge():
+
+    CONNECTION_STRING = os.environ.get("DB_URL")
+
+    context = ge.get_context()
+
+    datasource_config = {
+        "name": "my_datasource",
+        "class_name": "Datasource",
+        "execution_engine": {
+            "class_name": "SqlAlchemyExecutionEngine",
+            "connection_string": CONNECTION_STRING,
+            "create_temp_table": False,
+        },
+        "data_connectors": {
+            "default_runtime_data_connector_name": {
+                "class_name": "RuntimeDataConnector",
+                "batch_identifiers": ["default_identifier_name"],
+            },
+            "default_inferred_data_connector_name": {
+                "class_name": "InferredAssetSqlDataConnector",
+                "include_schema_name": True,
+            },
+        },
+    }
+
+    # Please note this override is only to provide good UX for docs and tests.
+    # In normal usage you'd set your path directly in the yaml above.
+    datasource_config["execution_engine"]["connection_string"] = CONNECTION_STRING
+
+    context.test_yaml_config(yaml.dump(datasource_config))
+
+    context.add_datasource(**datasource_config)
+
+    # First test for RuntimeBatchRequest using a query
+    batch_request = RuntimeBatchRequest(
+        datasource_name="my_datasource",
+        data_connector_name="default_runtime_data_connector_name",
+        data_asset_name="default_name",  # this can be anything that identifies this data
+        runtime_parameters={"query": "SELECT TOP 10 * from dbo.taxi_data"},
+        batch_identifiers={"default_identifier_name": "default_identifier"},
+        batch_spec_passthrough={"create_temp_table": False},
+    )
+
+    context.create_expectation_suite(
+        expectation_suite_name="test_suite", overwrite_existing=True
+    )
+    validator = context.get_validator(
+        batch_request=batch_request, expectation_suite_name="test_suite"
+    )
+    print(validator.head())
+
+    # NOTE: The following code is only for testing and can be ignored by users.
+
+    assert isinstance(validator, ge.validator.validator.Validator)
+
+    # TODO Run additional tests for your datasource
diff --git a/assets/partners/rubenshift/run.py b/assets/partners/rubenshift/run.py
new file mode 100644
--- /dev/null
+++ b/assets/partners/rubenshift/run.py
@@ -0,0 +1,63 @@
+import os
+
+from ruamel import yaml
+
+import great_expectations as ge
+from great_expectations.core.batch import BatchRequest, RuntimeBatchRequest
+
+
+def test_ge():
+
+    CONNECTION_STRING = os.environ.get("DB_URL")
+
+    context = ge.get_context()
+
+    datasource_config = {
+        "name": "my_datasource",
+        "class_name": "Datasource",
+        "execution_engine": {
+            "class_name": "SqlAlchemyExecutionEngine",
+            "connection_string": CONNECTION_STRING,
+            "create_temp_table": False,
+        },
+        "data_connectors": {
+            "default_runtime_data_connector_name": {
+                "class_name": "RuntimeDataConnector",
+                "batch_identifiers": ["default_identifier_name"],
+            },
+            "default_inferred_data_connector_name": {
+                "class_name": "InferredAssetSqlDataConnector",
+                "include_schema_name": True,
+            },
+        },
+    }
+
+    # Please note this override is only to provide good UX for docs and tests.
+    # In normal usage you'd set your path directly in the yaml above.
+    datasource_config["execution_engine"]["connection_string"] = CONNECTION_STRING
+
+    context.test_yaml_config(yaml.dump(datasource_config))
+
+    context.add_datasource(**datasource_config)
+
+    # First test for RuntimeBatchRequest using a query
+    batch_request = RuntimeBatchRequest(
+        datasource_name="my_datasource",
+        data_connector_name="default_runtime_data_connector_name",
+        data_asset_name="default_name",  # this can be anything that identifies this data
+        runtime_parameters={"query": "SELECT * from date LIMIT 10"},
+        batch_identifiers={"default_identifier_name": "default_identifier"},
+        batch_spec_passthrough={"create_temp_table": False},
+    )
+
+    context.create_expectation_suite(
+        expectation_suite_name="test_suite", overwrite_existing=True
+    )
+    validator = context.get_validator(
+        batch_request=batch_request, expectation_suite_name="test_suite"
+    )
+    print(validator.head())
+
+    assert isinstance(validator, ge.validator.validator.Validator)
+
+    # TODO Run additional tests for your datasource


Test patch: