great_expectations.render.view.view

Module Contents

Classes

NoOpTemplate()

PrettyPrintTemplate()

DefaultJinjaView(custom_styles_directory=None, custom_views_directory=None)

Defines a method for converting a document to human-consumable form

DefaultJinjaPageView(custom_styles_directory=None, custom_views_directory=None)

Defines a method for converting a document to human-consumable form

DefaultJinjaIndexPageView(custom_styles_directory=None, custom_views_directory=None)

Defines a method for converting a document to human-consumable form

DefaultJinjaSectionView(custom_styles_directory=None, custom_views_directory=None)

Defines a method for converting a document to human-consumable form

DefaultJinjaComponentView(custom_styles_directory=None, custom_views_directory=None)

Defines a method for converting a document to human-consumable form

DefaultMarkdownPageView(custom_styles_directory=None, custom_views_directory=None)

Convert a document to markdown format.

class great_expectations.render.view.view.NoOpTemplate
render(self, document)
class great_expectations.render.view.view.PrettyPrintTemplate
render(self, document, indent=2)
class great_expectations.render.view.view.DefaultJinjaView(custom_styles_directory=None, custom_views_directory=None)

Defines a method for converting a document to human-consumable form

  • Font Awesome 5.10.1

  • Bootstrap 4.3.1

  • jQuery 3.2.1

  • Vega 5

  • Vega-Lite 4

  • Vega-Embed 6

_template
render(self, document, template=None, **kwargs)
_get_template(self, template)
add_data_context_id_to_url(self, jinja_context, url, add_datetime=True)
render_content_block(self, jinja_context, content_block, index=None, content_block_id=None, render_to_markdown: bool = False)
Parameters
  • jinja_context

  • content_block

  • index

  • content_block_id

  • render_to_markdown – Whether this method should render the markdown version instead of HTML

Returns

render_dict_values(self, context, dict_, index=None, content_block_id=None)
render_bootstrap_table_data(self, context, table_data, index=None, content_block_id=None)
get_html_escaped_json_string_from_dict(self, source_dict)
attributes_dict_to_html_string(self, attributes_dict, prefix='')
render_styling(self, styling)

Adds styling information suitable for an html tag.

Example styling block:

styling = {
    "classes": ["alert", "alert-warning"],
    "attributes": {
        "role": "alert",
        "data-toggle": "popover",
    },
    "styles" : {
        "padding" : "10px",
        "border-radius" : "2px",
    }
}

The above block returns a string similar to:

'class="alert alert-warning" role="alert" data-toggle="popover" style="padding: 10px; border-radius: 2px"'

“classes”, “attributes” and “styles” are all optional parameters. If they aren’t present, they simply won’t be rendered.

Other dictionary keys are also allowed and ignored.

render_styling_from_string_template(self, template)

This method is a thin wrapper use to call render_styling from within jinja templates.

generate_html_element_uuid(self, prefix=None)
render_markdown(self, markdown)
render_string_template(self, template)
abstract _validate_document(self, document)
class great_expectations.render.view.view.DefaultJinjaPageView(custom_styles_directory=None, custom_views_directory=None)

Bases: great_expectations.render.view.view.DefaultJinjaView

Defines a method for converting a document to human-consumable form

  • Font Awesome 5.10.1

  • Bootstrap 4.3.1

  • jQuery 3.2.1

  • Vega 5

  • Vega-Lite 4

  • Vega-Embed 6

_template = page.j2
_validate_document(self, document)
class great_expectations.render.view.view.DefaultJinjaIndexPageView(custom_styles_directory=None, custom_views_directory=None)

Bases: great_expectations.render.view.view.DefaultJinjaPageView

Defines a method for converting a document to human-consumable form

  • Font Awesome 5.10.1

  • Bootstrap 4.3.1

  • jQuery 3.2.1

  • Vega 5

  • Vega-Lite 4

  • Vega-Embed 6

_template = index_page.j2
class great_expectations.render.view.view.DefaultJinjaSectionView(custom_styles_directory=None, custom_views_directory=None)

Bases: great_expectations.render.view.view.DefaultJinjaView

Defines a method for converting a document to human-consumable form

  • Font Awesome 5.10.1

  • Bootstrap 4.3.1

  • jQuery 3.2.1

  • Vega 5

  • Vega-Lite 4

  • Vega-Embed 6

_template = section.j2
_validate_document(self, document)
class great_expectations.render.view.view.DefaultJinjaComponentView(custom_styles_directory=None, custom_views_directory=None)

Bases: great_expectations.render.view.view.DefaultJinjaView

Defines a method for converting a document to human-consumable form

  • Font Awesome 5.10.1

  • Bootstrap 4.3.1

  • jQuery 3.2.1

  • Vega 5

  • Vega-Lite 4

  • Vega-Embed 6

_template = component.j2
_validate_document(self, document)
class great_expectations.render.view.view.DefaultMarkdownPageView(custom_styles_directory=None, custom_views_directory=None)

Bases: great_expectations.render.view.view.DefaultJinjaView

Convert a document to markdown format.

_template = markdown_validation_results_page.j2
_validate_document(self, document: RenderedDocumentContent)

Validate that the document is of the appropriate type at runtime.

render(self, document, template=None, **kwargs)

Handle list as well as single document

render_string_template(self, template: pTemplate)

Render string for markdown rendering. Bold all parameters and perform substitution. :param template: python Template object

Returns

Template with substituted values and all parameters bolded

render_content_block(self, jinja_context, content_block, index=None, content_block_id=None, render_to_markdown: bool = True)

Render a content block to markdown using jinja templates. :param jinja_context: :param content_block: :param index: :param content_block_id: :param render_to_markdown: Default of True here instead of parent class default of False

Returns: