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/domain_builder/categorical_column_domain_builder.py b/great_expectations/rule_based_profiler/domain_builder/categorical_column_domain_builder.py
--- a/great_expectations/rule_based_profiler/domain_builder/categorical_column_domain_builder.py
+++ b/great_expectations/rule_based_profiler/domain_builder/categorical_column_domain_builder.py
@@ -34,11 +34,6 @@ class CategoricalColumnDomainBuilder(ColumnDomainBuilder):
 
     def __init__(
         self,
-        batch_list: Optional[List[Batch]] = None,
-        batch_request: Optional[
-            Union[str, BatchRequest, RuntimeBatchRequest, dict]
-        ] = None,
-        data_context: Optional["DataContext"] = None,  # noqa: F821
         include_column_names: Optional[Union[str, Optional[List[str]]]] = None,
         exclude_column_names: Optional[Union[str, Optional[List[str]]]] = None,
         include_column_name_suffixes: Optional[Union[str, Iterable, List[str]]] = None,
@@ -57,6 +52,11 @@ def __init__(
         limit_mode: Optional[Union[CardinalityLimitMode, str]] = None,
         max_unique_values: Optional[Union[str, int]] = None,
         max_proportion_unique: Optional[Union[str, float]] = None,
+        batch_list: Optional[List[Batch]] = None,
+        batch_request: Optional[
+            Union[str, BatchRequest, RuntimeBatchRequest, dict]
+        ] = None,
+        data_context: Optional["DataContext"] = None,  # noqa: F821
     ):
         """Create column domains where cardinality is within the specified limit.
 
@@ -74,9 +74,6 @@ def __init__(
         these will not be considered.
 
         Args:
-            batch_list: explicitly specified Batch objects for use in DomainBuilder
-            batch_request: BatchRequest to be optionally used to define batches to consider for this domain builder.
-            data_context: DataContext associated with this profiler.
             include_column_names: Explicitly specified desired columns (if None, it is computed based on active Batch).
             exclude_column_names: If provided, these columns are pre-filtered and excluded from consideration.
             include_column_name_suffixes: Explicitly specified desired suffixes for corresponding columns to match.
@@ -96,6 +93,9 @@ def __init__(
                 cardinality limit to use when filtering columns.
             max_proportion_unique: proportion of unique values for a
                 custom cardinality limit to use when filtering columns.
+            batch_list: explicitly specified Batch objects for use in DomainBuilder
+            batch_request: BatchRequest to be optionally used to define batches to consider for this domain builder.
+            data_context: DataContext associated with this profiler.
         """
         if exclude_column_names is None:
             exclude_column_names = [
@@ -117,9 +117,6 @@ def __init__(
         self._allowed_semantic_types_passthrough = allowed_semantic_types_passthrough
 
         super().__init__(
-            batch_list=batch_list,
-            batch_request=batch_request,
-            data_context=data_context,
             include_column_names=include_column_names,
             exclude_column_names=exclude_column_names,
             include_column_name_suffixes=include_column_name_suffixes,
@@ -128,6 +125,9 @@ def __init__(
             semantic_type_filter_class_name=semantic_type_filter_class_name,
             include_semantic_types=include_semantic_types,
             exclude_semantic_types=exclude_semantic_types,
+            batch_list=batch_list,
+            batch_request=batch_request,
+            data_context=data_context,
         )
 
         self._limit_mode = limit_mode
diff --git a/great_expectations/rule_based_profiler/domain_builder/column_domain_builder.py b/great_expectations/rule_based_profiler/domain_builder/column_domain_builder.py
--- a/great_expectations/rule_based_profiler/domain_builder/column_domain_builder.py
+++ b/great_expectations/rule_based_profiler/domain_builder/column_domain_builder.py
@@ -27,11 +27,6 @@ class ColumnDomainBuilder(DomainBuilder):
 
     def __init__(
         self,
-        batch_list: Optional[List[Batch]] = None,
-        batch_request: Optional[
-            Union[str, BatchRequest, RuntimeBatchRequest, dict]
-        ] = None,
-        data_context: Optional["DataContext"] = None,  # noqa: F821
         include_column_names: Optional[Union[str, Optional[List[str]]]] = None,
         exclude_column_names: Optional[Union[str, Optional[List[str]]]] = None,
         include_column_name_suffixes: Optional[Union[str, Iterable, List[str]]] = None,
@@ -44,15 +39,17 @@ def __init__(
         exclude_semantic_types: Optional[
             Union[str, SemanticDomainTypes, List[Union[str, SemanticDomainTypes]]]
         ] = None,
+        batch_list: Optional[List[Batch]] = None,
+        batch_request: Optional[
+            Union[str, BatchRequest, RuntimeBatchRequest, dict]
+        ] = None,
+        data_context: Optional["DataContext"] = None,  # noqa: F821
     ):
         """
         A semantic type is distinguished from the structured column type;
         An example structured column type would be "integer".  The inferred semantic type would be "id".
 
         Args:
-            batch_list: explicitly specified Batch objects for use in DomainBuilder
-            batch_request: specified in DomainBuilder configuration to get Batch objects for domain computation.
-            data_context: DataContext
             include_column_names: Explicitly specified desired columns (if None, it is computed based on active Batch).
             exclude_column_names: If provided, these columns are pre-filtered and excluded from consideration.
             include_column_name_suffixes: Explicitly specified desired suffixes for corresponding columns to match.
@@ -63,6 +60,9 @@ def __init__(
             to be included
             exclude_semantic_types: single/multiple type specifications using SemanticDomainTypes (or str equivalents)
             to be excluded
+            batch_list: explicitly specified Batch objects for use in DomainBuilder
+            batch_request: specified in DomainBuilder configuration to get Batch objects for domain computation.
+            data_context: DataContext
 
         Inclusion/Exclusion Logic:
         (include_column_names|table_columns - exclude_column_names) + (include_semantic_types - exclude_semantic_types)
@@ -334,7 +334,7 @@ def get_effective_column_names(
         if semantic_type_filter_class_name is None:
             semantic_type_filter_class_name = "SimpleSemanticTypeFilter"
 
-        self._semantic_type_filter: SemanticTypeFilter = instantiate_class_from_config(
+        semantic_type_filter: SemanticTypeFilter = instantiate_class_from_config(
             config={
                 "module_name": semantic_type_filter_module_name,
                 "class_name": semantic_type_filter_class_name,
@@ -346,6 +346,7 @@ def get_effective_column_names(
             },
             config_defaults={},
         )
+        self._semantic_type_filter = semantic_type_filter
 
         # Obtain include_semantic_types from "rule state" (i.e., variables and parameters); from instance variable otherwise.
         include_semantic_types: Optional[
diff --git a/great_expectations/rule_based_profiler/domain_builder/map_metric_column_domain_builder.py b/great_expectations/rule_based_profiler/domain_builder/map_metric_column_domain_builder.py
--- a/great_expectations/rule_based_profiler/domain_builder/map_metric_column_domain_builder.py
+++ b/great_expectations/rule_based_profiler/domain_builder/map_metric_column_domain_builder.py
@@ -23,11 +23,6 @@ class MapMetricColumnDomainBuilder(ColumnDomainBuilder):
     def __init__(
         self,
         map_metric_name: str,
-        batch_list: Optional[List[Batch]] = None,
-        batch_request: Optional[
-            Union[str, BatchRequest, RuntimeBatchRequest, dict]
-        ] = None,
-        data_context: Optional["DataContext"] = None,  # noqa: F821
         include_column_names: Optional[Union[str, Optional[List[str]]]] = None,
         exclude_column_names: Optional[Union[str, Optional[List[str]]]] = None,
         include_column_name_suffixes: Optional[Union[str, Iterable, List[str]]] = None,
@@ -43,6 +38,11 @@ def __init__(
         max_unexpected_values: Union[str, int] = 0,
         max_unexpected_ratio: Optional[Union[str, float]] = None,
         min_max_unexpected_values_proportion: Union[str, float] = 9.75e-1,
+        batch_list: Optional[List[Batch]] = None,
+        batch_request: Optional[
+            Union[str, BatchRequest, RuntimeBatchRequest, dict]
+        ] = None,
+        data_context: Optional["DataContext"] = None,  # noqa: F821
     ):
         """
         Create column domains using tolerance for inter-Batch proportion of adherence to intra-Batch "unexpected_count"
@@ -51,9 +51,6 @@ def __init__(
         Args:
             map_metric_name: the name of a map metric (must be a supported and registered map metric); the suffix
             ".unexpected_count" will be appended to "map_metric_name" to be used in MetricConfiguration to get values.
-            batch_list: explicitly specified Batch objects for use in DomainBuilder
-            batch_request: BatchRequest to be optionally used to define batches to consider for this domain builder.
-            data_context: DataContext associated with this profiler.
             include_column_names: Explicitly specified desired columns (if None, it is computed based on active Batch).
             exclude_column_names: If provided, these columns are pre-filtered and excluded from consideration.
             include_column_name_suffixes: Explicitly specified desired suffixes for corresponding columns to match.
@@ -69,6 +66,9 @@ def __init__(
             (intra-Batch); if both "max_unexpected_values" and "max_unexpected_ratio" are specified, then
             "max_unexpected_ratio" is used (and "max_unexpected_values" is ignored).
             min_max_unexpected_values_proportion: minimum fraction of Batch objects adhering to "max_unexpected_values"
+            batch_list: explicitly specified Batch objects for use in DomainBuilder
+            batch_request: BatchRequest to be optionally used to define batches to consider for this domain builder.
+            data_context: DataContext associated with this profiler.
 
         For example (using default values of "max_unexpected_values" and "min_max_unexpected_values_proportion"):
         Suppose that "map_metric_name" is "column_values.nonnull" and consider the following three Batches of data:
@@ -95,9 +95,6 @@ def __init__(
         Alternatively, if "min_max_unexpected_values_proportion" is lowered to 0.66, Domain will also be emitted.
         """
         super().__init__(
-            batch_list=batch_list,
-            batch_request=batch_request,
-            data_context=data_context,
             include_column_names=include_column_names,
             exclude_column_names=exclude_column_names,
             include_column_name_suffixes=include_column_name_suffixes,
@@ -106,6 +103,9 @@ def __init__(
             semantic_type_filter_class_name=semantic_type_filter_class_name,
             include_semantic_types=include_semantic_types,
             exclude_semantic_types=exclude_semantic_types,
+            batch_list=batch_list,
+            batch_request=batch_request,
+            data_context=data_context,
         )
 
         self._map_metric_name = map_metric_name


Test patch:
diff --git a/tests/integration/profiling/rule_based_profilers/test_profiler_basic_workflows.py b/tests/integration/profiling/rule_based_profilers/test_profiler_basic_workflows.py
--- a/tests/integration/profiling/rule_based_profilers/test_profiler_basic_workflows.py
+++ b/tests/integration/profiling/rule_based_profilers/test_profiler_basic_workflows.py
@@ -81,9 +81,9 @@ def test_domain_builder(data_context_with_taxi_data):
         data_connector_query={"index": -1},
     )
     domain_builder: DomainBuilder = ColumnDomainBuilder(
-        data_context=context,
-        batch_request=batch_request,
         include_column_name_suffixes=["_amount"],
+        batch_request=batch_request,
+        data_context=context,
     )
     domains: list = domain_builder.get_domains()
     assert len(domains) == 4
@@ -115,9 +115,9 @@ def test_add_rule_and_run_profiler(data_context_with_taxi_data):
         data_connector_query={"index": -1},
     )
     domain_builder: DomainBuilder = ColumnDomainBuilder(
-        data_context=context,
-        batch_request=batch_request.to_json_dict(),
         include_column_name_suffixes=["_amount"],
+        batch_request=batch_request.to_json_dict(),
+        data_context=context,
     )
     default_expectation_configuration_builder = DefaultExpectationConfigurationBuilder(
         expectation_type="expect_column_values_to_not_be_null",
@@ -154,9 +154,9 @@ def test_profiler_parameter_builder_added(data_context_with_taxi_data):
         data_connector_query={"index": -1},
     )
     domain_builder: DomainBuilder = ColumnDomainBuilder(
-        data_context=context,
-        batch_request=batch_request.to_json_dict(),
         include_column_name_suffixes=["_amount"],
+        batch_request=batch_request.to_json_dict(),
+        data_context=context,
     )
     # parameter_builder
     numeric_range_parameter_builder: MetricMultiBatchParameterBuilder = (
@@ -208,9 +208,9 @@ def test_profiler_save_and_load(data_context_with_taxi_data):
         data_connector_query={"index": -1},
     )
     domain_builder: DomainBuilder = ColumnDomainBuilder(
-        data_context=context,
-        batch_request=batch_request.to_json_dict(),
         include_column_name_suffixes=["_amount"],
+        batch_request=batch_request.to_json_dict(),
+        data_context=context,
     )
     # parameter_builder
     numeric_range_parameter_builder: MetricMultiBatchParameterBuilder = (
@@ -329,9 +329,9 @@ def test_profiler_run_with_expectation_suite_arg(
         data_connector_query={"index": -1},
     )
     domain_builder: DomainBuilder = ColumnDomainBuilder(
-        data_context=context,
-        batch_request=batch_request.to_json_dict(),
         include_column_name_suffixes=["_amount"],
+        batch_request=batch_request.to_json_dict(),
+        data_context=context,
     )
     default_expectation_configuration_builder = DefaultExpectationConfigurationBuilder(
         expectation_type="expect_column_values_to_not_be_null",
diff --git a/tests/rule_based_profiler/domain_builder/test_categorical_column_domain_builder.py b/tests/rule_based_profiler/domain_builder/test_categorical_column_domain_builder.py
--- a/tests/rule_based_profiler/domain_builder/test_categorical_column_domain_builder.py
+++ b/tests/rule_based_profiler/domain_builder/test_categorical_column_domain_builder.py
@@ -23,10 +23,10 @@ def test_single_batch_very_few_cardinality(alice_columnar_table_single_batch_con
     )
 
     domain_builder: DomainBuilder = CategoricalColumnDomainBuilder(
-        batch_request=batch_request,
-        data_context=data_context,
         exclude_column_name_suffixes="_id",
         limit_mode="very_few",
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
 
@@ -62,9 +62,9 @@ def test_single_batch_one_cardinality(alice_columnar_table_single_batch_context)
     )
 
     domain_builder: DomainBuilder = CategoricalColumnDomainBuilder(
+        limit_mode="ONE",
         batch_request=batch_request,
         data_context=data_context,
-        limit_mode="ONE",
     )
     domains: List[Domain] = domain_builder.get_domains()
 
@@ -99,9 +99,9 @@ def test_unsupported_cardinality_limit(
 
     with pytest.raises(ProfilerConfigurationError) as excinfo:
         _: List[Domain] = CategoricalColumnDomainBuilder(
+            limit_mode="&*#$&INVALID&*#$*&",
             batch_request=batch_request,
             data_context=data_context,
-            limit_mode="&*#$&INVALID&*#$*&",
         ).get_domains()
 
     assert "specify a supported cardinality mode" in str(excinfo.value)
@@ -122,8 +122,8 @@ def test_unspecified_cardinality_limit(
 
     with pytest.raises(ProfilerConfigurationError) as excinfo:
         _: List[Domain] = CategoricalColumnDomainBuilder(
-            data_context=data_context,
             batch_request=batch_request,
+            data_context=data_context,
         ).get_domains()
 
     assert "Please pass ONE of the following parameters" in str(excinfo.value)
@@ -140,8 +140,6 @@ def test_excluded_columns_single_batch(alice_columnar_table_single_batch_context
     )
 
     domain_builder: DomainBuilder = CategoricalColumnDomainBuilder(
-        batch_request=batch_request,
-        data_context=data_context,
         limit_mode="VERY_FEW",
         exclude_column_names=[
             "id",
@@ -150,6 +148,8 @@ def test_excluded_columns_single_batch(alice_columnar_table_single_batch_context
             "event_ts",
             "server_ts",
         ],
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
 
@@ -182,10 +182,10 @@ def test_excluded_columns_empty_single_batch(alice_columnar_table_single_batch_c
     )
 
     domain_builder: DomainBuilder = CategoricalColumnDomainBuilder(
-        batch_request=batch_request,
-        data_context=data_context,
         limit_mode="VERY_FEW",
         exclude_column_names=[],
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
 
@@ -227,9 +227,9 @@ def test_multi_batch_very_few_cardinality(
     )
 
     domain_builder: DomainBuilder = CategoricalColumnDomainBuilder(
+        limit_mode="very_few",
         batch_request=batch_request,
         data_context=data_context,
-        limit_mode="very_few",
     )
     observed_domains: List[Domain] = domain_builder.get_domains()
 
@@ -302,9 +302,9 @@ def test_multi_batch_one_cardinality(
     )
 
     domain_builder: DomainBuilder = CategoricalColumnDomainBuilder(
+        limit_mode="ONE",
         batch_request=batch_request,
         data_context=data_context,
-        limit_mode="ONE",
     )
     observed_domains: List[Domain] = domain_builder.get_domains()
 
diff --git a/tests/rule_based_profiler/domain_builder/test_domain_builder.py b/tests/rule_based_profiler/domain_builder/test_domain_builder.py
--- a/tests/rule_based_profiler/domain_builder/test_domain_builder.py
+++ b/tests/rule_based_profiler/domain_builder/test_domain_builder.py
@@ -25,8 +25,8 @@ def test_table_domain_builder(
     data_context: DataContext = alice_columnar_table_single_batch_context
 
     domain_builder: DomainBuilder = TableDomainBuilder(
-        data_context=data_context,
         batch_request=None,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
 
@@ -73,8 +73,8 @@ def test_column_domain_builder(
     }
 
     domain_builder: DomainBuilder = ColumnDomainBuilder(
-        data_context=data_context,
         batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains(variables=variables)
 
@@ -159,11 +159,11 @@ def test_column_domain_builder_with_simple_semantic_type_included(
         "data_asset_name": "alice_columnar_table_single_batch_data_asset",
     }
     domain_builder: DomainBuilder = ColumnDomainBuilder(
-        data_context=data_context,
-        batch_request=batch_request,
         include_semantic_types=[
             "numeric",
         ],
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains(variables=variables)
 
diff --git a/tests/rule_based_profiler/domain_builder/test_map_metric_column_domain_builder.py b/tests/rule_based_profiler/domain_builder/test_map_metric_column_domain_builder.py
--- a/tests/rule_based_profiler/domain_builder/test_map_metric_column_domain_builder.py
+++ b/tests/rule_based_profiler/domain_builder/test_map_metric_column_domain_builder.py
@@ -20,11 +20,11 @@ def test_column_values_unique_single_batch(alice_columnar_table_single_batch_con
 
     domain_builder: MapMetricColumnDomainBuilder = MapMetricColumnDomainBuilder(
         map_metric_name="column_values.unique",
-        batch_request=batch_request,
-        data_context=data_context,
         max_unexpected_values=0,
         max_unexpected_ratio=None,
         min_max_unexpected_values_proportion=9.75e-1,
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
     domains = sorted(domains, key=lambda x: x.domain_kwargs["column"])
@@ -71,11 +71,11 @@ def test_column_values_nonnull_multi_batch_one_column_not_emitted(
 
     domain_builder: MapMetricColumnDomainBuilder = MapMetricColumnDomainBuilder(
         map_metric_name="column_values.nonnull",
-        batch_request=batch_request,
-        data_context=data_context,
         max_unexpected_values=0,
         max_unexpected_ratio=None,
         min_max_unexpected_values_proportion=9.75e-1,
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
     domains = sorted(domains, key=lambda x: x.domain_kwargs["column"])
@@ -133,11 +133,11 @@ def test_column_values_nonnull_multi_batch_all_columns_emitted_loose_max_unexpec
 
     domain_builder: MapMetricColumnDomainBuilder = MapMetricColumnDomainBuilder(
         map_metric_name="column_values.nonnull",
-        batch_request=batch_request,
-        data_context=data_context,
         max_unexpected_values=4736,
         max_unexpected_ratio=None,
         min_max_unexpected_values_proportion=1.0,
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
     domains = sorted(domains, key=lambda x: x.domain_kwargs["column"])
@@ -196,11 +196,11 @@ def test_column_values_nonnull_multi_batch_all_columns_emitted_loose_min_max_une
 
     domain_builder: MapMetricColumnDomainBuilder = MapMetricColumnDomainBuilder(
         map_metric_name="column_values.nonnull",
-        batch_request=batch_request,
-        data_context=data_context,
         max_unexpected_values=0,
         max_unexpected_ratio=None,
         min_max_unexpected_values_proportion=6.66e-1,
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
     domains = sorted(domains, key=lambda x: x.domain_kwargs["column"])
@@ -259,11 +259,11 @@ def test_column_values_nonnull_multi_batch_one_column_not_emitted_tight_max_unex
 
     domain_builder: MapMetricColumnDomainBuilder = MapMetricColumnDomainBuilder(
         map_metric_name="column_values.nonnull",
-        batch_request=batch_request,
-        data_context=data_context,
         max_unexpected_values=0,
         max_unexpected_ratio=0.0,
         min_max_unexpected_values_proportion=1.0,
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
     domains = sorted(domains, key=lambda x: x.domain_kwargs["column"])
@@ -321,11 +321,11 @@ def test_column_values_nonnull_multi_batch_all_columns_emitted_loose_max_unexpec
 
     domain_builder: MapMetricColumnDomainBuilder = MapMetricColumnDomainBuilder(
         map_metric_name="column_values.nonnull",
-        batch_request=batch_request,
-        data_context=data_context,
         max_unexpected_values=0,
         max_unexpected_ratio=5.58 - 1,
         min_max_unexpected_values_proportion=1.0,
+        batch_request=batch_request,
+        data_context=data_context,
     )
     domains: List[Domain] = domain_builder.get_domains()
     domains = sorted(domains, key=lambda x: x.domain_kwargs["column"])
diff --git a/tests/test_fixtures/rule_based_profiler/example_notebooks/BasicExample_RBP_Instantiation_and_running.ipynb b/tests/test_fixtures/rule_based_profiler/example_notebooks/BasicExample_RBP_Instantiation_and_running.ipynb
--- a/tests/test_fixtures/rule_based_profiler/example_notebooks/BasicExample_RBP_Instantiation_and_running.ipynb
+++ b/tests/test_fixtures/rule_based_profiler/example_notebooks/BasicExample_RBP_Instantiation_and_running.ipynb
@@ -266,9 +266,9 @@
    ],
    "source": [
     "domain_builder: DomainBuilder = ColumnDomainBuilder(\n",
-    "    data_context=data_context,\n",
-    "    batch_request=single_batch_batch_request,\n",
     "    include_column_name_suffixes=[\"_amount\"],\n",
+    "    batch_request=single_batch_batch_request,\n",
+    "    data_context=data_context,\n",
     ")\n",
     "domains: list = domain_builder.get_domains()"
    ]
@@ -495,9 +495,9 @@
    ],
    "source": [
     "domain_builder: DomainBuilder = ColumnDomainBuilder(\n",
-    "    data_context=data_context,\n",
-    "    batch_request=single_batch_batch_request,\n",
     "    include_column_name_suffixes=[\"_amount\"],\n",
+    "    batch_request=single_batch_batch_request,\n",
+    "    data_context=data_context,\n",
     ")\n",
     "domains: list = domain_builder.get_domains()"
    ]
@@ -906,9 +906,9 @@
    "outputs": [],
    "source": [
     "domain_builder: DomainBuilder = ColumnDomainBuilder(\n",
-    "    data_context=data_context,\n",
+    "    include_column_names=[\"tip_amount\", \"fare_amount\"],\n",
     "    batch_request=\"$variables.multi_batch_batch_request\",\n",
-    "    include_column_names=[\"tip_amount\", \"fare_amount\"]\n",
+    "    data_context=data_context,\n",
     ")"
    ]
   },
@@ -1270,8 +1270,8 @@
    ],
    "source": [
     "domain_builder: DomainBuilder = ColumnDomainBuilder(\n",
-    "    data_context=data_context,\n",
     "    batch_request=single_batch_batch_request,\n",
+    "    data_context=data_context,\n",
     ")\n",
     "domains: list = domain_builder.get_domains()\n",
     "assert len(domains) == 18 # all columns in yellow_tripdata_sample_2018"
@@ -1335,9 +1335,9 @@
    ],
    "source": [
     "domain_builder: DomainBuilder = ColumnDomainBuilder(\n",
-    "    data_context=data_context,\n",
+    "    include_column_names=[\"vendor_id\"],\n",
     "    batch_request=single_batch_batch_request,\n",
-    "    include_column_names=[\"vendor_id\"]\n",
+    "    data_context=data_context,\n",
     ")\n",
     "domains: list = domain_builder.get_domains()\n",
     "domains"
@@ -1379,9 +1379,9 @@
    ],
    "source": [
     "domain_builder: DomainBuilder = ColumnDomainBuilder(\n",
-    "    data_context=data_context,\n",
+    "    exclude_column_names=[\"vendor_id\"],\n",
     "    batch_request=single_batch_batch_request,\n",
-    "    exclude_column_names=[\"vendor_id\"]\n",
+    "    data_context=data_context,\n",
     ")\n",
     "domains: list = domain_builder.get_domains()\n",
     "assert len(domains) == 17 # all columns in yellow_tripdata_sample_2018 with vendor_id excluded"
@@ -1401,9 +1401,9 @@
    "outputs": [],
    "source": [
     "domain_builder: DomainBuilder = ColumnDomainBuilder(\n",
+    "    include_semantic_types=['numeric'],\n",
     "    batch_request=single_batch_batch_request,\n",
     "    data_context=data_context,\n",
-    "    include_semantic_types=['numeric']\n",
     ")"
    ]
   },
@@ -1483,8 +1483,8 @@
    ],
    "source": [
     "domain_builder: DomainBuilder = TableDomainBuilder(\n",
-    "    data_context=data_context,\n",
     "    batch_request=single_batch_batch_request,\n",
+    "    data_context=data_context,\n",
     ")\n",
     "domains: list = domain_builder.get_domains()\n",
     "domains"
@@ -1587,9 +1587,9 @@
    ],
    "source": [
     "domain_builder: DomainBuilder = MapMetricColumnDomainBuilder(\n",
-    "    data_context=data_context,\n",
+    "    map_metric_name=\"column_values.nonnull\",\n",
     "    batch_request=single_batch_batch_request,\n",
-    "    map_metric_name=\"column_values.nonnull\"\n",
+    "    data_context=data_context,\n",
     ")\n",
     "domains: list = domain_builder.get_domains()\n",
     "len(domains) == 17 # filtered 1 column that was all None"
@@ -1627,9 +1627,9 @@
    "outputs": [],
    "source": [
     "domain_builder: DomainBuilder = CategoricalColumnDomainBuilder(\n",
+    "    limit_mode=\"very_few\", # VERY_FEW = 10 or less\n",
     "    batch_request=single_batch_batch_request,\n",
     "    data_context=data_context,\n",
-    "    limit_mode=\"very_few\", # VERY_FEW = 10 or less\n",
     ")"
    ]
   },