Skip to content
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

[MAINTENANCE] Change all instances of create_expectation_suite to add_expectation_suite in tests, docs, and source code #7117

Merged
merged 38 commits into from
Feb 15, 2023

Conversation

cdkini
Copy link
Member

@cdkini cdkini commented Feb 11, 2023

Changes proposed in this pull request:

  • Remove deprecated code calls

Definition of Done

  • My code follows the Great Expectations style guide
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added unit tests where applicable and made sure that new and existing tests are passing.
  • I have run any local integration tests and made sure that nothing is broken.

@netlify
Copy link

netlify bot commented Feb 11, 2023

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit c3112ac
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/63ec1e1f6f5bb10008903a49
😎 Deploy Preview https://deploy-preview-7117--niobium-lead-7998.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ghost
Copy link

ghost commented Feb 11, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@cdkini cdkini changed the title [MAINTENANCE] Change all instance of create_expectation_suite to add_expectation_suite in tests/ [MAINTENANCE] Change all instance of create_expectation_suite to add_expectation_suite Feb 11, 2023
@cdkini cdkini changed the title [MAINTENANCE] Change all instance of create_expectation_suite to add_expectation_suite [MAINTENANCE] Change all instances of create_expectation_suite to add_expectation_suite Feb 11, 2023
@cdkini cdkini self-assigned this Feb 13, 2023
@cdkini cdkini changed the title [MAINTENANCE] Change all instances of create_expectation_suite to add_expectation_suite [MAINTENANCE] Change all instances of create_expectation_suite to add_expectation_suite in tests, docs, and source code Feb 13, 2023
@cdkini cdkini force-pushed the m/great-1684/clean_up_deprecation_warnings branch from 2a44dbe to cdfcfe0 Compare February 13, 2023 19:49
Copy link
Contributor

@Kilo59 Kilo59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to confirm that the old method still exists and is being deprecated in this PR?
Most of these changes are just changing us to use the new add_expectation_suite internally?

Copy link
Contributor

@NathanFarmer NathanFarmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questionable ones before merging

@@ -113,7 +85,33 @@
)

if TYPE_CHECKING:
from great_expectations.core.batch import (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ 🙇🏻

@@ -74,7 +74,7 @@
f'Loaded ExpectationSuite "{suite.expectation_suite_name}" containing {len(suite.expectations)} expectations.'
)
except DataContextError:
suite = context.create_expectation_suite(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this just be add_expectation_suite?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we confirm that get won't work above?

@@ -16,7 +16,7 @@

# create and load Expectation Suite
# <snippet name="tests/integration/docusaurus/connecting_to_your_data/how_to_create_a_batch_of_data_from_an_in_memory_pandas_dataframe.py create_expectation_suite">
context.create_expectation_suite(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_expectation_suite?

@@ -21,7 +21,7 @@

# create and load Expectation Suite
# <snippet name="tests/integration/docusaurus/connecting_to_your_data/how_to_create_a_batch_of_data_from_an_in_memory_spark_dataframe.py create_expectation_suite">
context.create_expectation_suite(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_expectation_suite?

@@ -43,7 +43,7 @@
context_gx = get_context(project_config=config)

expectation_suite_name = "suite_name"
suite = context_gx.create_expectation_suite(expectation_suite_name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_expectation_suite?

@cdkini cdkini enabled auto-merge (squash) February 14, 2023 20:38
@cdkini cdkini merged commit ddcd2da into develop Feb 15, 2023
@cdkini cdkini deleted the m/great-1684/clean_up_deprecation_warnings branch February 15, 2023 00:45
Shinnnyshinshin pushed a commit to jmoskovc/great_expectations that referenced this pull request Feb 15, 2023
* develop:
  [CONTRIB] added new Expectations  - India_zip_code expectation and not_to_be_future_date expectation (great-expectations#6086)
  [MAINTENANCE] Remove unused dockerfile (great-expectations#7152)
  [DOCS] doc-464 consolidating and standardizing snippets (great-expectations#7154)
  [BUGFIX] Patch broken rendered content Cloud tests (great-expectations#7155)
  [MAINTENANCE] Clean up `mypy` violations in `CardinalityChecker` (great-expectations#7146)
  [MAINTENANCE] Clean up pathlib.Path() usage in DataConnector utilities and restore tighter formatting in great_expectations/util.py  (great-expectations#7149)
  [MAINTENANCE] Change all instances of `create_expectation_suite` to `add_expectation_suite` in tests, docs, and source code (great-expectations#7117)
  [BUGFIX] Parse pandas version correctly for development builds (great-expectations#7147)
  [MAINTENANCE] Update V3 DataConnector utilities to support New Datasources (ZEP) (great-expectations#7144)
  [BUGFIX] Patch inconsistent ordering within GCP test asserts (great-expectations#7130)
  Refactor sql splitter to take selectable instead of str. (great-expectations#7133)
Shinnnyshinshin pushed a commit that referenced this pull request Feb 16, 2023
* develop: (29 commits)
  [BUGFIX] pydantic>=1.10.4 - ImportError: cannot import name dataclass_transform (#7163)
  [MAINTENANCE] ZEP - update asset factories method signatures from asset models (#7096)
  Delete cli v012 tests. (#7159)
  [CONTRIB] added new Expectations  - India_zip_code expectation and not_to_be_future_date expectation (#6086)
  [MAINTENANCE] Remove unused dockerfile (#7152)
  [DOCS] doc-464 consolidating and standardizing snippets (#7154)
  [BUGFIX] Patch broken rendered content Cloud tests (#7155)
  [MAINTENANCE] Clean up `mypy` violations in `CardinalityChecker` (#7146)
  [MAINTENANCE] Clean up pathlib.Path() usage in DataConnector utilities and restore tighter formatting in great_expectations/util.py  (#7149)
  [MAINTENANCE] Change all instances of `create_expectation_suite` to `add_expectation_suite` in tests, docs, and source code (#7117)
  [BUGFIX] Parse pandas version correctly for development builds (#7147)
  [MAINTENANCE] Update V3 DataConnector utilities to support New Datasources (ZEP) (#7144)
  [BUGFIX] Patch inconsistent ordering within GCP test asserts (#7130)
  Refactor sql splitter to take selectable instead of str. (#7133)
  [BUGFIX] `TupleAzureBlobStoreBackend` no longer gives warning when obfuscating connection string (#7139)
  [MAINTENANCE] ruff 0.0.246 update (#7137)
  [MAINTENANCE] Output Consistent Data Format from "table.head" Metric for every ExecutionEngine (#7134)
  [BUGFIX] Copy previous versions after checking out the the current commit (#7142)
  [DOCS] Remove sitemap.xml (#7141)
  [MAINTENANCE] mypy `v1.0.0` (#7138)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants