diff --git a/great_expectations/data_context/cloud_constants.py b/great_expectations/data_context/cloud_constants.py index 91b5c6ae259f..9a70b20ad2df 100644 --- a/great_expectations/data_context/cloud_constants.py +++ b/great_expectations/data_context/cloud_constants.py @@ -5,7 +5,6 @@ SUPPORT_EMAIL = "support@greatexpectations.io" CLOUD_DEFAULT_BASE_URL: Final[str] = "https://api.greatexpectations.io/" -CLOUD_APP_DEFAULT_BASE_URL: Final[str] = "https://app.greatexpectations.io/" class GXCloudEnvironmentVariable(str, Enum): diff --git a/great_expectations/data_context/data_context/abstract_data_context.py b/great_expectations/data_context/data_context/abstract_data_context.py index e788f54bb28d..860a8335fb74 100644 --- a/great_expectations/data_context/data_context/abstract_data_context.py +++ b/great_expectations/data_context/data_context/abstract_data_context.py @@ -1549,35 +1549,6 @@ def get_available_data_asset_names( return fluent_data_asset_names - def build_batch_kwargs( - self, - datasource, - batch_kwargs_generator, - data_asset_name=None, - partition_id=None, - **kwargs, - ): - """Builds batch kwargs using the provided datasource, batch kwargs generator, and batch_parameters. - - Args: - datasource (str): the name of the datasource for which to build batch_kwargs - batch_kwargs_generator (str): the name of the batch kwargs generator to use to build batch_kwargs - data_asset_name (str): an optional name batch_parameter - **kwargs: additional batch_parameters - - Returns: - BatchKwargs - - """ # noqa: E501 # FIXME CoP - datasource_obj = self.data_sources.get(datasource) - batch_kwargs = datasource_obj.build_batch_kwargs( - batch_kwargs_generator=batch_kwargs_generator, - data_asset_name=data_asset_name, - partition_id=partition_id, - **kwargs, - ) - return batch_kwargs - def open_data_docs( self, resource_identifier: Optional[str] = None, @@ -2085,15 +2056,6 @@ def get_validation_result( # noqa: C901 # FIXME CoP return validation_result - def store_validation_result_metrics( - self, requested_metrics, validation_results, target_store_name - ) -> None: - self._store_metrics( - requested_metrics=requested_metrics, - validation_results=validation_results, - target_store_name=target_store_name, - ) - def _store_metrics(self, requested_metrics, validation_results, target_store_name) -> None: """ requested_metrics is a dictionary like this: diff --git a/great_expectations/data_context/data_context_variables.py b/great_expectations/data_context/data_context_variables.py index 1af9ab202976..f33093087767 100644 --- a/great_expectations/data_context/data_context_variables.py +++ b/great_expectations/data_context/data_context_variables.py @@ -51,13 +51,6 @@ class DataContextVariableSchema(str, enum.Enum): DATA_CONTEXT_ID = "data_context_id" PROGRESS_BARS = "progress_bars" - @classmethod - def has_value(cls, value: str) -> bool: - """ - Checks whether or not a string is a value from the possible enum pairs. - """ - return value in cls._value2member_map_ - @public_api @dataclass diff --git a/great_expectations/data_context/types/base.py b/great_expectations/data_context/types/base.py index 00a72eb018c5..465f644c5af5 100644 --- a/great_expectations/data_context/types/base.py +++ b/great_expectations/data_context/types/base.py @@ -284,10 +284,6 @@ class Meta: allow_none=True, ) - @validates_schema - def validate_schema(self, data, **kwargs) -> None: - pass - # noinspection PyUnusedLocal @post_load def make_sorter_config(self, data, **kwargs): @@ -432,10 +428,6 @@ class Meta: reader_options = fields.Dict(keys=fields.Str(), required=False, allow_none=True) - @validates_schema - def validate_schema(self, data, **kwargs) -> None: - pass - @pre_dump def prepare_dump(self, data, **kwargs): """ @@ -966,10 +958,6 @@ def module_name(self): def class_name(self): return self._class_name - @property - def batch_spec_defaults(self): - return self._batch_spec_defaults - class ExecutionEngineConfigSchema(Schema): class Meta: @@ -1226,12 +1214,7 @@ class DataContextConfigDefaults(enum.Enum): DEFAULT_CONFIG_VARIABLES_FILEPATH = f"{UNCOMMITTED}/config_variables.yml" PLUGINS_BASE_DIRECTORY = "plugins" DEFAULT_PLUGINS_DIRECTORY = f"{PLUGINS_BASE_DIRECTORY}/" - DEFAULT_ACTION_LIST = [ - { - "name": "update_data_docs", - "type": "update_data_docs", - }, - ] + DEFAULT_EXPECTATIONS_STORE = { "class_name": "ExpectationsStore", "store_backend": { @@ -1644,7 +1627,4 @@ def prepare_dump(self, data, **kwargs): dataContextConfigSchema = DataContextConfigSchema() dataConnectorConfigSchema = DataConnectorConfigSchema() -executionEngineConfigSchema = ExecutionEngineConfigSchema() assetConfigSchema = AssetConfigSchema() -sorterConfigSchema = SorterConfigSchema() -progressBarsConfigSchema = ProgressBarsConfigSchema() diff --git a/great_expectations/data_context/types/resource_identifiers.py b/great_expectations/data_context/types/resource_identifiers.py index 2d513600d7bd..f4ef246dfda6 100644 --- a/great_expectations/data_context/types/resource_identifiers.py +++ b/great_expectations/data_context/types/resource_identifiers.py @@ -9,10 +9,10 @@ from great_expectations._docs_decorators import public_api from great_expectations.compatibility.typing_extensions import override from great_expectations.core.data_context_key import DataContextKey -from great_expectations.core.id_dict import BatchKwargs, IDDict from great_expectations.core.run_identifier import RunIdentifier, RunIdentifierSchema if TYPE_CHECKING: + from great_expectations.core.id_dict import BatchKwargs from great_expectations.data_context.cloud_constants import GXCloudRESTResource logger = logging.getLogger(__name__) @@ -170,25 +170,6 @@ def from_fixed_length_tuple(cls, tuple_): tuple_[3], ) - @classmethod - def from_object(cls, validation_result): - batch_kwargs = validation_result.meta.get("batch_kwargs", {}) - if isinstance(batch_kwargs, IDDict): - batch_identifier = batch_kwargs.to_id() - elif isinstance(batch_kwargs, dict): - batch_identifier = IDDict(batch_kwargs).to_id() - else: - raise gx_exceptions.DataContextError( # noqa: TRY003 # FIXME CoP - "Unable to construct ValidationResultIdentifier from provided object." - ) - return cls( - expectation_suite_identifier=ExpectationSuiteIdentifier( - validation_result.meta["expectation_suite_name"] - ), - run_id=validation_result.meta.get("run_id"), - batch_identifier=batch_identifier, - ) - class MetricIdentifier(DataContextKey): """A MetricIdentifier serves as a key to store and retrieve Metrics.""" @@ -507,17 +488,4 @@ def __repr__(self): # type: ignore[explicit-override] # FIXME return f"{self.__class__.__name__}::{self._configuration_key}" -class ConfigurationIdentifierSchema(Schema): - configuration_key = fields.Str() - - # noinspection PyUnusedLocal - @post_load - def make_configuration_identifier(self, data, **kwargs): - return ConfigurationIdentifier(**data) - - -expectationSuiteIdentifierSchema = ExpectationSuiteIdentifierSchema() validationResultIdentifierSchema = ValidationResultIdentifierSchema() -runIdentifierSchema = RunIdentifierSchema() -batchIdentifierSchema = BatchIdentifierSchema() -configurationIdentifierSchema = ConfigurationIdentifierSchema()