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/data_context/types/base.py b/great_expectations/data_context/types/base.py
--- a/great_expectations/data_context/types/base.py
+++ b/great_expectations/data_context/types/base.py
@@ -183,7 +183,11 @@ class Meta:
         unknown = INCLUDE
 
     name = fields.String(required=False, allow_none=True)
-    class_name = fields.String(required=False, allow_none=True, missing="Asset")
+    class_name = fields.String(
+        required=False,
+        allow_none=True,
+        missing="Asset",
+    )
     module_name = fields.String(
         required=False,
         all_none=True,
@@ -270,17 +274,33 @@ class Meta:
         unknown = INCLUDE
 
     name = fields.String(required=True)
-    class_name = fields.String(required=True)
+    class_name = fields.String(
+        required=True,
+        allow_none=False,
+    )
     module_name = fields.String(
-        missing="great_expectations.datasource.data_connector.sorter"
+        required=False,
+        allow_none=True,
+        missing="great_expectations.datasource.data_connector.sorter",
+    )
+    orderby = fields.String(
+        required=False,
+        allow_none=True,
+        missing="asc",
     )
-    orderby = fields.String(required=False, missing="asc", allow_none=False)
 
     # allow_none = True because it is only used by some Sorters
     reference_list = fields.List(
-        cls_or_instance=fields.Str(), required=False, missing=None, allow_none=True
+        cls_or_instance=fields.Str(),
+        required=False,
+        missing=None,
+        allow_none=True,
+    )
+    datetime_format = fields.String(
+        required=False,
+        missing=None,
+        allow_none=True,
     )
-    datetime_format = fields.String(required=False, missing=None, allow_none=True)
 
     @validates_schema
     def validate_schema(self, data, **kwargs):
@@ -387,8 +407,15 @@ class DataConnectorConfigSchema(Schema):
     class Meta:
         unknown = INCLUDE
 
-    class_name = fields.String(required=True)
-    module_name = fields.String(missing="great_expectations.datasource.data_connector")
+    class_name = fields.String(
+        required=True,
+        allow_none=False,
+    )
+    module_name = fields.String(
+        required=False,
+        allow_nonw=True,
+        missing="great_expectations.datasource.data_connector",
+    )
 
     assets = fields.Dict(
         keys=fields.Str(),
@@ -677,8 +704,15 @@ class ExecutionEngineConfigSchema(Schema):
     class Meta:
         unknown = INCLUDE
 
-    class_name = fields.String(required=True)
-    module_name = fields.String(missing="great_expectations.execution_engine")
+    class_name = fields.String(
+        required=True,
+        allow_none=False,
+    )
+    module_name = fields.String(
+        required=False,
+        allow_none=True,
+        missing="great_expectations.execution_engine",
+    )
     connection_string = fields.String(required=False, allow_none=True)
     credentials = fields.Raw(required=False, allow_none=True)
     spark_config = fields.Raw(required=False, allow_none=True)
@@ -818,8 +852,16 @@ class DatasourceConfigSchema(Schema):
     class Meta:
         unknown = INCLUDE
 
-    class_name = fields.String(missing="Datasource")
-    module_name = fields.String(missing="great_expectations.datasource")
+    class_name = fields.String(
+        required=False,
+        allow_none=True,
+        missing="Datasource",
+    )
+    module_name = fields.String(
+        required=False,
+        allow_none=True,
+        missing="great_expectations.datasource",
+    )
     force_reuse_spark_context = fields.Bool(required=False, allow_none=True)
     spark_config = fields.Dict(
         keys=fields.Str(), values=fields.Str(), required=False, allow_none=True
@@ -2124,10 +2166,15 @@ class Meta:
         allow_none=True,
     )
     template_name = fields.String(required=False, allow_none=True)
+    class_name = fields.Str(
+        required=False,
+        allow_none=True,
+    )
     module_name = fields.String(
-        required=False, allow_none=True, missing="great_expectations.checkpoint"
+        required=False,
+        allow_none=True,
+        missing="great_expectations.checkpoint",
     )
-    class_name = fields.Str(required=False, allow_none=True)
     run_name_template = fields.String(required=False, allow_none=True)
     expectation_suite_name = fields.String(required=False, allow_none=True)
     expectation_suite_ge_cloud_id = fields.UUID(required=False, allow_none=True)


Test patch:
diff --git a/tests/integration/profiling/rule_based_profilers/test_profiler_user_workflows.py b/tests/integration/profiling/rule_based_profilers/test_profiler_user_workflows.py
--- a/tests/integration/profiling/rule_based_profilers/test_profiler_user_workflows.py
+++ b/tests/integration/profiling/rule_based_profilers/test_profiler_user_workflows.py
@@ -242,6 +242,7 @@ def test_bobby_profiler_user_workflow_multi_batch_row_count_range_rule_and_colum
     )
 
 
+@probabilistic_test
 @pytest.mark.skipif(
     version.parse(np.version.version) < version.parse("1.21.0"),
     reason="requires numpy version 1.21.0 or newer",
@@ -382,6 +383,7 @@ def test_bobby_expect_column_values_to_be_between_auto_yes_default_profiler_conf
     }
 
 
+@probabilistic_test
 @pytest.mark.skipif(
     version.parse(np.version.version) < version.parse("1.21.0"),
     reason="requires numpy version 1.21.0 or newer",
@@ -630,6 +632,7 @@ def test_bobby_expect_column_values_to_be_between_auto_yes_default_profiler_conf
     }
 
 
+@probabilistic_test
 @pytest.mark.skipif(
     version.parse(np.version.version) < version.parse("1.21.0"),
     reason="requires numpy version 1.21.0 or newer",