fieldrules package¶
Submodules¶
fieldrules.all_caps_rule module¶
an all caps rule
- Authors:
Carl Anderson (carl.anderson@weightwatchers.com)
-
class
fieldrules.all_caps_rule.
AllCapsRule
(config_dict=None)¶ Bases:
lkmltools.linter.field_rule.FieldRule
is the name non all caps?
-
run
(lookml_field)¶ is the name non all caps?
- Parameters
lookml_field (LookMLField) – instance of LookMLField
- Returns
tuple containing:
relevant (bool): is this rule relevant for this JSON chunk?
passed (bool): did the rule pass?
- Return type
(tuple)
-
fieldrules.count_name_rule module¶
a count name rule
- Authors:
Carl Anderson (carl.anderson@weightwatchers.com)
-
class
fieldrules.count_name_rule.
CountNameRule
(config_dict=None)¶ Bases:
lkmltools.linter.field_rule.FieldRule
if this is a measure of type count, does name end with
_count
-
run
(lookml_field)¶ if this is a measure of type count, does name end with
_count
- Parameters
lookml_field (LookMLField) – instance of LookMLField
- Returns
tuple containing:
relevant (bool): is this rule relevant for this JSON chunk?
passed (bool): did the rule pass?
- Return type
(tuple)
-
fieldrules.description_rule module¶
A description rule: does dimension, dimension_group, or measure have a description?
- Authors:
Carl Anderson (carl.anderson@weightwatchers.com)
-
class
fieldrules.description_rule.
DescriptionRule
(config_dict=None)¶ Bases:
lkmltools.linter.field_rule.FieldRule
Does dimension, dimension_group, or measure have a description?
-
run
(lookml_field)¶ Run the rule: check whether dimension, dimension_group, or measure has a description
- Parameters
lookml_field (LookMLField) – instance of LookMLField
- Returns
tuple containing:
relevant (bool): is this rule relevant for this JSON chunk?
passed (bool): did the rule pass?
- Return type
(tuple)
-
fieldrules.drill_down_rule module¶
a drill down rule
- Authors:
Carl Anderson (carl.anderson@weightwatchers.com)
-
class
fieldrules.drill_down_rule.
DrillDownRule
(config_dict=None)¶ Bases:
lkmltools.linter.field_rule.FieldRule
does this have drilldowns?
-
run
(lookml_field)¶ does this have drilldowns?
- Parameters
lookml_field (LookMLField) – instance of LookMLField
- Returns
tuple containing:
relevant (bool): is this rule relevant for this JSON chunk?
passed (bool): did the rule pass?
- Return type
(tuple)
-
fieldrules.lexicon_rule module¶
a lexicon rule: check that field name or description does not mention certain words or phrases provided int the config
- Authors:
Carl Anderson (carl.anderson@weightwatchers.com)
-
class
fieldrules.lexicon_rule.
LexiconRule
(config_dict=None)¶ Bases:
lkmltools.linter.field_rule.FieldRule
does dimension, dimension group, or measure follow some lexicon rules, i.e. not mention certain words or phrases in name or description?
-
run
(lookml_field)¶ apply some lexion rules: check that the field name or description does not mention certain words or phrases provided int the config
- Parameters
lookml_field (LookMLField) – instance of LookMLField
- Returns
tuple containing:
relevant (bool): is this rule relevant for this JSON chunk?
passed (bool): did the rule pass?
- Return type
(tuple)
-
fieldrules.yesno_name_rule module¶
a yesno name field rule
- Authors:
Carl Anderson (carl.anderson@weightwatchers.com)
-
class
fieldrules.yesno_name_rule.
YesNoNameRule
(config_dict=None)¶ Bases:
lkmltools.linter.field_rule.FieldRule
if this is a yesno dimension, does name start with
is_
-
run
(lookml_field)¶ if this is a yesno dimension, does name start with
is_
- Parameters
lookml_field (LookMLField) – instance of LookMLField
- Returns
tuple containing:
relevant (bool): is this rule relevant for this field?
passed (bool): did the rule pass?
- Return type
(tuple)
-