Skip to content

Commit

Permalink
0.10.12 release prep (#1462)
Browse files Browse the repository at this point in the history
* Update changelog and .travis.yml

* Lint and fix old merge remnants
  • Loading branch information
roblim authored May 20, 2020
1 parent cd802d9 commit fb1b1ce
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 139 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
- stage: deploy
python: 3.6
script:
- git tag --annotate 0.10.11 -m "0.10.11" || echo "tag exists, skipping"
- git tag --annotate 0.10.12 -m "0.10.12" || echo "tag exists, skipping"
deploy:
provider: pypi
edge: true
Expand Down
7 changes: 5 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ Changelog

develop
-----------------

0.10.12
-----------------
* [DOCS] Improved help for CLI `checkpoint` command
* [BUGFIX] BasicSuiteBuilderProfiler could include extra expectations when only some expectations were selected (#1422)
* [FEATURE] add support for `expect_multicolumn_values_to_be_unique` and `expect_column_pair_values_A_to_be_greater_than_B`
* [FEATURE] add support for `expect_multicolumn_values_to_be_unique` and `expect_column_pair_values_A_to_be_greater_than_B`
to `Spark`. Thanks @WilliamWsyHK!
* [ENHANCEMENT] Allow a dictionary of variables can be passed to the DataContext constructor to allow override
* [ENHANCEMENT] Allow a dictionary of variables can be passed to the DataContext constructor to allow override
config variables at runtime. Thanks @balexander!
* [FEATURE] add support for `expect_column_pair_values_A_to_be_greater_than_B` to `Spark`.
* [BUGFIX] Remove SQLAlchemy typehints to avoid requiring library (thanks @mzjp2)!
Expand Down
124 changes: 1 addition & 123 deletions docs/example_code/custom_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ def render(cls, ge_dict=None):
if ge_dict is None:
ge_dict = {}

<<<<<<< HEAD
return RenderedDocumentContent(**{
"renderer_type": "CustomValidationResultsPageRenderer",
"data_asset_name": "my_data_asset_name",
Expand Down Expand Up @@ -258,125 +257,4 @@ def render(cls, ge_dict=None):
}),
]
})
=======
return RenderedDocumentContent(
**{
"renderer_type": "CustomValidationResultsPageRenderer",
"data_asset_name": "my_data_asset_name",
"full_data_asset_identifier": "my_datasource/my_generator/my_generator_asset",
"page_title": "My Page Title",
"sections": [
RenderedSectionContent(
**{
"section_name": "Header Content Block",
"content_blocks": [
cls._get_header_content_block(
header="Header Content Block", subheader="subheader"
)
],
}
),
RenderedSectionContent(
**{
"section_name": "Bullet List Content Block",
"content_blocks": [
cls._get_header_content_block(
header="Bullet List Content Block"
),
cls._get_bullet_list_content_block(
header="My Important List",
subheader="Unremarkable Subheader",
),
],
}
),
RenderedSectionContent(
**{
"section_name": "Table Content Block",
"content_blocks": [
cls._get_header_content_block(
header="Table Content Block"
),
cls._get_table_content_block(
header="My Big Data Table"
),
],
}
),
RenderedSectionContent(
**{
"section_name": "Value List Content Block",
"content_blocks": [
cls._get_header_content_block(
header="Value List Content Block"
),
cls._get_value_list_content_block(
header="My Name Value List"
),
],
}
),
RenderedSectionContent(
**{
"section_name": "Graph Content Block",
"content_blocks": [
cls._get_header_content_block(
header="Graph Content Block"
),
cls._get_graph_content_block(
header="My Big Data Graph"
),
],
}
),
RenderedSectionContent(
**{
"section_name": "String Template Content Block With Icon",
"content_blocks": [
cls._get_header_content_block(
header="String Template Content Block With Icon"
),
cls._get_string_template_content_block(),
],
}
),
RenderedSectionContent(
**{
"section_name": "String Template Content Block With Tooltip",
"content_blocks": [
cls._get_header_content_block(
header="String Template Content Block With Tooltip"
),
cls._get_tooltip_string_template_content_block(),
],
}
),
RenderedSectionContent(
**{
"section_name": "Multiple Content Block Section",
"content_blocks": [
cls._get_header_content_block(
header="Multiple Content Block Section"
),
cls._get_graph_content_block(
header="My col-4 Graph", col=4
),
cls._get_graph_content_block(
header="My col-4 Graph", col=4
),
cls._get_graph_content_block(
header="My col-4 Graph", col=4
),
cls._get_table_content_block(
header="My col-6 Table", col=6
),
cls._get_bullet_list_content_block(
header="My col-6 List", subheader="subheader", col=6
),
],
}
),
],
}
)
>>>>>>> develop

5 changes: 4 additions & 1 deletion great_expectations/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2709,7 +2709,10 @@ def expect_column_quantile_values_to_be_between(
)
# We explicitly allow "None" to be interpreted as +/- infinity
comparison_quantile_ranges = [
[-np.inf if lower_bound is None else lower_bound, np.inf if upper_bound is None else upper_bound]
[
-np.inf if lower_bound is None else lower_bound,
np.inf if upper_bound is None else upper_bound,
]
for (lower_bound, upper_bound) in quantile_value_ranges
]
success_details = [
Expand Down
9 changes: 3 additions & 6 deletions great_expectations/dataset/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
import warnings
from typing import List, Any
from typing import Any, List

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -574,9 +574,7 @@ def create_multiple_expectations(df, columns, expectation_type, *args, **kwargs)
return results


def get_approximate_percentile_disc_sql(
selects: List, sql_engine_dialect: Any
) -> str:
def get_approximate_percentile_disc_sql(selects: List, sql_engine_dialect: Any) -> str:
return ", ".join(
[
"approximate "
Expand All @@ -591,8 +589,7 @@ def get_approximate_percentile_disc_sql(


def check_sql_engine_dialect(
actual_sql_engine_dialect: Any,
candidate_sql_engine_dialect: Any,
actual_sql_engine_dialect: Any, candidate_sql_engine_dialect: Any,
) -> bool:
try:
return isinstance(actual_sql_engine_dialect, candidate_sql_engine_dialect)
Expand Down
11 changes: 5 additions & 6 deletions tests/dataset/test_pandas_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,15 +755,14 @@ def test_expect_values_quantiles_to_be_between():
used to be interpreted as None (and thus +-inf) and we'd get false negatives.
"""
T = [
([1, 2, 3, 4, 5], [.5], [[0, 0]], False),
([0, 0, 0, 0, 0], [.5], [[0, 0]], True),
([1, 2, 3, 4, 5], [0.5], [[0, 0]], False),
([0, 0, 0, 0, 0], [0.5], [[0, 0]], True),
]

for data, quantiles, value_ranges, success in T:
df = ge.dataset.PandasDataset({"A": data})

validation = df.expect_column_quantile_values_to_be_between("A", {
"quantiles": quantiles,
"value_ranges": value_ranges,
})
validation = df.expect_column_quantile_values_to_be_between(
"A", {"quantiles": quantiles, "value_ranges": value_ranges,}
)
assert validation.success is success

0 comments on commit fb1b1ce

Please sign in to comment.