Skip to content

Commit

Permalink
Merge branch 'develop' into kml/sourcesError
Browse files Browse the repository at this point in the history
  • Loading branch information
billdirks authored Dec 20, 2024
2 parents d330bc0 + 431370a commit 6678792
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus/docs/components/_data.jsx
Original file line number Diff line number Diff line change
@@ -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'
}
33 changes: 33 additions & 0 deletions docs/docusaurus/docs/oss/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ module.exports = {
lastVersion: 'current',
versions: {
current: {
label: '1.2.6',
label: '1.3.0',
},
['0.18']: {
label: '0.18.21',
Expand Down
2 changes: 1 addition & 1 deletion great_expectations/deployment_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.6
1.3.0
4 changes: 2 additions & 2 deletions great_expectations/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down Expand Up @@ -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):
Expand Down
21 changes: 20 additions & 1 deletion tests/test_convert_to_json_serializable.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -63,3 +64,21 @@ def test_serialization_of_pattern():
pattern_to_test = r"data_(?P<year>\d{4})-(?P<month>\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

0 comments on commit 6678792

Please sign in to comment.