0001-schema-add-Cube.warnings-support-36576.patch
bijoe/schemas.py | ||
---|---|---|
20 | 20 |
import decimal |
21 | 21 |
import collections |
22 | 22 | |
23 |
from django.utils import six |
|
24 | ||
23 | 25 |
from .relative_time import RelativeDate |
24 | 26 | |
25 | 27 |
Point = collections.namedtuple('Point', ['x', 'y']) |
... | ... | |
321 | 323 | |
322 | 324 |
class Cube(Base): |
323 | 325 |
__slots__ = ['name', 'label', 'fact_table', 'json_field', 'key', 'joins', 'dimensions', |
324 |
'measures'] |
|
326 |
'measures', 'warnings']
|
|
325 | 327 |
__types__ = { |
326 | 328 |
'name': str, |
327 | 329 |
'label': unicode, |
... | ... | |
331 | 333 |
'joins': [Join], |
332 | 334 |
'dimensions': [Dimension], |
333 | 335 |
'measures': [Measure], |
336 |
'warnings': [six.text_type], |
|
334 | 337 |
} |
335 | 338 | |
336 | 339 |
json_field = None |
337 | 340 |
joins = () |
338 | 341 |
dimensions = () |
339 | 342 |
measures = () |
343 |
warnings = () |
|
340 | 344 | |
341 | 345 |
def check(self): |
342 | 346 |
names = collections.Counter() |
tests/fixtures/schema1/01_schema.json | ||
---|---|---|
9 | 9 |
"label": "Facts 1", |
10 | 10 |
"fact_table": "\"Facts\"", |
11 | 11 |
"key": "id", |
12 |
"warnings": ["le champ « pouët » n'est pas bon", "warning2"], |
|
12 | 13 |
"joins": [ |
13 | 14 |
{ |
14 | 15 |
"name": "innersubcategory", |
15 |
- |