Great_expectations: HTML for Custom Expectations Shows Hard to Read Parameters with **{

Created on 25 Sep 2020  路  4Comments  路  Source: great-expectations/great_expectations

Describe the bug
When following the guide How to create custom Expectations, expectations in the data docs html show parameters with **{ as in this screenshot::

image

To Reproduce
Steps to reproduce the behavior:

  1. Define SqlAlchemyDataset custom expectations expect_column_values_to_equal_2 and expect_column_mode_to_equal_0 following the guide How to create custom Expectations
  2. Follow the tutorial Getting started with Great Expectations
  3. Add the custom expectations to great_expectations/expectations/taxi/demo.json
  4. Run great_expectations checkpoint run staging.chk
  5. navigate to the Data Docs Home page
  6. Click the latest validation result

Expected behavior
Parameters are shown without **{.

Environment:

  • OS: Debian Linux, Python 3.8.5, Chrome
  • GE Version: 0.12.1

Additional context
https://docs.greatexpectations.io/en/latest/reference/spare_parts/data_docs_reference.html?highlight=RenderedStringTemplateContent#custom-page-renderer-example looks related to a possible fix

bug stale wontfix

All 4 comments

@jdimatteo Thank you for reporting this. We acknowledge that this is a bug. Since it is not blocking a use case and based on the queue we are working on, I am marking it as "won't fix". This means that the core team does not expect to get to it, but we will gladly accept a contribution from the community.

It looks like the problem is that _missing_content_block_fn defines string_template as $expectation_type(**$kwargs) here: https://github.com/great-expectations/great_expectations/blob/0.12.6/great_expectations/render/renderer/content_block/expectation_string.py#L117

Is there anyway to override the _missing_content_block_fn or specify a string_template for custom expectations (e.g. like how the built in expectations define string templates like here)?

Some additional context in this discuss thread -- it sounds like v0.13 may bring some helpful improvements to how custom expectations are implemented and rendered
https://discuss.greatexpectations.io/t/how-to-customize-the-data-docs-output-for-a-custom-expectation/442/4

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?\n\nThis issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings