internlm/SWE-Fixer-Train-110K huggingface dataset:
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/expectations/core/expect_column_values_to_not_be_null.py b/great_expectations/expectations/core/expect_column_values_to_not_be_null.py
--- a/great_expectations/expectations/core/expect_column_values_to_not_be_null.py
+++ b/great_expectations/expectations/core/expect_column_values_to_not_be_null.py
@@ -93,14 +93,18 @@ def validate_configuration(
         self, configuration: Optional[ExpectationConfiguration] = None
     ) -> None:
         """
-        Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
-        necessary configuration arguments have been provided for the validation of the expectation.
+        Validates the configuration of an Expectation.
+
+        The configuration will also be validated using each of the `validate_configuration` methods in its Expectation
+        superclass hierarchy.
 
         Args:
-            configuration (OPTIONAL[ExpectationConfiguration]): \
-                An optional Expectation Configuration entry that will be used to configure the expectation
-        Returns:
-            None. Raises InvalidExpectationConfigurationError if the config is not validated successfully
+            configuration: An `ExpectationConfiguration` to validate. If no configuration is provided, it will be pulled
+                                  from the configuration attribute of the Expectation instance.
+
+        Raises:
+            `InvalidExpectationConfigurationError`: The configuration does not contain the values required by the
+                                                                           Expectation."
         """
         super().validate_configuration(configuration)
         self.validate_metric_value_between_configuration(configuration=configuration)


Test patch:
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/expectations/core/expect_column_values_to_not_match_regex.py b/great_expectations/expectations/core/expect_column_values_to_not_match_regex.py
--- a/great_expectations/expectations/core/expect_column_values_to_not_match_regex.py
+++ b/great_expectations/expectations/core/expect_column_values_to_not_match_regex.py
@@ -176,13 +176,28 @@ class ExpectColumnValuesToNotMatchRegex(ColumnMapExpectation):
     def validate_configuration(
         self, configuration: Optional[ExpectationConfiguration] = None
     ) -> None:
+        """
+        Validates the configuration of an Expectation.
+
+        For `expect_column_values_to_not_match_regex` it is required that:
+            - 'regex' kwarg is of type str or dict
+            - if dict, assert a key "$PARAMETER" is present
+
+        Args:
+            configuration: An `ExpectationConfiguration` to validate. If no configuration is provided, it will be pulled
+                                  from the configuration attribute of the Expectation instance.
+
+        Raises:
+            `InvalidExpectationConfigurationError`: The configuration does not contain the values required by the
+                                  Expectation."
+        """
         super().validate_configuration(configuration)
         configuration = configuration or self.configuration
         try:
             assert "regex" in configuration.kwargs, "regex is required"
             assert isinstance(
                 configuration.kwargs["regex"], (str, dict)
-            ), "regex must be a string"
+            ), "regex must be a string or dict"
             if isinstance(configuration.kwargs["regex"], dict):
                 assert (
                     "$PARAMETER" in configuration.kwargs["regex"]


Test patch:
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/expectations/core/expect_column_values_to_not_match_like_pattern_list.py b/great_expectations/expectations/core/expect_column_values_to_not_match_like_pattern_list.py
--- a/great_expectations/expectations/core/expect_column_values_to_not_match_like_pattern_list.py
+++ b/great_expectations/expectations/core/expect_column_values_to_not_match_like_pattern_list.py
@@ -92,6 +92,23 @@ class ExpectColumnValuesToNotMatchLikePatternList(ColumnMapExpectation):
     def validate_configuration(
         self, configuration: Optional[ExpectationConfiguration] = None
     ) -> None:
+        """
+        Validates the configuration of an Expectation.
+
+        For `expect_column_values_to_not_match_like_pattern_list` it is required that:
+            - 'like_pattern_list' is present in configuration's kwarg
+            - assert 'like_pattern_list' is of type list or dict
+            - if 'like_pattern_list' is list, assert non-empty
+            - if 'like_pattern_list' is dict, assert a key "$PARAMETER" is present
+
+        Args:
+            configuration: An `ExpectationConfiguration` to validate. If no configuration is provided, it will be pulled
+                                  from the configuration attribute of the Expectation instance.
+
+        Raises:
+            `InvalidExpectationConfigurationError`: The configuration does not contain the values required by the
+                                  Expectation."
+        """
         super().validate_configuration(configuration)
         configuration = configuration or self.configuration
         try:
@@ -100,7 +117,7 @@ def validate_configuration(
             ), "Must provide like_pattern_list"
             assert isinstance(
                 configuration.kwargs.get("like_pattern_list"), (list, dict)
-            ), "like_pattern_list must be a list"
+            ), "like_pattern_list must be a list or dict"
             assert isinstance(configuration.kwargs.get("like_pattern_list"), dict) or (
                 len(configuration.kwargs.get("like_pattern_list")) > 0
             ), "At least one like_pattern must be supplied in the like_pattern_list."


Test patch:
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/checkpoint/types/checkpoint_result.py b/great_expectations/checkpoint/types/checkpoint_result.py
--- a/great_expectations/checkpoint/types/checkpoint_result.py
+++ b/great_expectations/checkpoint/types/checkpoint_result.py
@@ -4,6 +4,7 @@
 
 from marshmallow import Schema, fields, post_load, pre_dump
 
+from great_expectations.core._docs_decorators import public_api
 from great_expectations.core.expectation_validation_result import (
     ExpectationSuiteValidationResult,
 )
@@ -129,7 +130,16 @@ def list_data_asset_names(self) -> List[str]:
             )
         return self._data_asset_names
 
+    @public_api
     def list_expectation_suite_names(self) -> List[str]:
+        """Return the list of expecation suite names for a checkpoint.
+
+        Args:
+            None
+
+        Returns:
+            self._expectation_suite_names: The list of expectation suite names.
+        """
         if self._expectation_suite_names is None:
             self._expectation_suite_names = list(
                 {
diff --git a/great_expectations/validator/validator.py b/great_expectations/validator/validator.py
--- a/great_expectations/validator/validator.py
+++ b/great_expectations/validator/validator.py
@@ -324,14 +324,20 @@ def expectation_suite_name(self, expectation_suite_name: str) -> None:
     def load_batch_list(self, batch_list: List[Batch]) -> None:
         self._execution_engine.batch_manager.load_batch_list(batch_list=batch_list)
 
+    @public_api
     def get_metric(
         self,
         metric: MetricConfiguration,
     ) -> Any:
-        """
-        Convenience method that returns the value of the requested metric.
+        """Convenience method, return the value of the requested metric.
 
         (To be deprecated in favor of using methods in "MetricsCalculator" class.)
+
+        Args:
+            metric: MetricConfiguration
+
+        Returns:
+            The value of the requested metric.
         """
         return self._metrics_calculator.get_metric(metric=metric)
 


Test patch:
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/expectations/core/expect_column_values_to_not_match_like_pattern.py b/great_expectations/expectations/core/expect_column_values_to_not_match_like_pattern.py
--- a/great_expectations/expectations/core/expect_column_values_to_not_match_like_pattern.py
+++ b/great_expectations/expectations/core/expect_column_values_to_not_match_like_pattern.py
@@ -92,13 +92,28 @@ class ExpectColumnValuesToNotMatchLikePattern(ColumnMapExpectation):
     def validate_configuration(
         self, configuration: Optional[ExpectationConfiguration] = None
     ) -> None:
+        """
+        Validates the configuration of an Expectation.
+
+        For `expect_column_values_to_not_match_like_pattern` it is required that:
+            - configuration's kwargs contains a key 'like_pattern' of type str or dict
+            - if 'like_pattern' is dict, assert key "$PARAMETER" is present
+
+        Args:
+            configuration: An `ExpectationConfiguration` to validate. If no configuration is provided, it will be pulled
+                                  from the configuration attribute of the Expectation instance.
+
+        Raises:
+            `InvalidExpectationConfigurationError`: The configuration does not contain the values required by the
+                                  Expectation."
+        """
         super().validate_configuration(configuration)
         configuration = configuration or self.configuration
         try:
             assert "like_pattern" in configuration.kwargs, "Must provide like_pattern"
             assert isinstance(
                 configuration.kwargs.get("like_pattern"), (str, dict)
-            ), "like_pattern must be a string"
+            ), "like_pattern must be a string or dict"
             if isinstance(configuration.kwargs.get("like_pattern"), dict):
                 assert "$PARAMETER" in configuration.kwargs.get(
                     "like_pattern"


Test patch:
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/expectations/core/expect_column_values_to_not_match_regex_list.py b/great_expectations/expectations/core/expect_column_values_to_not_match_regex_list.py
--- a/great_expectations/expectations/core/expect_column_values_to_not_match_regex_list.py
+++ b/great_expectations/expectations/core/expect_column_values_to_not_match_regex_list.py
@@ -102,17 +102,20 @@ class ExpectColumnValuesToNotMatchRegexList(ColumnMapExpectation):
     def validate_configuration(
         self, configuration: Optional[ExpectationConfiguration] = None
     ) -> None:
-        """Validates the configuration for the Expectation.
+        """Validates the configuration of an Expectation.
 
-        For `expect_column_values_to_match_regex_list`
-        we require that the `configuraton.kwargs` contain a `regex_list` key that is either
-        a non-empty `list[str]` or a `dict[list]` with `$PARAMETER` key with list of regexes.
+        For `expect_column_values_to_not_match_regex_list` it is required that:
+            - 'regex_list' kwarg is of type list or dict
+            - if 'regex_list' is list, assert is non-empty and each entry is of type str
+            - if 'regex_list' is dict, assert a key "$PARAMETER" is present
 
         Args:
-            configuration: The ExpectationConfiguration to be validated.
+            configuration: An `ExpectationConfiguration` to validate. If no configuration is provided, it will be pulled
+                                  from the configuration attribute of the Expectation instance.
 
         Raises:
-            InvalidExpectationConfigurationError: The configuraton does not contain the values required by the Expectation
+            InvalidExpectationConfigurationError: The configuration does not contain the values required by the
+                                  Expectation.
         """
         super().validate_configuration(configuration)
         configuration = configuration or self.configuration
@@ -120,7 +123,7 @@ def validate_configuration(
             assert "regex_list" in configuration.kwargs, "regex_list is required"
             assert isinstance(
                 configuration.kwargs["regex_list"], (list, dict)
-            ), "regex_list must be a list of regexes"
+            ), "regex_list must be a list or dict of regexes"
             if (
                 not isinstance(configuration.kwargs["regex_list"], dict)
                 and len(configuration.kwargs["regex_list"]) > 0


Test patch:
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/expectations/core/expect_compound_columns_to_be_unique.py b/great_expectations/expectations/core/expect_compound_columns_to_be_unique.py
--- a/great_expectations/expectations/core/expect_compound_columns_to_be_unique.py
+++ b/great_expectations/expectations/core/expect_compound_columns_to_be_unique.py
@@ -85,14 +85,18 @@ def validate_configuration(
         self, configuration: Optional[ExpectationConfiguration] = None
     ) -> None:
         """
-        Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
-        necessary configuration arguments have been provided for the validation of the expectation.
+        Validates the configuration of an Expectation.
+
+        The configuration will also be validated using each of the `validate_configuration` methods in its Expectation
+                                  superclass hierarchy.
 
         Args:
-            configuration (OPTIONAL[ExpectationConfiguration]): \
-                An optional Expectation Configuration entry that will be used to configure the expectation
-        Returns:
-            None. Raises InvalidExpectationConfigurationError if the config is not validated successfully
+            configuration: An `ExpectationConfiguration` to validate. If no configuration is provided, it will be pulled
+                                  from the configuration attribute of the Expectation instance.
+
+        Raises:
+            `InvalidExpectationConfigurationError`: The configuration does not contain the values required by the
+                                  Expectation."
         """
         super().validate_configuration(configuration)
         self.validate_metric_value_between_configuration(configuration=configuration)


Test patch:
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/batch.py b/great_expectations/core/batch.py
--- a/great_expectations/core/batch.py
+++ b/great_expectations/core/batch.py
@@ -5,6 +5,7 @@
 from typing import Any, Callable, Dict, Optional, Set, Union
 
 import great_expectations.exceptions as gx_exceptions
+from great_expectations.core._docs_decorators import deprecated_argument, public_api
 from great_expectations.core.id_dict import BatchKwargs, BatchSpec, IDDict
 from great_expectations.core.util import convert_to_json_serializable
 from great_expectations.exceptions import InvalidBatchIdError
@@ -533,7 +534,37 @@ def head(self, *args, **kwargs):
 #  However, right now, the Batch from the legacy design is imported into execution engines of the new design.
 #  As a result, we have multiple, inconsistent versions of BatchMarkers, extending legacy/new classes.</Alex>
 # TODO: <Alex>See also "great_expectations/datasource/types/batch_spec.py".</Alex>
+@public_api
+@deprecated_argument(argument_name="data_context", version="0.14.0")
+@deprecated_argument(argument_name="datasource_name", version="0.14.0")
+@deprecated_argument(argument_name="batch_parameters", version="0.14.0")
+@deprecated_argument(argument_name="batch_kwargs", version="0.14.0")
 class Batch(SerializableDictDot):
+    """A Batch is a selection of records from a Data Asset.
+
+    A Datasource produces Batch objects to interact directly with data. Creating
+    a Batch does NOT require moving data; the Batch facilitates access to the
+    data and maintains metadata.
+
+    ---Documentation---
+            - https://docs.greatexpectations.io/docs/terms/batch/
+
+    Args:
+        data: A BatchDataType object which interacts directly with the
+            ExecutionEngine.
+        batch_request: BatchRequest that was used to obtain the data.
+        batch_definition: Complete BatchDefinition that describes the data.
+        batch_spec: Complete BatchSpec that describes the data.
+        batch_markers: Additional metadata that may be useful to understand
+            batch.
+        data_context: DataContext connected to the
+        datasource_name: name of datasource used to obtain the batch
+        batch_parameters: keyword arguments describing the batch data
+        batch_kwargs: keyword arguments used to request a batch from a Datasource
+
+    Returns:
+        Batch instance created.
+    """
     def __init__(
         self,
         data: Optional[BatchDataType] = None,


Test patch:
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/batch.py b/great_expectations/core/batch.py
--- a/great_expectations/core/batch.py
+++ b/great_expectations/core/batch.py
@@ -38,7 +38,30 @@
     )
 
 
+@public_api
 class BatchDefinition(SerializableDictDot):
+    """Precisely identifies a set of data from a data source.
+
+    More concretely, a BatchDefinition includes all the information required to precisely
+    identify a set of data from the external data source that should be
+    translated into a Batch. One or more BatchDefinitions should always be
+    *returned* from the Datasource, as a result of processing the Batch Request.
+
+    ---Documentation---
+            - https://docs.greatexpectations.io/docs/terms/batch/#batches-and-batch-requests-design-motivation
+
+    Args:
+        datasource_name: name of the Datasource used to connect to the data
+        data_connector_name: name of the DataConnector used to connect to the data
+        data_asset_name: name of the DataAsset used to connect to the data
+        batch_identifiers: key-value pairs that the DataConnector
+            will use to obtain a specific set of data
+        batch_spec_passthrough: a dictionary of additional parameters that
+            the ExecutionEngine will use to obtain a specific set of data
+
+    Returns:
+        BatchDefinition
+    """
     def __init__(
         self,
         datasource_name: str,


Test patch:
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/batch.py b/great_expectations/core/batch.py
--- a/great_expectations/core/batch.py
+++ b/great_expectations/core/batch.py
@@ -799,7 +799,23 @@ def id(self):
     def __str__(self):
         return json.dumps(self.to_json_dict(), indent=2)
 
+    @public_api
     def head(self, n_rows=5, fetch_all=False):
+        """Return the first n rows from the Batch.
+
+        This function returns the first n_rows rows. It is useful for quickly testing
+        if your object has the data you expected.
+
+        It will always obtain data from the Datasource and return a Pandas
+        DataFrame available locally.
+
+        Args:
+             n_rows: the number of rows to return
+             fetch_all: whether to fetch all rows; overrides n_rows if set to True
+
+        Returns:
+            A Pandas DataFrame
+        """
         # FIXME - we should use a Validator after resolving circularity
         # Validator(self._data.execution_engine, batches=(self,)).get_metric(MetricConfiguration("table.head", {"batch_id": self.id}, {"n_rows": n_rows, "fetch_all": fetch_all}))
         metric = MetricConfiguration(


Test patch: