frictionlessdata / data-quality-spec

A spec for reporting errors in data quality.
MIT License
20 stars 3 forks source link

Use quotes to separate message from error data #8

Closed roll closed 7 years ago

roll commented 7 years ago

Overview

For example:

The value {value} in row {row_number} and column {column_number} does not conform to the pattern constraint of {constraint}

It will be rendered with value without separators (hard to understand where value boundaries). We need to use something like value "{value}" in row.

pwalsh commented 7 years ago

happy to add if you really think we need it.

I think it is more flexible to not add it, as consumers can write their own formatter for these keywords.

Eg:

def q(keyword):
    return '"{}"'.format(keyword)

msgtmpl = 'The value {value} in row {row_number} and column {column_number} does not conform to the pattern constraint of {constraint}'
error = msgtmpl.format(value=q(value), row_number=q(row_number))

Then consumer can choose to use quotes, bold, whatever is suitable for their use case.

roll commented 7 years ago

@pwalsh Heh it's smart I've missed it)

https://github.com/frictionlessdata/goodtables-py/issues/163

roll commented 7 years ago

CLOSED