Skip to content

Display summary of loaded entities #12

@sarahmish

Description

@sarahmish

Currently the validation function in Zephyr shows an error when loading an entityset does not conform to the expected metadata. For example, if turbines entity is missing COD_ELEMENT the following error will be displayed

ValueError: Turbines index column "COD_ELEMENT" missing from data for turbines entity

Rather than erroring out, the validation function should display an entire summary for each entity:

  • whether it passed or not
  • if it did not pass, which columns are missing / have a problem and what is the message

This will look something like unittesting print

Name                                                                      Pass   Fail  Cover
---------------------------------------------------------------------------------------------
turbines                                                                   x      1     90%
work_orders                                                                x      1     95%
notifications                                                              x      1     92%
stoppages                                                                  ✓            100%
alarms                                                                     ✓            100%
pidata                                                                     ✓            100%
---------------------------------------------------------------------------------------------
TOTAL                                                                      6      3     96%

turbines
ValueError: Turbines index column "COD_ELEMENT" missing from data for turbines entity

work_orders
ValueError: Expected index column "COD_ORDER" of work_orders entity is not unique

notifications
ValueError: Missing time index column "DAT_POSTING" from notifications entity

To use Zephyr, the validation above must all pass with 100%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions