forked from se4ai2324-uniba/MusicExpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgreat_expectations_utilities.py
86 lines (74 loc) · 2 KB
/
great_expectations_utilities.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
"""Script with shared test cases"""
# pylint: disable=wrong-import-position
from great_expectations.core.expectation_suite import ExpectationConfiguration # noqa:E402,E501
# pylint: enable=wrong-import-position
NAME_NOTNULL_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_not_be_null",
kwargs={
"auto": True,
"column": "Name"
},
)
ARTIST_NOT_NULL_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_not_be_null",
kwargs={
"auto": True,
"column": "Artist"
},
)
ENERGY_NOTNULL_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_not_be_null",
kwargs={
"auto": True,
"column": "Energy"
},
)
LIVENESS_NOTNULL_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_not_be_null",
kwargs={
"auto": True,
"column": "Liveness"
},
)
LOUDNESS_NOTNULL_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_not_be_null",
kwargs={
"auto": True,
"column": "Loudness"
},
)
NAME_STRING_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_be_of_type",
kwargs={
"column": "Name",
"type_": "str"
},
)
ARTIST_STRING_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_be_of_type",
kwargs={
"column": "Artist",
"type_": "str"
},
)
ENERGY_FLOAT_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_be_of_type",
kwargs={
"column": "Energy",
"type_": "float"
},
)
LIVENESS_FLOAT_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_be_of_type",
kwargs={
"column": "Liveness",
"type_": "float"
},
)
LOUDNESS_FLOAT_CONFIG = ExpectationConfiguration(
expectation_type="expect_column_values_to_be_of_type",
kwargs={
"column": "Loudness",
"type_": "float"
},
)