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

[BUGFIX] Data Assistant plotting with zero expectations produced #5934

Merged

Conversation

NathanFarmer
Copy link
Contributor

@NathanFarmer NathanFarmer commented Sep 6, 2022

Changes proposed in this pull request:

  • GREAT-761/GREAT-1233
  • Fix bug that raises error if zero expectations are produced by the Data Assistant

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.

Alex Sherstinsky added 30 commits August 25, 2022 14:20
…ferredAssetSqlDataConnector" as well as update of "SimpleSqlalchemyDatasource" -- with numerous additional unit tests.
…exsherstinsky/sql_connector_certification-2022_08_23-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…T-200/GREAT-556/alexsherstinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…tinsky/datasource/data_connector/asset/update_to_parity_and_certify_configured_and_inferred_asset_sql_data_connectors_and_simple_sqlalchemy_datasource-2022_08_25-221
…EAT-1218/alexsherstinsky/stats_data_assistant_spark_environments_recommendations-2022_09_01-226
display_chart_dict=widgets.fixed(display_chart_dict),
chart_title=dropdown_selection,
)
if len(chart_titles) > 0:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This block is unchanged except to make sure we have charts to display.

]
else:
df[kwarg_name] = expectation_configuration.kwargs[kwarg_name]
if expectation_configuration is not None:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we are in diagnostic mode, if there is no expectation configuration associated with this metric, return None.

Copy link
Member

Choose a reason for hiding this comment

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

Just a suggestion - could we return an empty dataframe instead of None to make the return type consistent?

@NathanFarmer NathanFarmer requested a review from a team September 6, 2022 15:57
Nathan Farmer and others added 14 commits September 6, 2022 13:32
…of github.com:great-expectations/great_expectations into bugfix/data-assistant-plotting-with-zero-expectations
…of github.com:great-expectations/great_expectations into bugfix/data-assistant-plotting-with-zero-expectations
…of github.com:great-expectations/great_expectations into bugfix/data-assistant-plotting-with-zero-expectations
…of github.com:great-expectations/great_expectations into bugfix/data-assistant-plotting-with-zero-expectations
Copy link
Member

@anthonyburdi anthonyburdi left a comment

Choose a reason for hiding this comment

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

Looks good to me! Two minor non blocking questions/suggestions.

]
else:
df[kwarg_name] = expectation_configuration.kwargs[kwarg_name]
if expectation_configuration is not None:
Copy link
Member

Choose a reason for hiding this comment

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

Just a suggestion - could we return an empty dataframe instead of None to make the return type consistent?

@NathanFarmer NathanFarmer enabled auto-merge (squash) September 7, 2022 14:19
@NathanFarmer NathanFarmer merged commit d12e9af into develop Sep 7, 2022
@NathanFarmer NathanFarmer deleted the bugfix/data-assistant-plotting-with-zero-expectations branch September 7, 2022 15:13
Shinnnyshinshin pushed a commit that referenced this pull request Sep 7, 2022
…red-sql-multi-batch-notebook

* develop:
  [BUGFIX] prefix and suffix asset names are only relevant for InferredSqlAlchemyDataConnector (#5950)
  Add a dev-tools requirements option (#5944)
  [BUGFIX] Data Assistant plotting with zero expectations produced (#5934)
  [MAINTENANCE] Unit tests for `ConfigurationStore` (#5948)
  [BUGFIX] Don't include abstract Expectation classes in _retrieve_expectations_from_module (#5947)
  [BUGFIX] Making an all-NULL column handling in RuleBasedProfiler more robust (#5937)
Shinnnyshinshin pushed a commit that referenced this pull request Sep 8, 2022
…r-usage-stats-opt

* develop: (62 commits)
  [MAINTENANCE] Bump `Marshmallow` upper bound to work with Airflow operator (#5952)
  [MAINTENANCE] Add x-fails to flaky Cloud tests for purposes of 0.15.22 (#5964)
  [BUGFIX] Prevent "division by zero" errors in Rule-Based Profiler calculations when Batch has zero rows (#5960)
  [FEATURE] Improve slack error condition (#5818)
  [MAINTENANCE] More unit tests for `Stores`  (#5953)
  [MAINTENANCE] Unit tests for `ValidationGraph` and related classes (#5954)
  [MAINTENANCE] Run spark and onboarding data assistant test in their own jobs. (#5951)
  [BUGFIX] prefix and suffix asset names are only relevant for InferredSqlAlchemyDataConnector (#5950)
  Add a dev-tools requirements option (#5944)
  [BUGFIX] Data Assistant plotting with zero expectations produced (#5934)
  [MAINTENANCE] Unit tests for `ConfigurationStore` (#5948)
  [BUGFIX] Don't include abstract Expectation classes in _retrieve_expectations_from_module (#5947)
  [BUGFIX] Making an all-NULL column handling in RuleBasedProfiler more robust (#5937)
  [MAINTENANCE] Run comprehensive tests in a random order (#5942)
  [MAINTENANCE] Update to OnboardingDataAssistant Notebook - Sql (#5939)
  [MAINTENANCE] Add missing import for ConfigurationIdentifier (#5943)
  [MAINTENANCE] Mark tests within `tests/rule_based_profiler` (#5930)
  [MAINTENANCE] Move `Store` test utils from source code to tests (#5932)
  [FEATURE] DataAssistants Example Notebook - Spark (#5919)
  [MAINTENANCE] Reset globals modified in tests (#5936)
  ...
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.

None yet

2 participants