-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Rob Gray <104205257+kwcanuck@users.noreply.github.com>
- Loading branch information
1 parent
c3629d7
commit f43c148
Showing
18 changed files
with
140 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
tests/integration/common_workflows/simple_build_data_docs.py
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
tests/integration/docusaurus/reference/glossary/checkpoints.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from great_expectations.datasource.fluent import Datasource | ||
from great_expectations.datasource.fluent import DataAsset | ||
from great_expectations.checkpoint import SimpleCheckpoint | ||
|
||
# <snippet name="tests/integration/docusaurus/reference/glossary/checkpoints.py setup"> | ||
import great_expectations as gx | ||
|
||
context = gx.get_context() | ||
# </snippet> | ||
|
||
# to open Data Docs, we need validation results which we get by creating a suite and running a checkpoint | ||
datasource: Datasource = context.get_datasource("taxi_datasource") | ||
asset: DataAsset = datasource.get_asset("yellow_tripdata") | ||
batch_request = asset.build_batch_request() | ||
validator = context.get_validator(batch_request=batch_request) | ||
|
||
validator.expect_column_values_to_not_be_null("pickup_datetime") | ||
validator.expect_column_values_to_be_between("passenger_count", auto=True) | ||
|
||
taxi_suite = validator.get_expectation_suite() | ||
taxi_suite.expectation_suite_name = "taxi_suite" | ||
|
||
context.add_expectation_suite(expectation_suite=taxi_suite) | ||
|
||
# <snippet name="tests/integration/docusaurus/reference/glossary/checkpoints.py create_and_run"> | ||
checkpoint = SimpleCheckpoint( | ||
name="taxi_checkpoint", | ||
data_context=context, | ||
batch_request=batch_request, | ||
expectation_suite_name="taxi_suite", | ||
) | ||
checkpoint.run() | ||
# </snippet> | ||
|
||
# <snippet name="tests/integration/docusaurus/reference/glossary/checkpoints.py save"> | ||
context.add_checkpoint(checkpoint=checkpoint) | ||
# </snippet> | ||
|
||
# <snippet name="tests/integration/docusaurus/reference/glossary/checkpoints.py retrieve_and_run"> | ||
checkpoint = context.get_checkpoint("taxi_checkpoint") | ||
checkpoint.run() | ||
# </snippet> | ||
|
||
assert True |
41 changes: 41 additions & 0 deletions
41
tests/integration/docusaurus/reference/glossary/data_docs.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import great_expectations as gx | ||
from great_expectations.datasource.fluent import Datasource | ||
from great_expectations.datasource.fluent import DataAsset | ||
from great_expectations.checkpoint import SimpleCheckpoint | ||
|
||
context = gx.get_context() | ||
|
||
# to open data docs, we need validation results which we get by creating a suite and running a checkpoint | ||
datasource: Datasource = context.get_datasource("taxi_datasource") | ||
asset: DataAsset = datasource.get_asset("yellow_tripdata") | ||
batch_request = asset.build_batch_request() | ||
validator = context.get_validator(batch_request=batch_request) | ||
|
||
validator.expect_column_values_to_not_be_null("pickup_datetime") | ||
validator.expect_column_values_to_be_between("passenger_count", auto=True) | ||
|
||
taxi_suite = validator.get_expectation_suite() | ||
taxi_suite.expectation_suite_name = "taxi_suite" | ||
|
||
context.add_expectation_suite(expectation_suite=taxi_suite) | ||
|
||
checkpoint = SimpleCheckpoint( | ||
name="taxi_checkpoint", | ||
data_context=context, | ||
batch_request=batch_request, | ||
expectation_suite_name="taxi_suite", | ||
) | ||
checkpoint.run() | ||
|
||
# <snippet name="tests/integration/docusaurus/reference/glossary/data_docs.py data_docs"> | ||
context.build_data_docs() | ||
context.open_data_docs() | ||
# </snippet> | ||
|
||
# <snippet name="tests/integration/docusaurus/reference/glossary/data_docs.py data_docs_site"> | ||
site_name = "new_site_name" | ||
context.build_data_docs(site_names=site_name) | ||
context.open_data_docs(site_name=site_name) | ||
# </snippet> | ||
|
||
assert True |
Oops, something went wrong.