def _initialize_expectations(self, config=None, data_asset_name=None):
        """Instantiates `_expectations_config` as empty by default or with a specified expectation `config`.
        In addition, this always sets the `default_expectation_args` to:
            `include_config`: False,
            `catch_exceptions`: False,
            `output_format`: 'BASIC'

        By default, initializes data_asset_type to the name of the implementing class, but subclasses
        that have interoperable semantics (e.g. Dataset) may override that parameter to clarify their
        interoperability.

        Args:
            config (json): \
                A json-serializable expectation config. \
                If None, creates default `_expectations_config` with an empty list of expectations and \
                key value `data_asset_name` as `data_asset_name`.

            data_asset_name (string): \
                The name to assign to `_expectations_config.data_asset_name` if `config` is not provided.

        """
        if config != None:
            #!!! Should validate the incoming config with jsonschema here

            # Copy the original so that we don't overwrite it by accident
            # Pandas incorrectly interprets this as an attempt to create a column and throws up a warning. Suppress it
            # since we are subclassing.
            with warnings.catch_warnings():
                warnings.simplefilter("ignore", category=UserWarning)
                self._expectations_config = DotDict(copy.deepcopy(config))
                if data_asset_name is not None:
                    self._expectations_config["data_asset_name"] = data_asset_name

        else:
            # Pandas incorrectly interprets this as an attempt to create a column and throws up a warning. Suppress it
            # since we are subclassing.
            with warnings.catch_warnings():
                warnings.simplefilter("ignore", category=UserWarning)
                self._expectations_config = DotDict({
                    "data_asset_name": data_asset_name,
                    "data_asset_type": self.__class__.__name__,
                    "meta": {
                        "great_expectations.__version__": __version__
                    },
                    "expectations": []
                })

        # Pandas incorrectly interprets this as an attempt to create a column and throws up a warning. Suppress it
        # since we are subclassing.
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", category=UserWarning)
            self.default_expectation_args = {
                "include_config": False,
                "catch_exceptions": False,
                "result_format": 'BASIC',
            }
def _initialize_expectations ( self , config = None , data_asset_name = None ) : if config != None : with warnings . catch_warnings ( ) : warnings . simplefilter ( "ignore" , category = UserWarning ) self . _expectations_config = DotDict ( copy . deepcopy ( config ) ) if data_asset_name is not None : self . _expectations_config [ "data_asset_name" ] = data_asset_name else : with warnings . catch_warnings ( ) : warnings . simplefilter ( "ignore" , category = UserWarning ) self . _expectations_config = DotDict ( { "data_asset_name" : data_asset_name , "data_asset_type" : self . __class__ . __name__ , "meta" : { "great_expectations.__version__" : __version__ } , "expectations" : [ ] } ) with warnings . catch_warnings ( ) : warnings . simplefilter ( "ignore" , category = UserWarning ) self . default_expectation_args = { "include_config" : False , "catch_exceptions" : False , "result_format" : 'BASIC' , }
Instantiates `_expectations_config` as empty by default or with a specified expectation `config`.
        In addition, this always sets the `default_expectation_args` to:
            `include_config`: False,
            `catch_exceptions`: False,
            `output_format`: 'BASIC'

        By default, initializes data_asset_type to the name of the implementing class, but subclasses
        that have interoperable semantics (e.g. Dataset) may override that parameter to clarify their
        interoperability.

        Args:
            config (json): \
                A json-serializable expectation config. \
                If None, creates default `_expectations_config` with an empty list of expectations and \
                key value `data_asset_name` as `data_asset_name`.

            data_asset_name (string): \
                The name to assign to `_expectations_config.data_asset_name` if `config` is not provided.