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

The frontend should display any rules which could not be tested due to missing files/data #61

Open
SLornieCYC opened this issue Oct 5, 2021 · 1 comment

Comments

@SLornieCYC
Copy link

Related to #45. The tool should probably flag up validations that have not run because the applicable data was not provided.

For example if the user accidentally misses out the OC3 csv entirely they might like to know that rules 131-133 (etc) could not be tested, rather than being left with the impression there are no errors with their data. Similarly for rules that depend on previous year data it would be useful to remind/highlight that those validations haven't been run when the relevant previous year data has not been loaded.

On the other hand I can see benefits to being able to intentionally upload only a single file or subset of files/data for validation so would not like to see any changes which would prevent that behaviour. Maybe any such warnings (this or #45) should be in expandable panes like the existing selection list of validation rules?

def _validate(dfs):
        if 'Episodes' not in dfs:
          return {} # This is where we discover the relevant file/data isn't available.
@dezog
Copy link
Collaborator

dezog commented Oct 5, 2021

I was just thinking about this very issue - agree this functionality definitely needs to make its way into the tool in some form.

It might do to just infer the relevant tables from the columns listed in affected_fields, but as pointed out in https://github.com/SocialFinanceDigitalLabs/quality-lac-data-beta-validator/issues/347, some fields are duplicated between tables so that might cause trouble

Otherwise we could update the ErrorDefinition class to also include the required tables. Bit of a tedious copy/pasting job, and we'd have to make a note to add that to all future rules, but certainly doable.

It'll also take a bit of thought to figure out how best to display this in the frontend. It would be cool to be able to group select/deselect the rules in the 'Validation Rules' & 'Filter' dropdowns based on the affected tables and/or fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants