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/parameter_builder/numeric_metric_range_multi_batch_parameter_builder.py b/great_expectations/rule_based_profiler/parameter_builder/numeric_metric_range_multi_batch_parameter_builder.py
--- a/great_expectations/rule_based_profiler/parameter_builder/numeric_metric_range_multi_batch_parameter_builder.py
+++ b/great_expectations/rule_based_profiler/parameter_builder/numeric_metric_range_multi_batch_parameter_builder.py
@@ -18,7 +18,7 @@
     get_parameter_value_and_validate_return_type,
     import_scipy_stats_bootstrap_function,
 )
-from great_expectations.util import import_library_module, is_numeric
+from great_expectations.util import is_numeric
 from great_expectations.validator.validator import Validator
 
 bootstrap: Optional[Callable] = import_scipy_stats_bootstrap_function()
@@ -340,6 +340,7 @@ def _get_bootstrap_confidence_interval(
                 vectorized=False,
                 confidence_level=confidence_level,
                 random_state=rng,
+                method="basic",
             )
         else:
             bootstrap_result = bootstrap(
@@ -349,6 +350,7 @@ def _get_bootstrap_confidence_interval(
                 confidence_level=confidence_level,
                 n_resamples=num_bootstrap_samples,
                 random_state=rng,
+                method="basic",
             )
 
         confidence_interval: ConfidenceInterval = bootstrap_result.confidence_interval


Test patch:
diff --git a/tests/integration/docusaurus/expectations/advanced/multi_batch_rule_based_profiler_example.py b/tests/integration/docusaurus/expectations/advanced/multi_batch_rule_based_profiler_example.py
--- a/tests/integration/docusaurus/expectations/advanced/multi_batch_rule_based_profiler_example.py
+++ b/tests/integration/docusaurus/expectations/advanced/multi_batch_rule_based_profiler_example.py
@@ -1,16 +1,14 @@
 from ruamel import yaml
 
 from great_expectations import DataContext
-from great_expectations.marshmallow__shade.validate import Validator
 from great_expectations.rule_based_profiler.profiler import Profiler
 
 profiler_config = """
 # This profiler is meant to be used on the NYC taxi data (yellow_trip_data_sample_<YEAR>-<MONTH>.csv)
 # located in tests/test_sets/taxi_yellow_trip_data_samples/
 variables:
-  false_positive_rate: 1.0e-2
+  confidence_level: 9.75e-1
   mostly: 1.0
-
 rules:
   row_count_rule:
     domain_builder:
@@ -26,9 +24,9 @@
               index: "-6:-1"
         metric_name: table.row_count
         metric_domain_kwargs: $domain.domain_kwargs
-        false_positive_rate: $variables.false_positive_rate
+        confidence_level: $variables.confidence_level
         round_decimals: 0
-        truncate_distribution:
+        truncate_values:
           lower_bound: 0
     expectation_configuration_builders:
       - expectation_type: expect_table_row_count_to_be_between
@@ -62,7 +60,7 @@
               index: "-6:-1"
         metric_name: column.min
         metric_domain_kwargs: $domain.domain_kwargs
-        false_positive_rate: $variables.false_positive_rate
+        confidence_level: $variables.confidence_level
         round_decimals: 2
       - parameter_name: max_range
         class_name: NumericMetricRangeMultiBatchParameterBuilder
@@ -74,7 +72,7 @@
               index: "-6:-1"
         metric_name: column.max
         metric_domain_kwargs: $domain.domain_kwargs
-        false_positive_rate: $variables.false_positive_rate
+        confidence_level: $variables.confidence_level
         round_decimals: 2
     expectation_configuration_builders:
       - expectation_type: expect_column_min_to_be_between
@@ -99,16 +97,14 @@
 
 data_context = DataContext()
 
-
 # Instantiate Profiler
 full_profiler_config_dict: dict = yaml.load(profiler_config)
-
 profiler: Profiler = Profiler(
     profiler_config=full_profiler_config_dict,
     data_context=data_context,
 )
 
-suite = profiler.profile()
+suite = profiler.profile(expectation_suite_name="test_suite_name")
 print(suite)
 
 # Please note that this docstring is here to demonstrate output for docs. It is not needed for normal use.
diff --git a/tests/integration/test_script_runner.py b/tests/integration/test_script_runner.py
--- a/tests/integration/test_script_runner.py
+++ b/tests/integration/test_script_runner.py
@@ -3,7 +3,6 @@
 import shutil
 import subprocess
 import sys
-from collections import defaultdict
 
 import pytest
 
diff --git a/tests/test_packaging.py b/tests/test_packaging.py
--- a/tests/test_packaging.py
+++ b/tests/test_packaging.py
@@ -33,11 +33,6 @@ def test_requirements_files():
             f'{line.name}{"".join(line.specs[0])}' for line in rp.parse(req)
         }
 
-    with open(file_relative_path(__file__, "../requirements-dev-scicomp.txt")) as req:
-        requirements_dev_scicomp = {
-            f'{line.name}{"".join(line.specs[0])}' for line in rp.parse(req)
-        }
-
     assert requirements <= requirements_dev
 
     assert requirements_dev_base.intersection(requirements_dev_spark) == set()
@@ -45,14 +40,9 @@ def test_requirements_files():
 
     assert requirements_dev_spark.intersection(requirements_dev_sqlalchemy) == set()
 
-    assert (
-        requirements_dev
-        - (
-            requirements
-            | requirements_dev_base
-            | requirements_dev_sqlalchemy
-            | requirements_dev_spark
-            | requirements_dev_scicomp
-        )
-        == set()
-    )
+    assert requirements_dev - (
+        requirements
+        | requirements_dev_base
+        | requirements_dev_sqlalchemy
+        | requirements_dev_spark
+    ) <= {"numpy>=1.21.0", "scipy>=1.7.0"}