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/rule_based_profiler/expectation_configuration_builder/expectation_configuration_builder.py b/great_expectations/rule_based_profiler/expectation_configuration_builder/expectation_configuration_builder.py
--- a/great_expectations/rule_based_profiler/expectation_configuration_builder/expectation_configuration_builder.py
+++ b/great_expectations/rule_based_profiler/expectation_configuration_builder/expectation_configuration_builder.py
@@ -105,27 +105,27 @@ def build_expectation_configuration(
         Returns:
             ExpectationConfiguration object.
         """
-        self.set_batch_list_or_batch_request(
-            batch_list=batch_list,
-            batch_request=batch_request,
-            force_batch_data=force_batch_data,
-        )
-
-        self._resolve_validation_dependencies(
+        self.resolve_validation_dependencies(
             domain=domain,
             variables=variables,
             parameters=parameters,
+            batch_list=batch_list,
+            batch_request=batch_request,
+            force_batch_data=force_batch_data,
         )
 
         return self._build_expectation_configuration(
             domain=domain, variables=variables, parameters=parameters
         )
 
-    def _resolve_validation_dependencies(
+    def resolve_validation_dependencies(
         self,
         domain: Domain,
         variables: Optional[ParameterContainer] = None,
         parameters: Optional[Dict[str, ParameterContainer]] = None,
+        batch_list: Optional[List[Batch]] = None,
+        batch_request: Optional[Union[BatchRequestBase, dict]] = None,
+        force_batch_data: bool = False,
     ) -> None:
         validation_parameter_builders: List[ParameterBuilder] = (
             self.validation_parameter_builders or []
@@ -133,15 +133,15 @@ def _resolve_validation_dependencies(
 
         validation_parameter_builder: ParameterBuilder
         for validation_parameter_builder in validation_parameter_builders:
-            validation_parameter_builder.set_batch_list_or_batch_request(
-                batch_list=self.batch_list,
-                batch_request=self.batch_request,
-                force_batch_data=False,
-            )
             validation_parameter_builder.build_parameters(
                 domain=domain,
                 variables=variables,
                 parameters=parameters,
+                parameter_computation_impl=None,
+                json_serialize=None,
+                batch_list=batch_list,
+                batch_request=batch_request,
+                force_batch_data=force_batch_data,
             )
 
     @abstractmethod
diff --git a/great_expectations/rule_based_profiler/parameter_builder/parameter_builder.py b/great_expectations/rule_based_profiler/parameter_builder/parameter_builder.py
--- a/great_expectations/rule_based_profiler/parameter_builder/parameter_builder.py
+++ b/great_expectations/rule_based_profiler/parameter_builder/parameter_builder.py
@@ -160,7 +160,7 @@ def build_parameters(
             variables: attribute name/value pairs
             parameters: Dictionary of ParameterContainer objects corresponding to all Domain context in memory.
             parameter_computation_impl: Object containing desired ParameterBuilder implementation.
-            json_serialize: If True (default), convert computed value to JSON prior to saving results.
+            json_serialize: If absent, use property value (in standard way, supporting variables look-up).
             batch_list: Explicit list of Batch objects to supply data at runtime.
             batch_request: Explicit batch_request used to supply data at runtime.
             force_batch_data: Whether or not to overwrite existing batch_request value in ParameterBuilder components.
diff --git a/great_expectations/rule_based_profiler/parameter_builder/simple_date_format_string_parameter_builder.py b/great_expectations/rule_based_profiler/parameter_builder/simple_date_format_string_parameter_builder.py
--- a/great_expectations/rule_based_profiler/parameter_builder/simple_date_format_string_parameter_builder.py
+++ b/great_expectations/rule_based_profiler/parameter_builder/simple_date_format_string_parameter_builder.py
@@ -98,7 +98,7 @@ def __init__(
         threshold: Union[str, float] = 1.0,
         candidate_strings: Optional[Union[Iterable[str], str]] = None,
         evaluation_parameter_builder_configs: Optional[List[dict]] = None,
-        json_serialize: bool = True,
+        json_serialize: Union[str, bool] = True,
         batch_list: Optional[List[Batch]] = None,
         batch_request: Optional[
             Union[str, BatchRequest, RuntimeBatchRequest, dict]


Test patch: