-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[DOCS] Add an Expectation using the GX Cloud API #11567
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for niobium-lead-7998 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #11567 +/- ##
========================================
Coverage 84.14% 84.14%
========================================
Files 465 465
Lines 39364 39364
========================================
Hits 33124 33124
Misses 6240 6240 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
klavavej
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
I have one note that doesn’t fit in the diff:
- The Expectations overview says “Manually grouped into custom Expectation Suites via the GX Cloud API.” with the Expectation Suites link pointing to a Core page. Now that you’re adding instructions for populating Expectation Suites with the Cloud API, I think this link should be updated to point to the new Cloud content
Please note that there are a few places where I’ve left multiple inline comments on a single line to separate feedback where I’ve left a committable suggestion for the line from feedback that is more open ended for how you address it or needs content to be moved around to other lines entirely. We’ve discussed before how the GitHub UI can make these stacked comments easy to overlook so I wanted to give you a heads up about some of the review comments having this structure.
Papertrail:
Here are some issues for following up on this work in the future. TBD who will work these and when but I wanted to connect the dots for now
- Dynamic parameters and forecasted ranges - https://greatexpectations.atlassian.net/browse/DOC-1259
- size of code block font in collapsible - https://greatexpectations.atlassian.net/browse/DOC-1258
| This page provides instructions for working with Expectations. To learn about Expectation types and options, see the [Expectations overview](/cloud/expectations/expectations_overview.md). To learn about the Expectation changelog at the Data Asset level, visit [Manage Data Assets](/cloud/data_assets/manage_data_assets.md#view-data-asset-history). | ||
|
|
||
| ## Prerequisites | ||
| ## Create an Expectation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several lingering anchor links to the old add-an-expectation header that need to be updated to point to this new create-an-expectation header
See for example Connect GX Cloud to Databricks SQL where the link to "Add an Expectation" points to https://deploy-preview-11567.docs.greatexpectations.io/docs/cloud/expectations/manage_expectations#add-an-expectation
Note that in this case I think it's fine to leave the link text as is. It's just the anchor in the link destination that needs to be updated
| """ | ||
| This is an example script for creating an expectation with preset or runtime parameters. | ||
|
|
||
| To test, run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this new code sample file needs to be added to docs/docusaurus/docs/components/examples_under_test.py to be tested as part of CI
docs/docusaurus/docs/cloud/expectations/examples/create_an_expectation.py
Outdated
Show resolved
Hide resolved
| This is an example script for creating an expectation with preset or runtime parameters. | ||
|
|
||
| To test, run: | ||
| pytest --docs-tests -k "doc_example_create_an_expectation" tests/integration/test_script_runner.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like this test name is copied from the related Core code sample file. I think this will probably need to be changed to a unique name when you put the new code sample under test in docs/docusaurus/docs/components/examples_under_test.py
docs/docusaurus/docs/cloud/expectations/expectations_overview.md
Outdated
Show resolved
Hide resolved
| In your code, you will find the classes for Expectations in the `expectations` module. Import the module: | ||
|
|
||
| ```python title="Python" | ||
| from great_expectations import expectations as gxe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this import necessary to include? I don't see the shorthand gxe anywhere else in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, you're right, I was just so used to explicitly importing this module.
docs/docusaurus/docs/cloud/expectations/examples/create_an_expectation.py
Show resolved
Hide resolved
Co-authored-by: Kristen Lavavej <[email protected]>
Resolves DOC-1187
invoke lint(usesruff format+ruff check)For more information about contributing, visit our community resources.
After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!