diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bda65c39f8f..b5f8620c16df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -306,7 +306,7 @@ jobs: # We decided to exclude all external HTTP requests but the ones that under the domain greatexpectations.io # The reason is to avoid having network errors such as pages that throw 429 after too many requests (like Github) # and to prevent other possible errors related to user agent or lychee capturing hrefs from metadata that don't resolve to a specific page (preconnects in JS) - args: "--exclude='http.*' 'docs/docusaurus/build/**/*.html'" + args: "--exclude='http.*' --include='^https://(.+\\.)?greatexpectations\\.io/' 'docs/docusaurus/build/**/*.html'" docs-tests: runs-on: ubuntu-latest diff --git a/docs/docusaurus/docs/components/_data.jsx b/docs/docusaurus/docs/components/_data.jsx index 25843808f332..72ab9418a87a 100644 --- a/docs/docusaurus/docs/components/_data.jsx +++ b/docs/docusaurus/docs/components/_data.jsx @@ -1,5 +1,5 @@ export default { - release_version: 'great_expectations, version 1.2.6', + release_version: 'great_expectations, version 1.3.0', min_python: '3.9', max_python: '3.12' } diff --git a/docs/docusaurus/docs/oss/changelog.md b/docs/docusaurus/docs/oss/changelog.md index 4998eadff9ae..67b32bb43c49 100644 --- a/docs/docusaurus/docs/oss/changelog.md +++ b/docs/docusaurus/docs/oss/changelog.md @@ -14,6 +14,39 @@ When we deprecate our public APIs, we will Before we completely remove the functionality in a new major release, there will be at least one minor release that contains the deprecation so that you can smoothly transition to the new API. +### 1.3.0 +* [BUGFIX] Handle expectation description from cloud ([#10768](https://github.com/great-expectations/great_expectations/pull/10768)) +* [BUGFIX] Renderer for UnexpectedRowsExpectation ([#10758](https://github.com/great-expectations/great_expectations/pull/10758)) +* [BUGFIX] Fix format of UnexpectedRowsExpectation observed_value to be int ([#10777](https://github.com/great-expectations/great_expectations/pull/10777)) +* [BUGFIX] Metric table.column_type should properly evaluate for snowflake ([#10776](https://github.com/great-expectations/great_expectations/pull/10776)) +* [BUGFIX] Fix expectation description rendering in DataDocs ([#10789](https://github.com/great-expectations/great_expectations/pull/10789)) +* [BUGFIX] `Databricks` Fix Type Translation - `ExpectColumnValuesToBeInTypeList` and `ExpectColumnValuesToBeInType` ([#10791](https://github.com/great-expectations/great_expectations/pull/10791)) +* [BUGFIX] Metric `table.column_type` should properly evaluate for Postgres ([#10793](https://github.com/great-expectations/great_expectations/pull/10793)) +* [DOCS] Clarify Connect GX Cloud landing page ([#10761](https://github.com/great-expectations/great_expectations/pull/10761)) +* [DOCS] Remove `print(validation_results.result_url)` as it isn't supported ([#10760](https://github.com/great-expectations/great_expectations/pull/10760)) +* [DOCS] SUJ-E ([#10665](https://github.com/great-expectations/great_expectations/pull/10665)) +* [DOCS] Fix underline in links on inline code ([#10783](https://github.com/great-expectations/great_expectations/pull/10783)) +* [DOCS] Remove unnecessary escape character in Expectation for Gallery ([#10780](https://github.com/great-expectations/great_expectations/pull/10780)) +* [DOCS] Custom Actions ([#10772](https://github.com/great-expectations/great_expectations/pull/10772)) +* [DOCS] Schema change detection ([#10755](https://github.com/great-expectations/great_expectations/pull/10755)) +* [DOCS] Update public_api to include `ValidationAction` components ([#10752](https://github.com/great-expectations/great_expectations/pull/10752)) +* [MAINTENANCE] Change ci pipeline to pull_request_target with a permissions check to allow CI on forks ([#10467](https://github.com/great-expectations/great_expectations/pull/10467)) +* [MAINTENANCE] Revert "[MAINTENANCE] Change ci pipeline to pull_request_target with a permissions check to allow CI on forks" ([#10773](https://github.com/great-expectations/great_expectations/pull/10773)) +* [MAINTENANCE] Minor code clean up and refactor around column type exp… ([#10764](https://github.com/great-expectations/great_expectations/pull/10764)) +* [MAINTENANCE] Diagram on how multi-datasource test setup works ([#10766](https://github.com/great-expectations/great_expectations/pull/10766)) +* [MAINTENANCE] Add `UnexpectedRowsExpectation` observed value renderer ([#10779](https://github.com/great-expectations/great_expectations/pull/10779)) +* [MAINTENANCE] Remove `docs_link_checker.py` ([#10781](https://github.com/great-expectations/great_expectations/pull/10781)) +* [MAINTENANCE] Add ENUM for Data Quality Issues, Update Core Expectations Docstrings/Schemas ([#10759](https://github.com/great-expectations/great_expectations/pull/10759)) +* [MAINTENANCE] Adding more test cases for snowflake types ([#10786](https://github.com/great-expectations/great_expectations/pull/10786)) +* [MAINTENANCE] Update `tasks.py` to remove reference to `isort` ([#10782](https://github.com/great-expectations/great_expectations/pull/10782)) +* [MAINTENANCE] Remove GX Cloud onboarding script ([#10785](https://github.com/great-expectations/great_expectations/pull/10785)) +* [MAINTENANCE] Check filepath existence when evaluating public API report ([#10754](https://github.com/great-expectations/great_expectations/pull/10754)) +* [MAINTENANCE] Add EventBridge Scheduler service to `cloud-tests` ([#10774](https://github.com/great-expectations/great_expectations/pull/10774)) +* [MAINTENANCE] Deprecate `DataContext.add_or_update_datasource` ([#10784](https://github.com/great-expectations/great_expectations/pull/10784)) +* [MAINTENANCE] Allow `CheckpointResult` and `ActionContext` to be importable from top-level checkpoint module ([#10788](https://github.com/great-expectations/great_expectations/pull/10788)) +* [MAINTENANCE] Clean up `cloud-tests` environment variables ([#10792](https://github.com/great-expectations/great_expectations/pull/10792)) +* [MAINTENANCE] Adding `databricks` compatibility types ([#10787](https://github.com/great-expectations/great_expectations/pull/10787)) + ### 1.2.6 * [BUGFIX] Enable custom actions in V1 ([#10743](https://github.com/great-expectations/great_expectations/pull/10743)) * [BUGFIX] Fix like pattern expectations to work without optional SQL deps ([#10745](https://github.com/great-expectations/great_expectations/pull/10745)) diff --git a/docs/docusaurus/docusaurus.config.js b/docs/docusaurus/docusaurus.config.js index c6869fdb029e..49e1732e1396 100644 --- a/docs/docusaurus/docusaurus.config.js +++ b/docs/docusaurus/docusaurus.config.js @@ -299,7 +299,7 @@ module.exports = { lastVersion: 'current', versions: { current: { - label: '1.2.6', + label: '1.3.0', }, ['0.18']: { label: '0.18.21', diff --git a/great_expectations/deployment_version b/great_expectations/deployment_version index 3c43790f5d82..f0bb29e76388 100644 --- a/great_expectations/deployment_version +++ b/great_expectations/deployment_version @@ -1 +1 @@ -1.2.6 +1.3.0 diff --git a/great_expectations/util.py b/great_expectations/util.py index 6c533c35e887..01aa961b5d43 100644 --- a/great_expectations/util.py +++ b/great_expectations/util.py @@ -1164,7 +1164,7 @@ def convert_to_json_serializable( # noqa: C901, PLR0911, PLR0912 if isinstance(data, np.float64): return float(data) - if isinstance(data, (datetime.datetime, datetime.date)): + if isinstance(data, (datetime.datetime, datetime.date, datetime.time)): return data.isoformat() if isinstance(data, (np.datetime64)): @@ -1309,7 +1309,7 @@ def ensure_json_serializable(data: Any) -> None: # noqa: C901, PLR0911, PLR0912 _ = [ensure_json_serializable(x) for x in data.tolist()] # type: ignore[func-returns-value] return - if isinstance(data, (datetime.datetime, datetime.date)): + if isinstance(data, (datetime.datetime, datetime.date, datetime.time)): return if isinstance(data, pathlib.PurePath): diff --git a/tests/test_convert_to_json_serializable.py b/tests/test_convert_to_json_serializable.py index 897baba8a5b0..8c2c1a2e8519 100644 --- a/tests/test_convert_to_json_serializable.py +++ b/tests/test_convert_to_json_serializable.py @@ -1,9 +1,10 @@ +import datetime import re import numpy as np import pytest -from great_expectations.util import convert_to_json_serializable +from great_expectations.util import convert_to_json_serializable, ensure_json_serializable try: from shapely.geometry import LineString, MultiPolygon, Point, Polygon @@ -63,3 +64,21 @@ def test_serialization_of_pattern(): pattern_to_test = r"data_(?P\d{4})-(?P\d{2}).csv" data = re.compile(pattern_to_test) assert convert_to_json_serializable(data) == pattern_to_test + + +@pytest.mark.unit +@pytest.mark.parametrize( + "data", [pytest.param({"t": datetime.time(hour=1, minute=30, second=45)}, id="datetime.time")] +) +def test_convert_to_json_serializable_converts_correctly(data: dict): + ret = convert_to_json_serializable(data) + assert ret == {"t": "01:30:45"} + + +@pytest.mark.unit +@pytest.mark.parametrize( + "data", [pytest.param({"t": datetime.time(hour=1, minute=30, second=45)}, id="datetime.time")] +) +def test_ensure_json_serializable(data: dict): + ensure_json_serializable(data) + # Passes if no exception raised