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/core/metric_domain_types.py b/great_expectations/core/metric_domain_types.py
--- a/great_expectations/core/metric_domain_types.py
+++ b/great_expectations/core/metric_domain_types.py
@@ -1,10 +1,19 @@
 import enum
 import logging
 
+from great_expectations.core._docs_decorators import public_api
+
 logger = logging.getLogger(__name__)
 
 
+@public_api
 class MetricDomainTypes(enum.Enum):
+    """Enum type, whose members signify the data "Domain", on which a metric can be computed.
+
+    A wide variety of "Domain" types can be defined with applicable metrics associated with their respective "Domain"
+    types.  The "Domain" types currently in use (`TABLE`, `COLUMN`, `COLUMN_PAIR`, and `MULTICOLUMN`) are declared here.
+    """
+
     TABLE = "table"
     COLUMN = "column"
     COLUMN_PAIR = "column_pair"
diff --git a/great_expectations/core/metric_function_types.py b/great_expectations/core/metric_function_types.py
--- a/great_expectations/core/metric_function_types.py
+++ b/great_expectations/core/metric_function_types.py
@@ -1,27 +1,75 @@
 import enum
 import logging
 
+from great_expectations.core._docs_decorators import public_api
+
 logger = logging.getLogger(__name__)
 
 
+@public_api
 class MetricFunctionTypes(enum.Enum):
+    """Enum type, whose members depict the nature of return value of a metric implementation function (defined for a specified "ExecutionEngine" subclass) that is the final result (rather than a Callable for deferred execution).
+
+    The available types are:
+    - `VALUE` -- metric implementation function returns a value computed over a dataset represented by "Domain" (e.g., a
+      statistic on row values of a column).
+    - `MAP_VALUES` (unused in current version) -- metric implementation function returns a mapping between every
+      "Domain" value and the result of a transformation of the corresponding "Domain" value.
+    - `WINDOW_VALUES` (unused in current version) -- metric implementation function returns the result of applying a
+      specified windowing operation over "Domain" values.
+    - `AGGREGATE_VALUE` (unused in current version) -- metric implementation function returns the result of applying a
+      specified aggregation operation to every "Domain" value.
+    """
+
     VALUE = "value"
-    MAP_VALUES = "value"  # "map_values"
-    WINDOW_VALUES = "value"  # "window_values"
-    AGGREGATE_VALUE = "value"  # "aggregate_value"
+    MAP_VALUES = "value"  # "map_values" (unused in current version)
+    WINDOW_VALUES = "value"  # "window_values" (unused in current version)
+    AGGREGATE_VALUE = "value"  # "aggregate_value" (unused in current version)
 
 
+@public_api
 class MetricPartialFunctionTypes(enum.Enum):
-    MAP_FN = "map_fn"
-    MAP_SERIES = "map_series"
-    WINDOW_FN = "window_fn"
-    MAP_CONDITION_FN = "map_condition_fn"
-    MAP_CONDITION_SERIES = "map_condition_series"
-    WINDOW_CONDITION_FN = "window_condition_fn"
-    AGGREGATE_FN = "aggregate_fn"
+    """Enum type, whose members depict the nature of return value of a metric implementation function (defined for a specified "ExecutionEngine" subclass) that is a (partial) Callable to be executed once execution plan is complete.
+
+    The available types are:
+    - `MAP_FN` -- metric implementation function returns a mapping transformation for "Domain" values that evaluates to
+      a quantity (rather than a condition statement, or a series, etc.).
+    - `MAP_SERIES` -- metric implementation function returns a mapping transformation for "Domain" values that evaluates
+      to a series-valued (e.g., Pandas.Series) result (rather than a Callable for deferred execution).
+    - `WINDOW_FN` -- metric implementation function returns specified windowing operation over "Domain" values
+      (currently applicable only to "SparkDFExecutionEngine").
+    - `MAP_CONDITION_FN` -- metric implementation function returns a mapping transformation for "Domain" values that
+      evaluates to a Callable (partial) computational component (as part of deferred execution plan) that expresses the
+      specified condition (i.e., a logical operation).
+    - `MAP_CONDITION_SERIES` -- metric implementation function returns a mapping transformation for "Domain" values that
+      evaluates to a Callable (partial) computational component (as part of deferred execution plan) that expresses the
+      specified condition (i.e., a logical operation) as a series-valued (e.g., Pandas.Series) result.
+    - `WINDOW_CONDITION_FN` -- metric implementation function returns a windowing operation over "Domain" values that
+      evaluates to a Callable (partial) computational component (as part of deferred execution plan) that expresses the
+      specified condition (i.e., a logical operation).
+    - `AGGREGATE_FN` -- metric implementation function returns an aggregation transformation over "Domain" values that
+      evaluates to a Callable (partial) computational component (as part of deferred execution plan) that expresses the
+      specified aggregated quantity.
+
+
+    """
+
+    MAP_FN = "map_fn"  # pertains to "PandasExecutionEngine"
+    MAP_SERIES = "map_series"  # pertains to "PandasExecutionEngine"
+    WINDOW_FN = "window_fn"  # currently pertains only to "SparkDFExecutionEngine"
+    MAP_CONDITION_FN = "map_condition_fn"  # pertains to "SqlAlchemyExecutionEngine" and "SparkDFExecutionEngine"
+    MAP_CONDITION_SERIES = "map_condition_series"  # pertains to "PandasExecutionEngine"
+    WINDOW_CONDITION_FN = "window_condition_fn"  # pertains to "SqlAlchemyExecutionEngine" and "SparkDFExecutionEngine"
+    AGGREGATE_FN = "aggregate_fn"  # pertains to "SqlAlchemyExecutionEngine" and "SparkDFExecutionEngine"
 
     @property
+    @public_api
     def metric_suffix(self) -> str:
+        """Examines the "name" property of this "Enum" and returns corresponding suffix for metric registration/usage.
+
+        Returns:
+            (str) designated metric name suffix
+        """
         if self.name in [
             "MAP_FN",
             "MAP_SERIES",
@@ -42,13 +90,19 @@ def metric_suffix(self) -> str:
         return ""
 
 
+@public_api
 class MetricPartialFunctionTypeSuffixes(enum.Enum):
+    """Enum type, whose members specify available suffixes for metrics representing partial functions."""
+
     MAP = "map"
     CONDITION = "condition"
     AGGREGATE_FUNCTION = "aggregate_fn"
 
 
+@public_api
 class SummarizationMetricNameSuffixes(enum.Enum):
+    """Enum type, whose members specify suffixes for metrics used for summarizing Expectation validation results."""
+
     FILTERED_ROW_COUNT = "filtered_row_count"
     UNEXPECTED_COUNT = "unexpected_count"
     UNEXPECTED_INDEX_LIST = "unexpected_index_list"


Test patch: