Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] remove extraneous expectation docs #9623

Merged
merged 3 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions great_expectations/expectations/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from great_expectations.expectations.core import *
from great_expectations.expectations.expectation import Expectation
9 changes: 2 additions & 7 deletions great_expectations/expectations/expectation.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
T = TypeVar("T", List[RenderedStringTemplateContent], RenderedAtomicContent)


@public_api
def render_evaluation_parameter_string(render_func: Callable[P, T]) -> Callable[P, T]:
"""Decorator for Expectation classes that renders evaluation parameters as strings.

Expand Down Expand Up @@ -253,6 +252,8 @@ def __new__(cls, clsname, bases, attrs):
class Expectation(pydantic.BaseModel, metaclass=MetaExpectation):
"""Base class for all Expectations.

For a list of all available expectation types, see the `Expectation Gallery <https://greatexpectations.io/expectations/>`_.

Expectation classes *must* have the following attributes set:
1. `domain_keys`: a tuple of the *keys* used to determine the domain of the
expectation
Expand Down Expand Up @@ -1492,7 +1493,6 @@ def _get_strict_max_string(renderer_configuration: RendererConfiguration) -> str
)


@public_api
class BatchExpectation(Expectation, ABC):
"""Base class for BatchExpectations.

Expand Down Expand Up @@ -1683,7 +1683,6 @@ def _validate(
}


@public_api
class QueryExpectation(BatchExpectation, ABC):
"""Base class for QueryExpectations.

Expand Down Expand Up @@ -1782,7 +1781,6 @@ def validate_configuration(
warnings.warn(str(e), UserWarning)


@public_api
class ColumnAggregateExpectation(BatchExpectation, ABC):
"""Base class for column aggregate Expectations.

Expand Down Expand Up @@ -1810,7 +1808,6 @@ class ColumnAggregateExpectation(BatchExpectation, ABC):
domain_type = MetricDomainTypes.COLUMN


@public_api
class ColumnMapExpectation(BatchExpectation, ABC):
"""Base class for ColumnMapExpectations.

Expand Down Expand Up @@ -2065,7 +2062,6 @@ def _validate(
)


@public_api
class ColumnPairMapExpectation(BatchExpectation, ABC):
"""Base class for ColumnPairMapExpectations.

Expand Down Expand Up @@ -2308,7 +2304,6 @@ def _validate(
)


@public_api
class MulticolumnMapExpectation(BatchExpectation, ABC):
"""Base class for MulticolumnMapExpectations.

Expand Down
14 changes: 0 additions & 14 deletions great_expectations/expectations/expectation_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from marshmallow import Schema, ValidationError, fields, post_dump, post_load, pre_dump
from typing_extensions import TypedDict

from great_expectations._docs_decorators import new_argument, public_api
from great_expectations.compatibility.typing_extensions import override
from great_expectations.core.evaluation_parameters import (
_deduplicate_evaluation_parameter_dependencies,
Expand Down Expand Up @@ -108,17 +107,6 @@ class KWargDetailsDict(TypedDict):
default_kwarg_values: dict[str, str | bool | float | RuleBasedProfilerConfig | None]


@public_api
@new_argument(
argument_name="rendered_content",
version="0.15.14",
message="Used to include rendered content dictionary in expectation configuration.",
)
@new_argument(
argument_name="expectation_context",
version="0.13.44",
message="Used to support column descriptions in GX Cloud.",
)
class ExpectationConfiguration(SerializableDictDot):
"""Defines the parameters and name of a specific Expectation.

Expand Down Expand Up @@ -305,7 +293,6 @@ def get_domain_kwargs(self) -> dict:

return domain_kwargs

@public_api
def get_success_kwargs(self) -> dict:
"""Gets the success and domain kwargs for this ExpectationConfiguration.

Expand Down Expand Up @@ -460,7 +447,6 @@ def __repr__(self):
def __str__(self):
return json.dumps(self.to_json_dict(), indent=2)

@public_api
@override
def to_json_dict(self) -> Dict[str, JSONValues]:
"""Returns a JSON-serializable dict representation of this ExpectationConfiguration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from functools import wraps
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Type, Union

from great_expectations._docs_decorators import public_api
from great_expectations.compatibility.sqlalchemy import sqlalchemy as sa
from great_expectations.compatibility.typing_extensions import override
from great_expectations.core.metric_domain_types import MetricDomainTypes
Expand Down Expand Up @@ -38,7 +37,6 @@
)


@public_api
def column_aggregate_value(
engine: Type[ExecutionEngine],
**kwargs,
Expand Down Expand Up @@ -108,7 +106,6 @@ def inner_func( # noqa: PLR0913
)


@public_api
def column_aggregate_partial(engine: Type[ExecutionEngine], **kwargs):
"""Provides engine-specific support for authoring a metric_fn with a simplified signature.

Expand Down Expand Up @@ -260,7 +257,6 @@ def inner_func( # noqa: PLR0913
raise ValueError("Unsupported engine for column_aggregate_partial")


@public_api
class ColumnAggregateMetricProvider(TableMetricProvider):
"""Base class for all Column Aggregate Metrics,
which define metrics to be calculated in aggregate from a given column.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
Union,
)

from great_expectations._docs_decorators import public_api
from great_expectations.compatibility.sqlalchemy import (
sqlalchemy as sa,
)
Expand All @@ -39,7 +38,6 @@
from great_expectations.compatibility import sqlalchemy


@public_api
def column_condition_partial( # noqa: C901, PLR0915
engine: Type[ExecutionEngine],
partial_fn_type: Optional[MetricPartialFunctionTypes] = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging
from typing import TYPE_CHECKING, Optional

from great_expectations._docs_decorators import public_api
from great_expectations.compatibility.typing_extensions import override
from great_expectations.expectations.metrics.map_metric_provider.map_metric_provider import (
MapMetricProvider,
Expand All @@ -19,7 +18,6 @@
logger = logging.getLogger(__name__)


@public_api
class ColumnMapMetricProvider(MapMetricProvider):
"""Defines metrics that are evaluated for every row for a single column. An example of a column map
metric is `column_values.null` (which is implemented as a `ColumnMapMetricProvider`, a subclass of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
Type,
)

from great_expectations._docs_decorators import public_api
from great_expectations.compatibility.sqlalchemy import sqlalchemy as sa
from great_expectations.core.metric_domain_types import MetricDomainTypes
from great_expectations.core.metric_function_types import (
Expand All @@ -31,7 +30,6 @@
logger = logging.getLogger(__name__)


@public_api
def column_pair_function_partial( # noqa: C901 - 16
engine: Type[ExecutionEngine],
partial_fn_type: MetricPartialFunctionTypes | None = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Tuple,
)

from great_expectations._docs_decorators import public_api
from great_expectations.compatibility.typing_extensions import override
from great_expectations.expectations.metrics.map_metric_provider.map_metric_provider import (
MapMetricProvider,
Expand All @@ -23,7 +22,6 @@
logger = logging.getLogger(__name__)


@public_api
class ColumnPairMapMetricProvider(MapMetricProvider):
"""Defines metrics that are evaluated for every row for a column pair. All column pair metrics require domain
keys of `column_A` and `column_B`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from typing import TYPE_CHECKING

import great_expectations.exceptions as gx_exceptions
from great_expectations._docs_decorators import public_api
from great_expectations.compatibility.typing_extensions import override
from great_expectations.core.metric_domain_types import MetricDomainTypes
from great_expectations.core.metric_function_types import (
Expand Down Expand Up @@ -82,7 +81,6 @@
logger = logging.getLogger(__name__)


@public_api
class MapMetricProvider(MetricProvider):
"""The base class for defining metrics that are evaluated for every row. An example of a map metric is
`column_values.null` (which is implemented as a `ColumnMapMetricProvider`, a subclass of `MapMetricProvider`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging
from typing import TYPE_CHECKING, Optional, Tuple

from great_expectations._docs_decorators import public_api
from great_expectations.compatibility.typing_extensions import override
from great_expectations.expectations.metrics.map_metric_provider import (
MapMetricProvider,
Expand All @@ -19,7 +18,6 @@
logger = logging.getLogger(__name__)


@public_api
class MulticolumnMapMetricProvider(MapMetricProvider):
"""Defines metrics that are evaluated for every row for a set of columns. All multi-column metrics require the
domain key `column_list`.
Expand Down
4 changes: 0 additions & 4 deletions great_expectations/expectations/metrics/metric_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from typing_extensions import ParamSpec

import great_expectations.exceptions as gx_exceptions
from great_expectations._docs_decorators import public_api
from great_expectations.core.metric_domain_types import MetricDomainTypes
from great_expectations.core.metric_function_types import (
MetricFunctionTypes,
Expand All @@ -34,7 +33,6 @@
T = TypeVar("T")


@public_api
def metric_value(
engine: Type[ExecutionEngine],
metric_fn_type: Union[str, MetricFunctionTypes] = MetricFunctionTypes.VALUE,
Expand Down Expand Up @@ -69,7 +67,6 @@ def inner_func(*args: P.args, **kwargs: P.kwargs):
return wrapper


@public_api
def metric_partial(
engine: Type[ExecutionEngine],
partial_fn_type: MetricPartialFunctionTypes,
Expand Down Expand Up @@ -112,7 +109,6 @@ def inner_func(*args: P.args, **kwargs: P.kwargs):
return wrapper


@public_api
class MetricProvider(metaclass=MetaMetricProvider):
"""Base class for all metric providers.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
import logging
from typing import ClassVar

from great_expectations._docs_decorators import public_api
from great_expectations.expectations.metrics.metric_provider import MetricProvider

logger = logging.getLogger(__name__)


@public_api
class QueryMetricProvider(MetricProvider):
"""Base class for all Query Metrics, which define metrics to construct SQL queries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
import logging
from typing import Tuple

from great_expectations._docs_decorators import public_api
from great_expectations.expectations.metrics.metric_provider import MetricProvider

logger = logging.getLogger(__name__)


@public_api
class TableMetricProvider(MetricProvider):
"""Base class for all Table Metrics, which define metrics to be calculated across a complete table.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from abc import ABC
from typing import TYPE_CHECKING, Optional

from great_expectations._docs_decorators import public_api
from great_expectations.compatibility.typing_extensions import override
from great_expectations.exceptions.exceptions import (
InvalidExpectationConfigurationError,
Expand Down Expand Up @@ -48,7 +47,6 @@
logger = logging.getLogger(__name__)


@public_api
class RegexColumnMapMetricProvider(ColumnMapMetricProvider):
"""Base class for all RegexColumnMapMetrics.

Expand Down Expand Up @@ -101,7 +99,6 @@ def _spark(cls, column, **kwargs):
return column.rlike(cls.regex)


@public_api
class RegexBasedColumnMapExpectation(ColumnMapExpectation, ABC):
"""Base class for RegexBasedColumnMapExpectations.

Expand Down Expand Up @@ -157,7 +154,6 @@ def register_metric(
return map_metric

@override
@public_api
def validate_configuration(
self, configuration: Optional[ExpectationConfiguration] = None
) -> None:
Expand Down
2 changes: 0 additions & 2 deletions great_expectations/expectations/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
)

import great_expectations.exceptions as gx_exceptions
from great_expectations._docs_decorators import public_api
from great_expectations.core.id_dict import IDDict

if TYPE_CHECKING:
Expand Down Expand Up @@ -229,7 +228,6 @@ def _add_response_key(res, key, value):
return res


@public_api
def register_metric( # noqa: PLR0913
metric_name: str,
metric_domain_keys: Tuple[str, ...],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from abc import ABC
from typing import TYPE_CHECKING, Optional

from great_expectations._docs_decorators import public_api
from great_expectations.exceptions.exceptions import (
InvalidExpectationConfigurationError,
)
Expand Down Expand Up @@ -46,7 +45,6 @@
logger = logging.getLogger(__name__)


@public_api
class SetColumnMapMetricProvider(ColumnMapMetricProvider):
"""Base class for all SetColumnMapMetrics.
Expand Down Expand Up @@ -88,7 +86,6 @@ def _spark(cls, column, **kwargs):
return column.isin(cls.set_)


@public_api
class SetBasedColumnMapExpectation(ColumnMapExpectation, ABC):
"""Base class for SetBasedColumnMapExpectations.
Expand Down