Passed
Push — master ( 1dadef...3414b8 )
by Simon
01:10
created

optimization_metadata.verbosity   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 10
eloc 37
dl 0
loc 55
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A VerbosityLVL0.save_search_data() 0 2 1
A VerbosityLVL1.save_search_data() 0 3 1
A VerbosityLVL1.load_search_data() 0 2 1
A VerbosityLVL1.save_search_data_success() 0 7 1
A VerbosityLVL0.save_search_data_canceled() 0 2 1
A VerbosityLVL0.load_search_data() 0 2 1
A VerbosityLVL1.load_search_data_success() 0 7 1
A VerbosityLVL0.save_search_data_success() 0 2 1
A VerbosityLVL0.load_search_data_success() 0 2 1
A VerbosityLVL1.save_search_data_canceled() 0 5 1
1
# Author: Simon Blanke
2
# Email: [email protected]
3
# License: MIT License
4
5
6
class VerbosityLVL0:
7
    def load_search_data(self, model):
8
        pass
9
10
    def load_search_data_success(self, model, dataframe):
11
        pass
12
13
    def save_search_data(self, model):
14
        pass
15
16
    def save_search_data_canceled(self, model):
17
        pass
18
19
    def save_search_data_success(self, model, dataframe):
20
        pass
21
22
23
class VerbosityLVL1:
24
    def load_search_data(self, model):
25
        print("loading search data for", '"{}"'.format(model.__name__), "...", end="\r")
26
27
    def load_search_data_success(self, model, dataframe):
28
        print(
29
            "loading search data for",
30
            '"{}"'.format(model.__name__),
31
            "was successful:",
32
            len(dataframe),
33
            "samples found",
34
        )
35
36
    def save_search_data(self, model):
37
        print(
38
            "  saving search data for", '"{}"'.format(model.__name__), "...", end="\r"
39
        )
40
41
    def save_search_data_canceled(self, model):
42
        print(
43
            "  saving search data for",
44
            '"{}"'.format(model.__name__),
45
            "was canceled. No new samples found",
46
        )
47
48
    def save_search_data_success(self, model, dataframe):
49
        print(
50
            "  saving search data for",
51
            '"{}"'.format(model.__name__),
52
            "was successful:",
53
            len(dataframe),
54
            "new samples stored",
55
        )
56